From mboxrd@z Thu Jan 1 00:00:00 1970 From: kernelapprentice@gmail.com (Kernel Apprentice) Date: Wed, 08 Apr 2015 12:06:10 +0200 Subject: Out of openat flag space In-Reply-To: References: <5524E00F.1050502@gmail.com> Message-ID: <5524FD92.3000807@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org > On Wed, Apr 8, 2015 at 4:00 AM, Kernel Apprentice [snip] >> I guess this should be 0100000000? > > That value overflows an int of size 4 bytes. How so? That value equals 16,777,216 and fits perfectly well into a variable of type int. Is this something architecture-specific I'm missing here? Same goes for the value quoted below. > > The important one to look at is the asm-generic one which covers most > platforms where the last available value was used. > > diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h > index e063effe0cc1..4542bc6a2950 100644 > --- a/include/uapi/asm-generic/fcntl.h > +++ b/include/uapi/asm-generic/fcntl.h > @@ -92,6 +92,10 @@ > #define O_TMPFILE (__O_TMPFILE | O_DIRECTORY) > #define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT) > > +#ifndef O_BENEATH > +#define O_BENEATH 040000000 /* no / or .. in openat path */ > +#endif > + > #ifndef O_NDELAY > #define O_NDELAY O_NONBLOCK > #endif > >> >>> >>> http://www.spinics.net/lists/fstests/msg01064.html >>> >>> Thanks >>> >>> David >>> >>> >>> >>> _______________________________________________ >>> Kernelnewbies mailing list >>> Kernelnewbies at kernelnewbies.org >>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies >>>