kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: kernelapprentice@gmail.com (Kernel Apprentice)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Out of openat flag space
Date: Wed, 08 Apr 2015 12:06:10 +0200	[thread overview]
Message-ID: <5524FD92.3000807@gmail.com> (raw)
In-Reply-To: <CABEmWXHr7R4RrUozA8kTsEV1iCEodxQkE96Q3qkVERuH1VDOww@mail.gmail.com>

> 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
>>>

  reply	other threads:[~2015-04-08 10:06 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
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 [this message]
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=5524FD92.3000807@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).