linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* improve compat handling for the i386 u64 alignment quirk
@ 2020-07-26 16:03 Christoph Hellwig
  2020-07-26 16:03 ` [PATCH 1/4] arm64: stop using <asm/compat.h> directly Christoph Hellwig
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Christoph Hellwig @ 2020-07-26 16:03 UTC (permalink / raw)
  To: x86, Jan Kara
  Cc: linux-arm-kernel, linux-fsdevel, linux-kernel, linux-api, linux-arch

Hi all,

the i386 ABI is a little special in that it uses less than natural
alignment for 64-bit integer types (u64 and s64), and a significant
amount of our compat handlers deals with just that.  Unfortunately
there is no good way to check for this specific quirk at runtime,
similar how in_compat_syscall() checks for a compat syscall.  This
series adds such a check, and then uses the quota code as an example
of how this improves the compat handling.  I have a few other places
in mind where this will also be useful going forward.

Diffstat:
 b/arch/arm64/include/asm/compat.h        |    2 
 b/arch/arm64/include/asm/stat.h          |    2 
 b/arch/arm64/kernel/process.c            |    1 
 b/arch/arm64/kernel/ptrace.c             |    1 
 b/arch/mips/include/asm/compat.h         |    2 
 b/arch/parisc/include/asm/compat.h       |    2 
 b/arch/powerpc/include/asm/compat.h      |    2 
 b/arch/s390/include/asm/compat.h         |    2 
 b/arch/sparc/include/asm/compat.h        |    3 
 b/arch/x86/entry/syscalls/syscall_32.tbl |    2 
 b/arch/x86/include/asm/compat.h          |    3 
 b/fs/quota/Kconfig                       |    5 -
 b/fs/quota/Makefile                      |    1 
 b/fs/quota/compat.h                      |   34 ++++++++
 b/fs/quota/quota.c                       |   73 +++++++++++++++---
 b/include/linux/compat.h                 |   17 ++++
 b/include/linux/quotaops.h               |    3 
 b/kernel/sys_ni.c                        |    1 
 fs/quota/compat.c                        |  120 -------------------------------
 19 files changed, 114 insertions(+), 162 deletions(-)

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-07-31  8:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-26 16:03 improve compat handling for the i386 u64 alignment quirk Christoph Hellwig
2020-07-26 16:03 ` [PATCH 1/4] arm64: stop using <asm/compat.h> directly Christoph Hellwig
2020-07-30 17:34   ` Nathan Chancellor
2020-07-31  8:41     ` Naresh Kamboju
2020-07-26 16:03 ` [PATCH 2/4] compat: lift compat_s64 and compat_u64 to <linux/compat.h> Christoph Hellwig
2020-07-29  6:08   ` [PATCH 2/4 v2] " Christoph Hellwig
2020-07-26 16:04 ` [PATCH 3/4] compat: add a compat_need_64bit_alignment_fixup() helper Christoph Hellwig
2020-07-26 16:04 ` [PATCH 4/4] quota: simplify the quotactl compat handling Christoph Hellwig
2020-07-26 16:32   ` Al Viro
2020-07-26 16:34     ` Christoph Hellwig
2020-07-26 16:37       ` Al Viro
2020-07-27 12:41   ` Jan Kara
2020-07-27 15:56     ` Al Viro
2020-07-27 21:31       ` Jan Kara
2020-07-28  1:49         ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).