From: guoren@kernel.org
To: arnd@arndb.de, guoren@kernel.org, palmer@rivosinc.com,
conor.dooley@microchip.com, heiko@sntech.de, jszhang@kernel.org,
lazyparser@gmail.com, falcon@tinylab.org, chenhuacai@kernel.org,
esyr@redhat.com
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org,
Guo Ren <guoren@linux.alibaba.com>,
Christoph Hellwig <hch@lst.de>
Subject: [PATCH V3] uapi: Fixup strace compile error
Date: Fri, 24 Mar 2023 03:36:30 -0400 [thread overview]
Message-ID: <20230324073630.161034-1-guoren@kernel.org> (raw)
From: Guo Ren <guoren@linux.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@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Reported-by: Eugene Syromiatnikov <esyr@redhat.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Heiko Stuebner <heiko@sntech.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
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2023-03-24 7:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 7:36 guoren [this message]
2023-03-26 22:03 ` [PATCH V3] uapi: Fixup strace compile error Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230324073630.161034-1-guoren@kernel.org \
--to=guoren@kernel.org \
--cc=arnd@arndb.de \
--cc=chenhuacai@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=esyr@redhat.com \
--cc=falcon@tinylab.org \
--cc=guoren@linux.alibaba.com \
--cc=hch@lst.de \
--cc=heiko@sntech.de \
--cc=jszhang@kernel.org \
--cc=lazyparser@gmail.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@rivosinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox