Re: Out of openat flag space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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@xxxxxxxxxxxxxxxxx
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux