Thread (26 messages) 26 messages, 4 authors, 2022-01-11

Re: [PATCH V2 03/17] asm-generic: fcntl: compat: Remove duplicate definitions

From: Christophe Leroy <hidden>
Date: 2022-01-10 15:56:25
Also in: linux-arm-kernel, linux-mips, linux-riscv, linux-s390, lkml, sparclinux


Le 28/12/2021 à 15:39, guoren@kernel.org a écrit :
From: Guo Ren <redacted>

Remove duplicate F_GETLK64,F_SETLK64,F_SETLKW64 definitions in
arch/*/include/asm/compat.h.

Signed-off-by: Guo Ren <redacted>
Signed-off-by: Guo Ren <guoren@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
---
  arch/arm64/include/asm/compat.h   | 4 ----
  arch/powerpc/include/asm/compat.h | 4 ----
  arch/s390/include/asm/compat.h    | 4 ----
  arch/sparc/include/asm/compat.h   | 4 ----
  arch/x86/include/asm/compat.h     | 4 ----
  include/uapi/asm-generic/fcntl.h  | 2 +-
  6 files changed, 1 insertion(+), 21 deletions(-)
...
quoted hunk ↗ jump to hunk
diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h
index ecd0f5bdfc1d..5bc1e51d73b1 100644
--- a/include/uapi/asm-generic/fcntl.h
+++ b/include/uapi/asm-generic/fcntl.h
@@ -116,7 +116,7 @@
  #define F_GETSIG	11	/* for sockets. */
  #endif
  
-#ifndef CONFIG_64BIT
+#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT)
  #ifndef F_GETLK64
  #define F_GETLK64	12	/*  using 'struct flock64' */
  #define F_SETLK64	13
There seems to be a problem with this change:

error: /linux/include/uapi/asm-generic/fcntl.h: leak CONFIG_COMPAT to 
user-space
make[3]: *** [/linux/scripts/Makefile.headersinst:63: 
usr/include/asm-generic/fcntl.h] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/linux/Makefile:1283: headers] Error 2
make[1]: *** [Makefile:219: __sub-make] Error 2
make[2]: Leaving directory '/output'
make[1]: Leaving directory '/linux'
make: *** [Makefile:157: khdr] Error 2
make: Leaving directory '/linux/tools/testing/selftests'
## Selftest build completed rc = 2
## Found 2 binaries
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Error build failed rc 2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Error: Process completed with exit code 2.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help