linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] uapi/samples: guard renameat2 flag macros
@ 2025-11-10 14:42 Masaharu Noguchi
  2025-11-10 14:42 ` [PATCH v2 1/2] uapi: fcntl: guard AT_RENAME_* aliases Masaharu Noguchi
  2025-11-10 14:42 ` [PATCH v2 2/2] samples: vfs: avoid libc AT_RENAME_* redefinitions Masaharu Noguchi
  0 siblings, 2 replies; 4+ messages in thread
From: Masaharu Noguchi @ 2025-11-10 14:42 UTC (permalink / raw)
  To: Jeff Layton, Chuck Lever
  Cc: Jesper Juhl, David Laight, Alexander Aring, linux-fsdevel,
	linux-kernel, Masaharu Noguchi

Including `<linux/fcntl.h>` after libc headers leaves the renameat2 flag
macros stuck with libc's values, and our sample code in turn redefines
them when it includes the uapi header.  This little series makes the
uapi header resilient to prior definitions and ensures the sample drops
any libc remnants before pulling in the kernel constants.

Changes since v1 (based on feedback from David Laight):
- uapi change now checks the macro values and undefines mismatches
- sample code always undefines the macros up front and documents why

Link: https://lore.kernel.org/all/20251109071304.2415982-1-nogunix@gmail.com/

Masaharu Noguchi (2):
  uapi: fcntl: guard AT_RENAME_* aliases
  samples: vfs: avoid libc AT_RENAME_* redefinitions

 include/uapi/linux/fcntl.h | 15 ++++++++++++++-
 samples/vfs/test-statx.c   |  9 +++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)


base-commit: e9a6fb0bcdd7609be6969112f3fbfcce3b1d4a7c
-- 
2.51.1

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

end of thread, other threads:[~2025-11-10 23:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-10 14:42 [PATCH v2 0/2] uapi/samples: guard renameat2 flag macros Masaharu Noguchi
2025-11-10 14:42 ` [PATCH v2 1/2] uapi: fcntl: guard AT_RENAME_* aliases Masaharu Noguchi
2025-11-10 23:11   ` David Laight
2025-11-10 14:42 ` [PATCH v2 2/2] samples: vfs: avoid libc AT_RENAME_* redefinitions Masaharu Noguchi

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).