Re: [PATCH v15 6/9] namei: LOOKUP_{IN_ROOT,BENEATH}: permit limited ".." resolution
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH v15 6/9] namei: LOOKUP_{IN_ROOT,BENEATH}: permit limited ".." resolution
- From: Aleksa Sarai <cyphar@xxxxxxxxxx>
- Date: Wed, 13 Nov 2019 18:52:27 +1100
- Cc: 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.brauner@xxxxxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Eric Biederman <ebiederm@xxxxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Alexei Starovoitov <ast@xxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, 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>, Christian Brauner <christian@xxxxxxxxxx>, Aleksa Sarai <asarai@xxxxxxx>, containers@xxxxxxxxxxxxxxxxxxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-api@xxxxxxxxxxxxxxx, libc-alpha@xxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx
- In-reply-to: <20191113020917.GC26530@ZenIV.linux.org.uk>
- References: <20191105090553.6350-1-cyphar@cyphar.com> <20191105090553.6350-7-cyphar@cyphar.com> <20191113020917.GC26530@ZenIV.linux.org.uk>
On 2019-11-13, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Tue, Nov 05, 2019 at 08:05:50PM +1100, Aleksa Sarai wrote:
>
> > One other possible alternative (which previous versions of this patch
> > used) would be to check with path_is_under() if there was a racing
> > rename or mount (after re-taking the relevant seqlocks). While this does
> > work, it results in possible O(n*m) behaviour if there are many renames
> > or mounts occuring *anywhere on the system*.
>
> BTW, do you realize that open-by-fhandle (or working nfsd, for that matter)
> will trigger arseloads of write_seqlock(&rename_lock) simply on d_splice_alias()
> bringing disconnected subtrees in contact with parent?
I wasn't aware of that -- that makes path_is_under() even less viable.
I'll reword it to be clearer that path_is_under() isn't a good idea and
why we went with -EAGAIN over an in-kernel retry.
--
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>
Attachment:
signature.asc
Description: PGP signature
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]