lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230324073630.161034-1-guoren@kernel.org>
Date:   Fri, 24 Mar 2023 03:36:30 -0400
From:   guoren@...nel.org
To:     arnd@...db.de, guoren@...nel.org, palmer@...osinc.com,
        conor.dooley@...rochip.com, heiko@...ech.de, jszhang@...nel.org,
        lazyparser@...il.com, falcon@...ylab.org, chenhuacai@...nel.org,
        esyr@...hat.com
Cc:     linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-riscv@...ts.infradead.org,
        Guo Ren <guoren@...ux.alibaba.com>,
        Christoph Hellwig <hch@....de>
Subject: [PATCH V3] uapi: Fixup strace compile error

From: Guo Ren <guoren@...ux.alibaba.com>

Export F_*64 definitions to userspace permanently. "ifndef" usage made it
vailable at all times to the userspace, and this change has actually broken
building strace with the latest kernel headers. There could be some debate
whether having these F_*64 definitions exposed to the user space 64-bit
applications, but it seems that were no harm (as they were exposed already
for quite some time), and they are useful at least for strace for compat
application tracing purposes.

Here is the compile error log:
../../../src/xlat/fcntlcmds.h:54:7: error: ‘F_GETLK64’ undeclared here
(not in a function); did you mean ‘F_GETLK’?
   54 |  XLAT(F_GETLK64),
      |       ^~~~~~~~~
../../../src/xlat.h:64:54: note: in definition of macro ‘XLAT’
   64 | # define XLAT(val)                      { (unsigned)(val), #val
      }
      |                                                      ^~~
../../../src/xlat/fcntlcmds.h:57:7: error: ‘F_SETLK64’ undeclared here
(not in a function); did you mean ‘F_SETLK’?
   57 |  XLAT(F_SETLK64),
      |       ^~~~~~~~~
../../../src/xlat.h:64:54: note: in definition of macro ‘XLAT’
   64 | # define XLAT(val)                      { (unsigned)(val), #val
      }
      |                                                      ^~~
../../../src/xlat/fcntlcmds.h:60:7: error: ‘F_SETLKW64’ undeclared here
(not in a function); did you mean ‘F_SETLKW’?
   60 |  XLAT(F_SETLKW64),
      |       ^~~~~~~~~~
../../../src/xlat.h:64:54: note: in definition of macro ‘XLAT’
   64 | # define XLAT(val)                      { (unsigned)(val), #val
      }

Fixes: 306f7cc1e9061 "uapi: always define F_GETLK64/F_SETLK64/F_SETLKW64 in fcntl.h"
Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
Signed-off-by: Guo Ren <guoren@...nel.org>
Reported-by: Eugene Syromiatnikov <esyr@...hat.com>
Acked-by: Palmer Dabbelt <palmer@...osinc.com>
Cc: Christoph Hellwig <hch@....de>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Heiko Stuebner <heiko@...ech.de>
---
Changelog
v3:
 - Add error log

v2:
https://lore.kernel.org/lkml/20220804025448.1240780-1-guoren@kernel.org/
 - Optimize commit log

v1:
https://lore.kernel.org/lkml/20220613013051.1741434-1-guoren@kernel.org/
---
 include/uapi/asm-generic/fcntl.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h
index 1ecdb911add8..3a389895328a 100644
--- a/include/uapi/asm-generic/fcntl.h
+++ b/include/uapi/asm-generic/fcntl.h
@@ -116,13 +116,11 @@
 #define F_GETSIG	11	/* for sockets. */
 #endif
 
-#if __BITS_PER_LONG == 32 || defined(__KERNEL__)
 #ifndef F_GETLK64
 #define F_GETLK64	12	/*  using 'struct flock64' */
 #define F_SETLK64	13
 #define F_SETLKW64	14
 #endif
-#endif /* __BITS_PER_LONG == 32 || defined(__KERNEL__) */
 
 #ifndef F_SETOWN_EX
 #define F_SETOWN_EX	15
-- 
2.36.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ