[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#349765: linux-2.6.14-2-alpha-generic: please support the prctl syscall



On Tue, Jan 24, 2006 at 10:42:06PM -0500, Kyle McMartin wrote:
> On Tue, Jan 24, 2006 at 07:06:00PM -0800, Steve Langasek wrote:
> > So please make it work; knowing this exists and should be supported, I'm not
> > willing to hack up prctl's source to use __NR_osf_setsysinfo instead. :)

> Untested, as I don't have an alpha. arch/alpha/kernel/traps.c already
> contained jazz to check if the various TIF_ were set, they were just
> lacking a convenient way to set things. You probably need to make prctl()
> know which bits to twiddle.

> diff --git a/include/asm-alpha/thread_info.h b/include/asm-alpha/thread_info.h
> index 69ffd93..011daaf 100644
> --- a/include/asm-alpha/thread_info.h
> +++ b/include/asm-alpha/thread_info.h
> @@ -92,5 +92,20 @@ register struct thread_info *__current_t
>  #define _TIF_ALLWORK_MASK	(_TIF_WORK_MASK		\
>  				 | _TIF_SYSCALL_TRACE)
>  
> +#define ALPHA_UAC_SHIFT		6
> +#define ALPHA_UAC_MASK		(TIF_UAC_NOPRINT | TIF_UAC_NOFIX | \
> +				 TIF_UAC_SIGBUS)
> +
> +#define SET_UNALIGN_CTL(task,value)	({				\
> +	(task)->thread_info->flags = (((task)->thread_info->flags &	\
> +		~ALPHA_UAC_MASK) | (((value) << ALPHA_UAC_SHIFT) &	\
> +		ALPHA_UAC_MASK));					\
> +	0; })
> +
> +#define GET_UNALIGN_CTL(task,value)	({				\
> +	put_user(((task)->thread_info->flags & ALPHA_UAC_MASK) >>	\
> +		ALPHA_UAC_SHIFT, (int __user *)(addr));			\
> +	})
> +
>  #endif /* __KERNEL__ */
>  #endif /* _ALPHA_THREAD_INFO_H */

  CC      kernel/sys.o
kernel/sys.c: In function ‘sys_prctl’:
kernel/sys.c:1798: error: ‘addr’ undeclared (first use in this function)
kernel/sys.c:1798: error: (Each undeclared identifier is reported only once
kernel/sys.c:1798: error: for each function it appears in.)
kernel/sys.c:1798: warning: type defaults to ‘int’ in declaration of ‘__pu_addr’
kernel/sys.c:1798: warning: type defaults to ‘int’ in declaration of ‘type name’
kernel/sys.c:1798: warning: type defaults to ‘int’ in declaration of ‘type name’
kernel/sys.c:1798: warning: type defaults to ‘int’ in declaration of ‘type name’
kernel/sys.c:1798: warning: type defaults to ‘int’ in declaration of ‘type name’
make[5]: *** [kernel/sys.o] Error 1

Should be 'value' instead of 'addr', I guess?

Thanks,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/

Attachment: signature.asc
Description: Digital signature


Reply to: