From mboxrd@z Thu Jan 1 00:00:00 1970 From: kernelapprentice@gmail.com (Kernel Apprentice) Date: Wed, 08 Apr 2015 10:52:53 +0200 Subject: Out of openat flag space In-Reply-To: References: <5524E00F.1050502@gmail.com> Message-ID: <5524EC65.1070106@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Am 08.04.2015 um 10:17 schrieb Sudip Mukherjee: > On Wed, Apr 8, 2015 at 1:30 PM, Kernel Apprentice > wrote: >> 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 > > as far as i know each bit of the number will represent a flag. so a 8 > bit value can have a maximum of 8 flags and not 256 flags . same goes > for a 32 bit integer. Yes of course. But that's not what I meant. If you take the following hex value that has been used as a flag: 0x4000000 (= 4 * 16 ^ 6 = 67108864) which equals 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 -- -- - (= 1 * 2 ^ 26 = 67108864) in binary, then you can see that there's room for 5 more flags. This is what I was actually getting at. But maybe I'm off here. > > regards > sudip >