Re: [PATCH v12 10/12] namei: aggressively check for nd->root escape on ".." resolution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Aleksa Sarai <cyphar@xxxxxxxxxx>
- Subject: Re: [PATCH v12 10/12] namei: aggressively check for nd->root escape on ".." resolution
- From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 4 Sep 2019 14:36:48 -0700
- Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>, Jeff Layton <jlayton@xxxxxxxxxx>, "J. Bruce Fields" <bfields@xxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>, Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Christian Brauner <christian@xxxxxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, Eric Biederman <ebiederm@xxxxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Alexei Starovoitov <ast@xxxxxxxxxx>, Tycho Andersen <tycho@xxxxxxxx>, David Drysdale <drysdale@xxxxxxxxxx>, Chanho Min <chanho.min@xxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>, Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>, Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>, Namhyung Kim <namhyung@xxxxxxxxxx>, Aleksa Sarai <asarai@xxxxxxx>, Linux Containers <containers@xxxxxxxxxxxxxxxxxxxxxxxxxx>, alpha <linux-alpha@xxxxxxxxxxxxxxx>, Linux API <linux-api@xxxxxxxxxxxxxxx>, linux-arch <linux-arch@xxxxxxxxxxxxxxx>, Linux ARM <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, Linux List Kernel Mailing <linux-kernel@xxxxxxxxxxxxxxx>, "open list:KERNEL SELFTEST FRAMEWORK" <linux-kselftest@xxxxxxxxxxxxxxx>, linux-m68k <linux-m68k@xxxxxxxxxxxxxxx>, linux-mips@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390 <linux-s390@xxxxxxxxxxxxxxx>, Linux-sh list <linux-sh@xxxxxxxxxxxxxxx>, linux-xtensa@xxxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx
- In-reply-to: <CAHk-=wiHRW3Z9xPRiExi9jLjB0cdGhM=3vaW+b80mjuRcbORyw@mail.gmail.com>
- References: <20190904201933.10736-1-cyphar@cyphar.com> <20190904201933.10736-11-cyphar@cyphar.com> <CAHk-=wiod1rQMU+6Zew=cLE8uX4tUdf42bM5eKngMnNVS2My7g@mail.gmail.com> <CAHk-=wiHRW3Z9xPRiExi9jLjB0cdGhM=3vaW+b80mjuRcbORyw@mail.gmail.com>
On Wed, Sep 4, 2019 at 2:35 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Wed, Sep 4, 2019 at 2:09 PM Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > So you'd have three stages:
> >
> > 1) ".." always returns -EXDEV
> >
> > 2) ".." returns -EXDEV if there was a concurrent rename/mount
> >
> > 3) ".." returns -EXDEV if there was a concurrent rename/mount and we
> > reset the sequence numbers and check if you escaped.
>
> In fact, I wonder if this should return -EAGAIN instead - to say that
> "retrying may work".
And here "this" was meant to be "case 2" - I was moving the quoted
text around and didn't fix my wording, so now it is ambiguous or
implies #3, which would be crazy.
Sorry for the confusion,
Linus
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]