Re: [PATCH v15 04/13] arch/x86: add syscall_get_arch to syscall.h

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

 



On 03/14/2012 08:11 PM, Will Drewry wrote:
>  
> +static inline int syscall_get_arch(struct task_struct *task,
> +				   struct pt_regs *regs)
> +{
> +#ifdef CONFIG_IA32_EMULATION
> +	/*
> +	 * TS_COMPAT is set for 32-bit syscall entries and then
> +	 * remains set until we return to user mode.
> +	 *
> +	 * TIF_IA32 tasks should always have TS_COMPAT set at
> +	 * system call time.
> +	 */
> +	if (task_thread_info(task)->status & TS_COMPAT)
> +		return AUDIT_ARCH_I386;
> +#endif
> +	return AUDIT_ARCH_X86_64;
> +}
>  #endif	/* CONFIG_X86_32 */
>  
>  #endif	/* _ASM_X86_SYSCALL_H */

Just one FYI on this: after the x32 changes are upstream this can be
implemented in terms of is_ia32_task().

	-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux