Re: [PATCH v2] eventfs: Fix file and directory uid and gid ownership

2023-12-21 Thread Google
13:12 filter > -r--r- 1 root root 0 Dec 21 13:12 format > -r--r- 1 root root 0 Dec 21 13:12 hist > -r--r- 1 root root 0 Dec 21 13:12 id > -rw-r- 1 root root 0 Dec 21 13:12 trigger > > (b) When the attr does not denote the UID or GID, it defaulted to using >

[PATCH v2] eventfs: Fix file and directory uid and gid ownership

2023-12-21 Thread Steven Rostedt
e attr does not denote the UID or GID, it defaulted to using the parent uid or gid. This is incorrect as changing the parent uid or gid will automatically change all its children. # chgrp tracing /mnt/events/timer # ls -ld /mnt/events/timer drwxr-xr-x 2 root tracing 0 Dec 21 14:34 /m

[PATCH] eventfs: Fix file and directory uid and gid ownership

2023-12-21 Thread Steven Rostedt
e attr does not denote the UID or GID, it defaulted to using the parent uid or gid. This is incorrect as changing the parent uid or gid will automatically change all its children. # chgrp tracing /mnt/events/timer # ls -ld /mnt/events/timer drwxr-xr-x 2 root tracing 0 Dec 21 14:34 /m

Re: [PATCH] eventfs: Have event files and directories default to parent uid and gid

2023-12-21 Thread Google
s_attr > *attr, umode_t mode) > +static void update_inode_attr(struct dentry *dentry, struct inode *inode, > + struct eventfs_attr *attr, umode_t mode) > { > if (!attr) { > inode->i_mode = mode; > @@ -162,9 +163,13 @

Re: [PATCH] eventfs: Have event files and directories default to parent uid and gid

2023-12-20 Thread Steven Rostedt
>i_mode = mode; > @@ -162,9 +163,13 @@ static void update_inode_attr(struct inode *inode, > struct eventfs_attr *attr, um > > if (attr->mode & EVENTFS_SAVE_UID) > inode->i_uid = attr->uid; > + else > + inode->i_uid = d_in

[PATCH] eventfs: Have event files and directories default to parent uid and gid

2023-12-20 Thread Steven Rostedt
mp; EVENTFS_SAVE_UID) inode->i_uid = attr->uid; + else + inode->i_uid = d_inode(dentry->d_parent)->i_uid; if (attr->mode & EVENTFS_SAVE_GID) inode->i_gid = attr->gid; + else + inode->i_gid = d_inode(d

Re: [PATCH v3.4] capabilities: require CAP_SETFCAP to map uid 0

2021-04-20 Thread Linus Torvalds
On Tue, Apr 20, 2021 at 9:47 AM Christian Brauner wrote: > > If there's no objections then Linus can probably just pick up the single > patch here directly: I'm ok with that assuming I don't hear any last-minute concerns.. I'll plan on appling it later today, so anybody with concerns please holl

Re: [PATCH v3.4] capabilities: require CAP_SETFCAP to map uid 0

2021-04-20 Thread Christian Brauner
On Tue, Apr 20, 2021 at 08:43:34AM -0500, Serge Hallyn wrote: > cap_setfcap is required to create file capabilities. > > Since 8db6c34f1dbc ("Introduce v3 namespaced file capabilities"), a > process running as uid 0 but without cap_setfcap is able to work around > this

[PATCH v3.4] capabilities: require CAP_SETFCAP to map uid 0

2021-04-20 Thread Serge E. Hallyn
cap_setfcap is required to create file capabilities. Since 8db6c34f1dbc ("Introduce v3 namespaced file capabilities"), a process running as uid 0 but without cap_setfcap is able to work around this as follows: unshare a new user namespace which maps parent uid 0 into the child namespa

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.2)

2021-04-20 Thread Serge E. Hallyn
In the parent user namespace all the capabilities are kept > and AFAIK Docker does the same. I'd expect a change in behavior only > for nested user namespaces in containers where CAP_SETFCAP is not > granted, but that is not a common configuration given that CAP_SETFCAP > is added by

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.3)

2021-04-20 Thread Christian Brauner
; > > > Since 8db6c34f1dbc ("Introduce v3 namespaced file capabilities"), a > > > process running as uid 0 but without cap_setfcap is able to work around > > > this as follows: unshare a new user namespace which maps parent uid 0 > > > into the child namespace.

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.3)

2021-04-19 Thread Serge E. Hallyn
On Mon, Apr 19, 2021 at 06:09:11PM +0200, Christian Brauner wrote: > On Mon, Apr 19, 2021 at 07:25:14AM -0500, Serge Hallyn wrote: > > cap_setfcap is required to create file capabilities. > > > > Since 8db6c34f1dbc ("Introduce v3 namespaced file capabilities"), a &

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.3)

2021-04-19 Thread Christian Brauner
On Mon, Apr 19, 2021 at 07:25:14AM -0500, Serge Hallyn wrote: > cap_setfcap is required to create file capabilities. > > Since 8db6c34f1dbc ("Introduce v3 namespaced file capabilities"), a > process running as uid 0 but without cap_setfcap is able to work around > this

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.2)

2021-04-19 Thread Christian Brauner
is added by default. Same for us and we do have extensive nested container workloads with other runtimes running containers too. > > > > "Serge E. Hallyn" writes: > > > >> +/** > >> + * verify_root_map() - check the uid 0 mapping > >> + * @file: idmapping

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.2)

2021-04-19 Thread Giuseppe Scrivano
P is not granted, but that is not a common configuration given that CAP_SETFCAP is added by default. > "Serge E. Hallyn" writes: > >> +/** >> + * verify_root_map() - check the uid 0 mapping >> + * @file: idmapping file >> + * @map_ns: user namespace of the t

[PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.3)

2021-04-19 Thread Serge E. Hallyn
cap_setfcap is required to create file capabilities. Since 8db6c34f1dbc ("Introduce v3 namespaced file capabilities"), a process running as uid 0 but without cap_setfcap is able to work around this as follows: unshare a new user namespace which maps parent uid 0 into the child namespa

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.2)

2021-04-18 Thread Eric W. Biederman
t cause problems as is, I will be surprised. Eric "Serge E. Hallyn" writes: > A process running as uid 0 but without cap_setfcap currently can simply > unshare a new user namespace with uid 0 mapped to 0. While this task > will not have new capabilities against the paren

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.2)

2021-04-18 Thread Christian Brauner
On Sat, Apr 17, 2021 at 03:04:34PM -0500, Serge Hallyn wrote: > A process running as uid 0 but without cap_setfcap currently can simply > unshare a new user namespace with uid 0 mapped to 0. While this task > will not have new capabilities against the parent namespace, there is > a

RE: [PATCH 1/1] s390/pci: expose a PCI device's UID as its index

2021-04-18 Thread K, Narendra
el.org; linux- > s...@vger.kernel.org > Subject: Re: [PATCH 1/1] s390/pci: expose a PCI device's UID as its index > > > [EXTERNAL EMAIL] > > > > On 4/16/21 7:58 PM, K, Narendra wrote: > >> -Original Message- > >> From: Niklas Schnelle > &g

[PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.2)

2021-04-17 Thread Serge E. Hallyn
A process running as uid 0 but without cap_setfcap currently can simply unshare a new user namespace with uid 0 mapped to 0. While this task will not have new capabilities against the parent namespace, there is a loophole due to the way namespaced file capabilities work. File capabilities valid

Re: [PATCH 1/1] s390/pci: expose a PCI device's UID as its index

2021-04-17 Thread Viktor Mihajlovski
...@vger.kernel.org; linux-s...@vger.kernel.org Subject: Re: [PATCH 1/1] s390/pci: expose a PCI device's UID as its index [EXTERNAL EMAIL] On Wed, 2021-04-14 at 15:17 -0500, Bjorn Helgaas wrote: On Mon, Apr 12, 2021 at 03:59:05PM +0200, Niklas Schnelle wrote: On s390 each PCI device has a

Re: [RFC PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3)

2021-04-16 Thread Serge E. Hallyn
ch. > > > v4 is at > > > https://git.kernel.org/pub/scm/linux/kernel/git/sergeh/linux.git/log/?h=2021-04-15/setfcap-nsfscaps-v4 > > > and is the approach you suggested. I can send it also as a separate patch > > > if you like) > > > > > >

Re: [RFC PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3)

2021-04-16 Thread Serge E. Hallyn
rgeh/linux.git/log/?h=2021-04-15/setfcap-nsfscaps-v4 > > and is the approach you suggested. I can send it also as a separate patch > > if you like) > > > > A process running as uid 0 but without cap_setfcap currently can simply > > unshare a new user namespace with ui

RE: [PATCH 1/1] s390/pci: expose a PCI device's UID as its index

2021-04-16 Thread K, Narendra
r.kernel.org; linux-s...@vger.kernel.org > Subject: Re: [PATCH 1/1] s390/pci: expose a PCI device's UID as its index > > > [EXTERNAL EMAIL] > > On Wed, 2021-04-14 at 15:17 -0500, Bjorn Helgaas wrote: > > On Mon, Apr 12, 2021 at 03:59:05PM +0200, Niklas Schnelle wrote: > &

Re: [RFC PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3)

2021-04-16 Thread Christian Brauner
sted. I can send it also as a separate patch > if you like) > > A process running as uid 0 but without cap_setfcap currently can simply > unshare a new user namespace with uid 0 mapped to 0. While this task > will not have new capabilities against the parent namespace, there is

[RFC PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3)

2021-04-15 Thread Serge E. Hallyn
uid 0 but without cap_setfcap currently can simply unshare a new user namespace with uid 0 mapped to 0. While this task will not have new capabilities against the parent namespace, there is a loophole due to the way namespaced file capabilities work. File capabilities valid in userns 1 are

Re: [PATCH 1/1] s390/pci: expose a PCI device's UID as its index

2021-04-15 Thread Niklas Schnelle
On Wed, 2021-04-14 at 15:17 -0500, Bjorn Helgaas wrote: > On Mon, Apr 12, 2021 at 03:59:05PM +0200, Niklas Schnelle wrote: > > On s390 each PCI device has a user-defined ID (UID) exposed under > > /sys/bus/pci/devices//uid. This ID was designed to serve as the PCI > > device&#

Re: [PATCH 1/1] s390/pci: expose a PCI device's UID as its index

2021-04-14 Thread Bjorn Helgaas
On Mon, Apr 12, 2021 at 03:59:05PM +0200, Niklas Schnelle wrote: > On s390 each PCI device has a user-defined ID (UID) exposed under > /sys/bus/pci/devices//uid. This ID was designed to serve as the PCI > device's primary index and to match the device within Linux to the > device

[PATCH 1/1] s390/pci: expose a PCI device's UID as its index

2021-04-12 Thread Niklas Schnelle
On s390 each PCI device has a user-defined ID (UID) exposed under /sys/bus/pci/devices//uid. This ID was designed to serve as the PCI device's primary index and to match the device within Linux to the device configured in the hypervisor. To serve as a primary identifier the UID must be u

[PATCH v19 2/7] KVM: arm64: Advertise KVM UID to guests via SMCCC

2021-03-30 Thread Marc Zyngier
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/202012090609

[PATCH] s390/pci: expose a PCI device's UID as its index

2021-03-15 Thread Niklas Schnelle
On s390 each PCI device has a user-defined ID (UID) exposed under /sys/bus/pci/devices//uid. This ID was designed to serve as the PCI device's primary index and to match the device within Linux to the device configured in the hypervisor. To serve as a primary identifier the UID must be u

Re: [RFC 1/1] s390/pci: expose a PCI device's UID as its index

2021-03-08 Thread Viktor Mihajlovski
)); + u32 index = ~0; + + if (zpci_unique_uid) + index = zdev->uid; + + return sprintf(buf, "%u\n", index); [...] Would it be possible to use the new sysfs_emit() rather than sprintf() even though the zpci_attr macro and still use mio_enabled_show() still woul

Re: [RFC 1/1] s390/pci: expose a PCI device's UID as its index

2021-03-07 Thread Niklas Schnelle
t; +u32 index = ~0; >> + >> +if (zpci_unique_uid) >> +index = zdev->uid; >> + >> +return sprintf(buf, "%u\n", index); > [...] > > Would it be possible to use the new sysfs_emit() rather than sprintf() > even though the zp

Re: [RFC 1/1] s390/pci: expose a PCI device's UID as its index

2021-03-07 Thread Krzysztof Wilczyński
Hi Niklas, [...] > +static ssize_t index_show(struct device *dev, > + struct device_attribute *attr, char *buf) > +{ > + struct zpci_dev *zdev = to_zpci(to_pci_dev(dev)); > + u32 index = ~0; > + > + if (zpci_unique_uid) > +

[RFC 0/1] s390/pci: expose a PCI device's UID as its index

2021-03-03 Thread Niklas Schnelle
Hi, On s390 each PCI device has a user-defined ID (UID). This ID was designed to serve as the PCI device's primary index and to match the device within Linux to the with the view in the hypervisor configuration. To serve as a primary identifier the UID must be unique within the Linux ins

[RFC 1/1] s390/pci: expose a PCI device's UID as its index

2021-03-03 Thread Niklas Schnelle
On s390 each PCI device has a user-defined ID (UID) exposed under /sys/bus/pci/devices//uid. This ID was designed to serve as the PCI device's primary index and to match the device within Linux to the device configured in the hypervisor. To serve as a primary identifier the UID must be u

[PATCH v2 06/17] KVM: arm64: Advertise KVM UID to guests via SMCCC

2021-02-08 Thread Gavin Shan
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Signed-off-by: Will Deacon Signed-off-by: Gavin Shan --- arch/arm64/kvm/hypercalls.c | 27 ++- 1 file changed, 18 insert

[PATCH v18 2/7] KVM: arm64: Advertise KVM UID to guests via SMCCC

2021-02-08 Thread Marc Zyngier
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/202012090609

Re: [RFC v2 1/1] PCI: Add s390 specific UID uniqueness attribute

2021-02-04 Thread Niklas Schnelle
On 2/4/21 2:38 PM, Greg Kroah-Hartman wrote: > On Thu, Feb 04, 2021 at 01:02:51PM +0100, Niklas Schnelle wrote: >> >> >> On 2/4/21 11:40 AM, Greg Kroah-Hartman wrote: >>> On Thu, Feb 04, 2021 at 10:43:53AM +0100, Niklas Schnelle wrote: >>>> The globa

Re: [RFC v2 1/1] PCI: Add s390 specific UID uniqueness attribute

2021-02-04 Thread Greg Kroah-Hartman
On Thu, Feb 04, 2021 at 01:02:51PM +0100, Niklas Schnelle wrote: > > > On 2/4/21 11:40 AM, Greg Kroah-Hartman wrote: > > On Thu, Feb 04, 2021 at 10:43:53AM +0100, Niklas Schnelle wrote: > >> The global UID uniqueness attribute exposes whether the platform > >>

Re: [RFC v2 1/1] PCI: Add s390 specific UID uniqueness attribute

2021-02-04 Thread Niklas Schnelle
On 2/4/21 11:40 AM, Greg Kroah-Hartman wrote: > On Thu, Feb 04, 2021 at 10:43:53AM +0100, Niklas Schnelle wrote: >> The global UID uniqueness attribute exposes whether the platform >> guarantees that the user-defined per-device UID attribute values >> (/sys/bus/pci/device

Re: [RFC v2 1/1] PCI: Add s390 specific UID uniqueness attribute

2021-02-04 Thread Greg Kroah-Hartman
On Thu, Feb 04, 2021 at 10:43:53AM +0100, Niklas Schnelle wrote: > The global UID uniqueness attribute exposes whether the platform > guarantees that the user-defined per-device UID attribute values > (/sys/bus/pci/device//uid) are unique and can thus be used as > a global identi

[RFC v2 1/1] PCI: Add s390 specific UID uniqueness attribute

2021-02-04 Thread Niklas Schnelle
The global UID uniqueness attribute exposes whether the platform guarantees that the user-defined per-device UID attribute values (/sys/bus/pci/device//uid) are unique and can thus be used as a global identifier for the associated PCI device. With this commit it is exposed at /sys/bus/pci/zpci

[RFC v2 0/1] s390/pci: expose UID checking state in sysfs

2021-02-04 Thread Niklas Schnelle
Hi Bjorn, this is a follow-up to my previous RFC of exposing our s390 specific UID Checking attribute at /sys/bus/pci/zpci/unique_uids. As suggested by Greg (thanks!) this version changes things to use named attributes directly without resorting to any raw kobject handling, as a result the code

[PATCH v17 2/7] KVM: arm64: Advertise KVM UID to guests via SMCCC

2021-02-02 Thread Marc Zyngier
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/202012090609

Re: [PATCH] configfs: make directories inherit uid/gid from creator

2021-01-27 Thread Maciej Żenczykowski
> > Currently a non-root process can create directories, but cannot > > create stuff in the directories it creates. > > Isn't that on purpose? Is it? What's the use case of being able to create empty directories you can't use? Why allow their creation in the first place then? > > + (

Re: [PATCH] configfs: make directories inherit uid/gid from creator

2021-01-27 Thread Greg Kroah-Hartman
On Sat, Jan 23, 2021 at 12:55:16PM -0800, Maciej Żenczykowski wrote: > From: Maciej Żenczykowski > > Currently a non-root process can create directories, but cannot > create stuff in the directories it creates. Isn't that on purpose? > > Example (before this patch): &

Re: [PATCH 1/2] ecryptfs: fix uid translation for setxattr on security.capability

2021-01-26 Thread Tyler Hicks
On 2021-01-25 14:25:38, Miklos Szeredi wrote: > On Fri, Jan 22, 2021 at 7:31 PM Tyler Hicks wrote: > > > > On 2021-01-19 17:22:03, Miklos Szeredi wrote: > > > Prior to commit 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into > > > vfs_setxattr()") the translation of nscap->rootid did not take

Re: [PATCH 1/2] ecryptfs: fix uid translation for setxattr on security.capability

2021-01-25 Thread Miklos Szeredi
fy that the bug exists after > > 7c03e2cda4a5 and then again to verify that this patch fixes the bug? > > You need two terminals: > $ = > # = root > > $ unshare -Um > $ echo $$ > > # echo "0 1000 1" > uid_map NOTE: is assumed to have uid=1000, so this and following "1000" values need to be fixed up if it's not the case. Thanks, Miklos

Re: [PATCH 1/2] ecryptfs: fix uid translation for setxattr on security.capability

2021-01-25 Thread Miklos Szeredi
On Fri, Jan 22, 2021 at 7:31 PM Tyler Hicks wrote: > > On 2021-01-19 17:22:03, Miklos Szeredi wrote: > > Prior to commit 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into > > vfs_setxattr()") the translation of nscap->rootid did not take stacked > > filesystems (overlayfs and ecryptfs) into a

[PATCH] configfs: make directories inherit uid/gid from creator

2021-01-23 Thread Maciej Żenczykowski
From: Maciej Żenczykowski Currently a non-root process can create directories, but cannot create stuff in the directories it creates. Example (before this patch): phone:/ $ id uid=1000(system) gid=1000(system) groups=1000(system),... context=u:r:su:s0 phone:/ $ cd /config/usb_gadget/g1

Re: [PATCH 1/2] ecryptfs: fix uid translation for setxattr on security.capability

2021-01-22 Thread Tyler Hicks
On 2021-01-19 17:22:03, Miklos Szeredi wrote: > Prior to commit 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into > vfs_setxattr()") the translation of nscap->rootid did not take stacked > filesystems (overlayfs and ecryptfs) into account. > > That patch fixed the overlay case, but made the e

Re: [PATCH 1/2] ecryptfs: fix uid translation for setxattr on security.capability

2021-01-22 Thread Tyler Hicks
On 2021-01-20 08:52:27, Miklos Szeredi wrote: > On Tue, Jan 19, 2021 at 10:11 PM Eric W. Biederman > wrote: > > > > Miklos Szeredi writes: > > > > > Prior to commit 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into > > > vfs_setxattr()") the translation of nscap->rootid did not take stacked

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-21 Thread Niklas Schnelle
On 1/21/21 6:28 PM, Greg Kroah-Hartman wrote: > On Thu, Jan 21, 2021 at 06:04:52PM +0100, Niklas Schnelle wrote: >> >> >> On 1/21/21 4:54 PM, Bjorn Helgaas wrote: >>> [Greg may be able to help compare/contrast this s390 UID with udev >>> persistent names

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-21 Thread Greg Kroah-Hartman
On Thu, Jan 21, 2021 at 06:04:52PM +0100, Niklas Schnelle wrote: > > > On 1/21/21 4:54 PM, Bjorn Helgaas wrote: > > [Greg may be able to help compare/contrast this s390 UID with udev > > persistent names] > > > > On Thu, Jan 21, 2021 at 04:31:55PM +0100, Niklas

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-21 Thread Niklas Schnelle
On 1/21/21 4:54 PM, Bjorn Helgaas wrote: > [Greg may be able to help compare/contrast this s390 UID with udev > persistent names] > > On Thu, Jan 21, 2021 at 04:31:55PM +0100, Niklas Schnelle wrote: >> On 1/15/21 4:29 PM, Bjorn Helgaas wrote: >>> On Fri, Jan 1

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-21 Thread Bjorn Helgaas
[Greg may be able to help compare/contrast this s390 UID with udev persistent names] On Thu, Jan 21, 2021 at 04:31:55PM +0100, Niklas Schnelle wrote: > On 1/15/21 4:29 PM, Bjorn Helgaas wrote: > > On Fri, Jan 15, 2021 at 12:20:59PM +0100, Niklas Schnelle wrote: > >> On 1/14/21 5

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-21 Thread Greg Kroah-Hartman
On Thu, Jan 21, 2021 at 09:54:45AM -0600, Bjorn Helgaas wrote: > [Greg may be able to help compare/contrast this s390 UID with udev > persistent names] > > On Thu, Jan 21, 2021 at 04:31:55PM +0100, Niklas Schnelle wrote: > > On 1/15/21 4:29 PM, Bjorn Helgaas wrote: > > &

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-21 Thread Niklas Schnelle
; too. >> >> That said, I think we could also add something like >> bus_create_group(). Then we could use that to also clean up >> drivers/pci/slot.c:pci_slot_init() and get the original path >> /sys/bus/pci/zpci/uid_checking. > > I don't think "uid_checking&q

Re: [PATCH 1/2] ecryptfs: fix uid translation for setxattr on security.capability

2021-01-19 Thread Miklos Szeredi
On Tue, Jan 19, 2021 at 10:11 PM Eric W. Biederman wrote: > > Miklos Szeredi writes: > > > Prior to commit 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into > > vfs_setxattr()") the translation of nscap->rootid did not take stacked > > filesystems (overlayfs and ecryptfs) into account. > > >

Re: [PATCH 1/2] ecryptfs: fix uid translation for setxattr on security.capability

2021-01-19 Thread Eric W. Biederman
Miklos Szeredi writes: > Prior to commit 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into > vfs_setxattr()") the translation of nscap->rootid did not take stacked > filesystems (overlayfs and ecryptfs) into account. > > That patch fixed the overlay case, but made the ecryptfs case worse. >

[PATCH 1/2] ecryptfs: fix uid translation for setxattr on security.capability

2021-01-19 Thread Miklos Szeredi
Prior to commit 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into vfs_setxattr()") the translation of nscap->rootid did not take stacked filesystems (overlayfs and ecryptfs) into account. That patch fixed the overlay case, but made the ecryptfs case worse. Restore old the behavior for ecrypt

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-15 Thread Niklas Schnelle
above again, with a simple attribute group, and name for it, and >>> it should "just work". >> >> I'm probably missing something but I don't get how this could work >> in this case. If I'm seeing this right the default attribute group >> he

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-15 Thread Bjorn Helgaas
j, > >> &zpci_attr_group_global); > > > > Huge hint, if in a driver, or bus subsystem, and you call sysfs_*, > > that's usually a huge clue that you are doing something wrong. > > > > Try the above again, with a simple attribute group, and name

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-15 Thread Greg Kroah-Hartman
On Fri, Jan 15, 2021 at 12:20:59PM +0100, Niklas Schnelle wrote: > > > On 1/14/21 5:14 PM, Greg Kroah-Hartman wrote: > > On Thu, Jan 14, 2021 at 04:51:17PM +0100, Niklas Schnelle wrote: > >> > >> > >> On 1/14/21 4:17 PM, Greg Kroah-Hartman wrote: > >>> On Thu, Jan 14, 2021 at 04:06:11PM +0100, Ni

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-15 Thread Niklas Schnelle
On 1/14/21 5:14 PM, Greg Kroah-Hartman wrote: > On Thu, Jan 14, 2021 at 04:51:17PM +0100, Niklas Schnelle wrote: >> >> >> On 1/14/21 4:17 PM, Greg Kroah-Hartman wrote: >>> On Thu, Jan 14, 2021 at 04:06:11PM +0100, Niklas Schnelle wrote: On 1/14/21 2:58 PM, Greg Kroah-Hartman wrote

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-14 Thread Greg Kroah-Hartman
;>>> On Wed, Jan 13, 2021 at 08:47:58AM +0100, Niklas Schnelle wrote: > >>>>>>> On 1/12/21 10:50 PM, Bjorn Helgaas wrote: > >>>>>>>> On Mon, Jan 11, 2021 at 10:38:57AM +0100, Niklas Schnelle wrote: > >>>>

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-14 Thread Niklas Schnelle
, Jan 14, 2021 at 02:20:10PM +0100, Niklas Schnelle wrote: >>>>> >>>>> >>>>> On 1/13/21 7:55 PM, Bjorn Helgaas wrote: >>>>>> On Wed, Jan 13, 2021 at 08:47:58AM +0100, Niklas Schnelle wrote: >>>>>>> On 1/12/21 10:50 PM

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-14 Thread Greg Kroah-Hartman
;> > >>> > >>> On 1/13/21 7:55 PM, Bjorn Helgaas wrote: > >>>> On Wed, Jan 13, 2021 at 08:47:58AM +0100, Niklas Schnelle wrote: > >>>>> On 1/12/21 10:50 PM, Bjorn Helgaas wrote: > >>>>>> On Mon, Jan 11, 2021 at 10:38

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-14 Thread Niklas Schnelle
On Wed, Jan 13, 2021 at 08:47:58AM +0100, Niklas Schnelle wrote: >>>>> On 1/12/21 10:50 PM, Bjorn Helgaas wrote: >>>>>> On Mon, Jan 11, 2021 at 10:38:57AM +0100, Niklas Schnelle wrote: >>>>>>> We use the UID of a zPCI adapter, or the UID of the functio

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-14 Thread Greg Kroah-Hartman
; > >> On 1/12/21 10:50 PM, Bjorn Helgaas wrote: > > >>> On Mon, Jan 11, 2021 at 10:38:57AM +0100, Niklas Schnelle wrote: > > >>>> We use the UID of a zPCI adapter, or the UID of the function zero if > > >>>> there are multiple funct

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-14 Thread Christian Brauner
at 10:38:57AM +0100, Niklas Schnelle wrote: > >>>> We use the UID of a zPCI adapter, or the UID of the function zero if > >>>> there are multiple functions in an adapter, as PCI domain if and only if > >>>> UID Checking is turned on. > >>>&g

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-14 Thread Niklas Schnelle
On 1/13/21 7:55 PM, Bjorn Helgaas wrote: > On Wed, Jan 13, 2021 at 08:47:58AM +0100, Niklas Schnelle wrote: >> On 1/12/21 10:50 PM, Bjorn Helgaas wrote: >>> On Mon, Jan 11, 2021 at 10:38:57AM +0100, Niklas Schnelle wrote: >>>> We use the UID of a zPCI adapter, or t

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-13 Thread Bjorn Helgaas
On Wed, Jan 13, 2021 at 08:47:58AM +0100, Niklas Schnelle wrote: > On 1/12/21 10:50 PM, Bjorn Helgaas wrote: > > On Mon, Jan 11, 2021 at 10:38:57AM +0100, Niklas Schnelle wrote: > >> We use the UID of a zPCI adapter, or the UID of the function zero if > >> there a

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-12 Thread Niklas Schnelle
On 1/12/21 10:50 PM, Bjorn Helgaas wrote: > On Mon, Jan 11, 2021 at 10:38:57AM +0100, Niklas Schnelle wrote: >> We use the UID of a zPCI adapter, or the UID of the function zero if >> there are multiple functions in an adapter, as PCI domain if and only if >> UID

Re: [RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-12 Thread Bjorn Helgaas
On Mon, Jan 11, 2021 at 10:38:57AM +0100, Niklas Schnelle wrote: > We use the UID of a zPCI adapter, or the UID of the function zero if > there are multiple functions in an adapter, as PCI domain if and only if > UID Checking is turned on. > Otherwise we automatically generate domain

[RFC 0/1] PCI: s390 global attribute "UID Checking"

2021-01-11 Thread Niklas Schnelle
Hi Bjorn, Hi Kernel Hackers, With the below patch I'm proposing to expose a global (i.e. not device bound) runtime attribute of the s390 PCI implementation (zPCI) called "UID Checking". You can find some background information on what this attribute means and why it is importan

[RFC 1/1] s390/pci: expose UID checking state in sysfs

2021-01-11 Thread Niklas Schnelle
We use the UID of a zPCI adapter, or the UID of the function zero if there are multiple functions in an adapter, as PCI domain if and only if UID Checking is turned on. Otherwise we automatically generate domains as devices appear. The state of UID Checking is thus essential to know if the PCI

[PATCH v16 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-12-08 Thread Jianyong Wu
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu --- arch/arm64/kvm/hypercalls.c | 27 ++- 1 file

[PATCH v15 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-11-10 Thread Jianyong Wu
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu --- arch/arm64/kvm/hypercalls.c | 27 ++- 1 file

[PATCH v14 02/10] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-09-04 Thread Jianyong Wu
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu --- arch/arm64/kvm/hypercalls.c | 29 +++-- 1 fi

Re: [PATCH v13 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-08-20 Thread Will Deacon
cs.columbia.edu; > > k...@vger.kernel.org; Steve Capper ; Kaly Xin > > ; Justin He ; Wei Chen > > ; nd > > Subject: Re: [PATCH v13 2/9] arm/arm64: KVM: Advertise KVM UID to guests > > via SMCCC > > > > On Mon, Jul 27, 2020 at 03:45:37AM +, Jianyong Wu wrote

[RFC PATCH 21/30] user namespace: Add function that checks if the UID map is defined

2020-08-18 Thread krzysztof.struczynski
From: Krzysztof Struczynski Add function that checks if the UID map is defined. It will be used by ima to check if ID remapping in subject-based rules is necessary. Signed-off-by: Krzysztof Struczynski --- include/linux/user_namespace.h | 6 ++ kernel/user_namespace.c| 11

RE: [PATCH v13 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-07-27 Thread Jianyong Wu
TCH v13 2/9] arm/arm64: KVM: Advertise KVM UID to guests > via SMCCC > > On Mon, Jul 27, 2020 at 03:45:37AM +, Jianyong Wu wrote: > > > From: Will Deacon > > > > > > We can advertise ourselves to guests as KVM and provide a basic > > > features

Re: [PATCH v13 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-07-27 Thread Will Deacon
7;re right that this is a bug, but isn't the solution just to make that an array of 'long'? long val [4]; That will sign-extend the negative error codes as required, while leaving the explicitly unsigned UID constants alone. Will

RE: [PATCH v13 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-07-26 Thread Jianyong Wu
d > Subject: [PATCH v13 2/9] arm/arm64: KVM: Advertise KVM UID to guests via > SMCCC > > From: Will Deacon > > We can advertise ourselves to guests as KVM and provide a basic features > bitmap for discoverability of future hypervisor services. > > Cc: Marc Z

[RFC PATCH 2/5] keys: Replace uid/gid/perm permissions checking with an ACL

2020-07-16 Thread David Howells
Replace the uid/gid/perm permissions checking on a key with an ACL to allow the SETATTR and SEARCH permissions to be split. This will also allow a greater range of subjects to represented. Define a KEYCTL_CAPS_ACL capabilities bit to indicate if the kernel has this change applied

[PATCH 5.7 145/265] soc: imx8m: Correct i.MX8MP UID fuse offset

2020-06-29 Thread Sasha Levin
From: Anson Huang [ Upstream commit c95c9693b112f312b59c5d100fd09a1349970fab ] Correct i.MX8MP UID fuse offset according to fuse map: UID_LOW: 0x420 UID_HIGH: 0x430 Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver") Fixes: 18f662a73862 ("soc: imx:

Re: [PATCH V3] soc: imx8m: Correct i.MX8MP UID fuse offset

2020-06-23 Thread Shawn Guo
On Wed, Jun 10, 2020 at 06:03:02PM +0800, Anson Huang wrote: > Correct i.MX8MP UID fuse offset according to fuse map: > > UID_LOW: 0x420 > UID_HIGH: 0x430 > > Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver") > Fixes: 18f662a73862 (&q

[PATCH v13 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-06-19 Thread Jianyong Wu
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu --- arch/arm64/kvm/hypercalls.c | 29 +++-- 1 fi

[RFC PATCH v13 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-06-19 Thread Jianyong Wu
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu --- arch/arm64/kvm/hypercalls.c | 29 +++-- 1 fi

Re: [PATCH V3] soc: imx8m: Correct i.MX8MP UID fuse offset

2020-06-10 Thread Iuliana Prodan
On 6/10/2020 1:03 PM, Anson Huang wrote: Correct i.MX8MP UID fuse offset according to fuse map: UID_LOW: 0x420 UID_HIGH: 0x430 Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver") Fixes: 18f662a73862 ("soc: imx: Add i.MX8MP SoC driver support")

[PATCH V3] soc: imx8m: Correct i.MX8MP UID fuse offset

2020-06-10 Thread Anson Huang
Correct i.MX8MP UID fuse offset according to fuse map: UID_LOW: 0x420 UID_HIGH: 0x430 Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver") Fixes: 18f662a73862 ("soc: imx: Add i.MX8MP SoC driver support") Signed-off-by: Anson Huang --- Changes sin

RE: [PATCH V2] soc: imx8m: Correct i.MX8MP UID fuse offset

2020-06-10 Thread Anson Huang
Hi, Luliana > Subject: Re: [PATCH V2] soc: imx8m: Correct i.MX8MP UID fuse offset > > > > On 6/10/2020 10:57 AM, Anson Huang wrote: > > > >> Subject: RE: [PATCH V2] soc: imx8m: Correct i.MX8MP UID fuse offset > >> > >>> From: Anson

Re: [PATCH V2] soc: imx8m: Correct i.MX8MP UID fuse offset

2020-06-10 Thread Iuliana Prodan
On 6/10/2020 10:57 AM, Anson Huang wrote: Subject: RE: [PATCH V2] soc: imx8m: Correct i.MX8MP UID fuse offset From: Anson Huang Sent: Wednesday, June 10, 2020 6:42 AM Correct i.MX8MP UID fuse offset according to fuse map: UID_LOW: 0x420 UID_HIGH: 0x430 Fixes: fc40200ebf82 ("soc

RE: [PATCH V2] soc: imx8m: Correct i.MX8MP UID fuse offset

2020-06-10 Thread Anson Huang
> Subject: RE: [PATCH V2] soc: imx8m: Correct i.MX8MP UID fuse offset > > > From: Anson Huang > > Sent: Wednesday, June 10, 2020 6:42 AM > > > > Correct i.MX8MP UID fuse offset according to fuse map: > > > > UID_LOW: 0x420 > > UID_HIGH: 0x430

RE: [PATCH V2] soc: imx8m: Correct i.MX8MP UID fuse offset

2020-06-10 Thread Aisheng Dong
> From: Anson Huang > Sent: Wednesday, June 10, 2020 6:42 AM > > Correct i.MX8MP UID fuse offset according to fuse map: > > UID_LOW: 0x420 > UID_HIGH: 0x430 > > Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver") AFAIK "

[PATCH V2] soc: imx8m: Correct i.MX8MP UID fuse offset

2020-06-09 Thread Anson Huang
Correct i.MX8MP UID fuse offset according to fuse map: UID_LOW: 0x420 UID_HIGH: 0x430 Fixes: fc40200ebf82 ("soc: imx: increase build coverage for imx8m soc driver") Signed-off-by: Anson Huang --- Changes since V1: - add fix tag. --- drivers/soc/imx/soc-imx8m.c | 8 ++

RE: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset

2020-06-09 Thread Anson Huang
Hi, Luliana > Subject: RE: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset > > Hi, Luliana > > > > Subject: Re: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset > > > > > > > > On 6/9/2020 4:15 PM, Anson Huang wrote: > > >

RE: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset

2020-06-09 Thread Anson Huang
Hi, Luliana > Subject: Re: [PATCH] soc: imx8m: Correct i.MX8MP UID fuse offset > > > > On 6/9/2020 4:15 PM, Anson Huang wrote: > > Correct i.MX8MP UID fuse offset according to fuse map: > > > > UID_LOW: 0x420 > > UID_HIGH: 0x430 > > > > Sign

  1   2   3   4   5   6   7   >