[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <63ae53af-023d-444c-9571-8aef9e87ebc0@app.fastmail.com>
Date: Fri, 26 Apr 2024 19:38:18 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: cgzones@...glemail.com
Cc: x86@...nel.org, linux-alpha@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-ia64@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
linux-mips@...r.kernel.org, linux-parisc@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-s390@...r.kernel.org,
linux-sh@...r.kernel.org, sparclinux@...r.kernel.org,
linux-fsdevel@...r.kernel.org, audit@...r.kernel.org,
Linux-Arch <linux-arch@...r.kernel.org>, linux-api@...r.kernel.org,
linux-security-module@...r.kernel.org, selinux@...r.kernel.org,
"Richard Henderson" <richard.henderson@...aro.org>,
"Ivan Kokshaysky" <ink@...assic.park.msu.ru>,
"Matt Turner" <mattst88@...il.com>,
"Russell King" <linux@...linux.org.uk>,
"Catalin Marinas" <catalin.marinas@....com>,
"Will Deacon" <will@...nel.org>,
"Geert Uytterhoeven" <geert@...ux-m68k.org>,
"Michal Simek" <monstr@...str.eu>,
"Thomas Bogendoerfer" <tsbogend@...ha.franken.de>,
"James E . J . Bottomley" <James.Bottomley@...senPartnership.com>,
"Helge Deller" <deller@....de>, "Michael Ellerman" <mpe@...erman.id.au>,
"Nicholas Piggin" <npiggin@...il.com>,
"Christophe Leroy" <christophe.leroy@...roup.eu>,
"Aneesh Kumar K.V" <aneesh.kumar@...nel.org>,
"Naveen N. Rao" <naveen.n.rao@...ux.ibm.com>,
"Heiko Carstens" <hca@...ux.ibm.com>,
"Vasily Gorbik" <gor@...ux.ibm.com>,
"Alexander Gordeev" <agordeev@...ux.ibm.com>,
"Christian Borntraeger" <borntraeger@...ux.ibm.com>,
"Sven Schnelle" <svens@...ux.ibm.com>,
"Yoshinori Sato" <ysato@...rs.sourceforge.jp>,
"Rich Felker" <dalias@...c.org>,
"John Paul Adrian Glaubitz" <glaubitz@...sik.fu-berlin.de>,
"David S . Miller" <davem@...emloft.net>,
"Andreas Larsson" <andreas@...sler.com>,
"Andy Lutomirski" <luto@...nel.org>,
"Thomas Gleixner" <tglx@...utronix.de>, "Ingo Molnar" <mingo@...hat.com>,
"Borislav Petkov" <bp@...en8.de>,
"Dave Hansen" <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>, "Chris Zankel" <chris@...kel.net>,
"Max Filippov" <jcmvbkbc@...il.com>,
"Alexander Viro" <viro@...iv.linux.org.uk>,
"Christian Brauner" <brauner@...nel.org>, "Jan Kara" <jack@...e.cz>,
"Paul Moore" <paul@...l-moore.com>, "Eric Paris" <eparis@...hat.com>,
"Jens Axboe" <axboe@...nel.dk>,
"Pavel Begunkov" <asml.silence@...il.com>,
"Peter Zijlstra" <peterz@...radead.org>,
"Sohil Mehta" <sohil.mehta@...el.com>,
"Palmer Dabbelt" <palmer@...ive.com>,
"Miklos Szeredi" <mszeredi@...hat.com>, "Nhat Pham" <nphamcs@...il.com>,
"Casey Schaufler" <casey@...aufler-ca.com>,
"Florian Fainelli" <florian.fainelli@...adcom.com>,
"Kees Cook" <keescook@...omium.org>,
"Rick Edgecombe" <rick.p.edgecombe@...el.com>,
"Mark Rutland" <mark.rutland@....com>, io-uring@...r.kernel.org
Subject: Re: [PATCH v3 2/2] fs/xattr: add *at family syscalls
On Fri, Apr 26, 2024, at 18:20, Christian Göttsche wrote:
> From: Christian Göttsche <cgzones@...glemail.com>
>
> Add the four syscalls setxattrat(), getxattrat(), listxattrat() and
> removexattrat(). Those can be used to operate on extended attributes,
> especially security related ones, either relative to a pinned directory
> or on a file descriptor without read access, avoiding a
> /proc/<pid>/fd/<fd> detour, requiring a mounted procfs.
>
> One use case will be setfiles(8) setting SELinux file contexts
> ("security.selinux") without race conditions and without a file
> descriptor opened with read access requiring SELinux read permission.
>
> Use the do_{name}at() pattern from fs/open.c.
>
> Pass the value of the extended attribute, its length, and for
> setxattrat(2) the command (XATTR_CREATE or XATTR_REPLACE) via an added
> struct xattr_args to not exceed six syscall arguments and not
> merging the AT_* and XATTR_* flags.
>
> Signed-off-by: Christian Göttsche <cgzones@...glemail.com>
> CC: x86@...nel.org
> CC: linux-alpha@...r.kernel.org
> CC: linux-kernel@...r.kernel.org
> CC: linux-arm-kernel@...ts.infradead.org
> CC: linux-ia64@...r.kernel.org
> CC: linux-m68k@...ts.linux-m68k.org
> CC: linux-mips@...r.kernel.org
> CC: linux-parisc@...r.kernel.org
> CC: linuxppc-dev@...ts.ozlabs.org
> CC: linux-s390@...r.kernel.org
> CC: linux-sh@...r.kernel.org
> CC: sparclinux@...r.kernel.org
> CC: linux-fsdevel@...r.kernel.org
> CC: audit@...r.kernel.org
> CC: linux-arch@...r.kernel.org
> CC: linux-api@...r.kernel.org
> CC: linux-security-module@...r.kernel.org
> CC: selinux@...r.kernel.org
I checked that the syscalls are all well-formed regarding
argument types, number of arguments and (absence of)
compat handling, and that they are wired up correctly
across architectures
I did not look at the actual implementation in detail.
Reviewed-by: Arnd Bergmann <arnd@...db.de>
Powered by blists - more mailing lists