mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-18 18:43:59 +08:00
compat: add a compat_need_64bit_alignment_fixup() helper
Add a helper to check if the calling syscall needs a fixup for non-natural 64-bit type alignment in the compat ABI. This will only return true for i386 syscalls on x86_64. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
cc7886d25b
commit
527c412519
@ -209,6 +209,7 @@ static inline bool in_compat_syscall(void)
|
|||||||
return in_32bit_syscall();
|
return in_32bit_syscall();
|
||||||
}
|
}
|
||||||
#define in_compat_syscall in_compat_syscall /* override the generic impl */
|
#define in_compat_syscall in_compat_syscall /* override the generic impl */
|
||||||
|
#define compat_need_64bit_alignment_fixup in_ia32_syscall
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct compat_siginfo;
|
struct compat_siginfo;
|
||||||
|
@ -932,6 +932,15 @@ static inline bool in_compat_syscall(void) { return false; }
|
|||||||
|
|
||||||
#endif /* CONFIG_COMPAT */
|
#endif /* CONFIG_COMPAT */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Some legacy ABIs like the i386 one use less than natural alignment for 64-bit
|
||||||
|
* types, and will need special compat treatment for that. Most architectures
|
||||||
|
* don't need that special handling even for compat syscalls.
|
||||||
|
*/
|
||||||
|
#ifndef compat_need_64bit_alignment_fixup
|
||||||
|
#define compat_need_64bit_alignment_fixup() false
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A pointer passed in from user mode. This should not
|
* A pointer passed in from user mode. This should not
|
||||||
* be used for syscall parameters, just declare them
|
* be used for syscall parameters, just declare them
|
||||||
|
Loading…
Reference in New Issue
Block a user