diff options
| author | Christoph Hellwig <hch@lst.de> | 2026-03-23 08:01:44 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-03-23 12:41:57 +0100 |
| commit | e43dce8a0bc09083ea1145a1a0c61d83cbe72d97 (patch) | |
| tree | 61abdd5eb9a64e183b787c49e66fb6f5d3108008 /arch/mips/kernel | |
| parent | 3d6bb84f6bb3f4c05fc47fd02ce75ce3032a4ce1 (diff) | |
| download | lwn-e43dce8a0bc09083ea1145a1a0c61d83cbe72d97.tar.gz lwn-e43dce8a0bc09083ea1145a1a0c61d83cbe72d97.zip | |
fs: fix archiecture-specific compat_ftruncate64
The "small" argument to do_sys_ftruncate indicates if > 32-bit size
should be reject, but all the arch-specific compat ftruncate64
implementations get this wrong. Merge do_sys_ftruncate and
ksys_ftruncate, replace the integer as boolean small flag with a
descriptive one about LFS semantics, and use it correctly in the
architecture-specific ftruncate64 implementations.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Fixes: 3dd681d944f6 ("arm64: 32-bit (compat) applications support")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260323070205.2939118-2-hch@lst.de
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'arch/mips/kernel')
| -rw-r--r-- | arch/mips/kernel/linux32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index a0c0a7a654e9..fe9a787db569 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c @@ -60,7 +60,7 @@ SYSCALL_DEFINE4(32_truncate64, const char __user *, path, SYSCALL_DEFINE4(32_ftruncate64, unsigned long, fd, unsigned long, __dummy, unsigned long, a2, unsigned long, a3) { - return ksys_ftruncate(fd, merge_64(a2, a3)); + return ksys_ftruncate(fd, merge_64(a2, a3), FTRUNCATE_LFS); } SYSCALL_DEFINE5(32_llseek, unsigned int, fd, unsigned int, offset_high, |
