From: kernelapprentice@gmail.com (Kernel Apprentice)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Out of openat flag space
Date: Wed, 08 Apr 2015 10:00:15 +0200 [thread overview]
Message-ID: <5524E00F.1050502@gmail.com> (raw)
In-Reply-To: <CABEmWXGeeFD1YXp9Rpd5o5=weyTiagA22LBWJm1K3bjM5VMgOw@mail.gmail.com>
Hello,
> Hello,
>
> Now that we have O_TMPFILE and O_BENEATH added to the openat flags, there
> is no space left to add more flags since the flags variable is a 32 bit
> int. How does one resolve this issue and extend this? A new syscall with a
> 64bit wide flags support?
Maybe I'm missing something, but a signed 32 bit integer variable holds
a maximum value of
2,147,483,647
The highest value for the O_BENEATH flag that i could spot in the patch
you linked is
0x4000000
which equals
67,108,864
so there should be plenty of room for more flags?
If the limit would be reached though I guess one could adjust the flag
arguments to unsigned int types. I haven't reasearched the implications
of this though. But OR'ing them for checks shouldn't yield any side effects.
By the way there's - as far as I can tell - an invalid flag value
defined in octal notation:
diff --git a/arch/parisc/include/uapi/asm/fcntl.h
b/arch/parisc/include/uapi/asm/fcntl.h
index 34a46cbc76ed..3adadf72f929 100644
--- a/arch/parisc/include/uapi/asm/fcntl.h
+++ b/arch/parisc/include/uapi/asm/fcntl.h
@@ -21,6 +21,7 @@
#define O_PATH 020000000
#define __O_TMPFILE 040000000
+#define O_BENEATH 080000000 /* no / or .. in openat path */
#define F_GETLK64 8
#define F_SETLK64 9
I guess this should be 0100000000?
>
> http://www.spinics.net/lists/fstests/msg01064.html
>
> Thanks
>
> David
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
next prev parent reply other threads:[~2015-04-08 8:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 17:05 Out of openat flag space David Legault
2015-04-07 23:04 ` Nicholas Krause
2015-04-08 9:54 ` David Legault
2015-04-08 8:00 ` Kernel Apprentice [this message]
2015-04-08 8:17 ` Sudip Mukherjee
2015-04-08 8:52 ` Kernel Apprentice
2015-04-08 8:20 ` Ricardo Ribalda Delgado
2015-04-08 9:49 ` David Legault
2015-04-08 10:06 ` Kernel Apprentice
2015-04-08 10:30 ` David Legault
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=5524E00F.1050502@gmail.com \
--to=kernelapprentice@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.