public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sparc: Clashing values for O_PATH and FMODE_NONOTIFY?
@ 2014-11-18 13:13 David Drysdale
  2014-11-19 20:30 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: David Drysdale @ 2014-11-18 13:13 UTC (permalink / raw)
  To: Alexander Viro, David Miller, Eric Paris
  Cc: linux-kernel@vger.kernel.org, sparclinux, inux-fsdevel

Hi folks,

It looks like the value for O_PATH on sparc:

  arch/sparc/include/uapi/asm/fcntl.h:37:#define O_PATH 0x1000000

clashes with the arch-independent value for __FMODE_NONOTIFY:

  include/linux/fs.h:137:#define FMODE_NONOTIFY ((__force fmode_t)0x1000000)
  include/linux/fs.h:2764:#define __FMODE_NONOTIFY ((__force int)
FMODE_NONOTIFY)

and they are both in the same numbering space, as indicated by the
comment at the top of include/uapi/asm-generic/fcntl.h and the use in
fs/notify/fanotify/fanotify_user.c:715.

Presumably this could theoretically cause problems (no notifications for
O_PATH files on SPARC?), so would it be a good idea to renumber
FMODE_NONOTIFY?  (I *think* that value is entirely kernel-internal.)

Given that this has happened before (12ed2e36c98aec6c4155 "fanotify:
FMODE_NONOTIFY and __O_SYNC in sparc conflict") it would probably
also be a good idea to add __FMODE_NOTIFY to the uniqueness check in
fs/fcntl.c:fcntl_init().

Thoughts?

(I can generate a speculative patch if this is wrong and needs fixing, but I
won't be able to do much about testing it.)

David

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

end of thread, other threads:[~2014-11-20 19:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18 13:13 sparc: Clashing values for O_PATH and FMODE_NONOTIFY? David Drysdale
2014-11-19 20:30 ` David Miller
2014-11-20 12:12   ` David Drysdale
2014-11-20 19:12     ` Eric Paris
2014-11-20 19:31       ` David Drysdale

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox