Re: [PATCH v5 4/4] vduse: Add LSM hook to check Virtio device type

2023-12-15 Thread Serge E. Hallyn
On Tue, Dec 12, 2023 at 02:55:33PM -0800, Casey Schaufler wrote: > On 12/12/2023 9:59 AM, Michael S. Tsirkin wrote: > > On Tue, Dec 12, 2023 at 08:33:39AM -0800, Casey Schaufler wrote: > >> On 12/12/2023 5:17 AM, Maxime Coquelin wrote: > >>> This patch introduces a LSM hook for devices creation, >

[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 namespace. While

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

2021-04-20 Thread Serge E. Hallyn
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 default. > >

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 > > process running as uid 0 but

[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 namespace. While

[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: [RFC PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3)

2021-04-16 Thread Serge E. Hallyn
On Fri, Apr 16, 2021 at 04:34:53PM -0500, Serge E. Hallyn wrote: > On Fri, Apr 16, 2021 at 05:05:01PM +0200, Christian Brauner wrote: > > On Thu, Apr 15, 2021 at 11:58:51PM -0500, Serge Hallyn wrote: > > > (Eric - this patch (v3) is a cleaned up version of the previous

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

2021-04-16 Thread Serge E. Hallyn
On Fri, Apr 16, 2021 at 05:05:01PM +0200, Christian Brauner wrote: > On Thu, Apr 15, 2021 at 11:58:51PM -0500, Serge Hallyn wrote: > > (Eric - this patch (v3) is a cleaned up version of the previous approach. > > v4 is at > >

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

2021-04-15 Thread Serge E. Hallyn
(Eric - this patch (v3) is a cleaned up version of the previous approach. 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) A process running as

Re: [PATCH] security: commoncap: clean up kernel-doc comments

2021-04-12 Thread Serge E. Hallyn
On Sun, Apr 11, 2021 at 05:55:28PM -0700, Randy Dunlap wrote: > Fix kernel-doc notation in commoncap.c. > > Use correct (matching) function name in comments as in code. > Use correct function argument names in kernel-doc comments. > Use kernel-doc's "Return:" format for function return values. >

Re: [PATCH] kernel: automatically split user namespace extent

2021-04-02 Thread Serge E. Hallyn
On Wed, Dec 02, 2020 at 05:12:27PM +0100, Giuseppe Scrivano wrote: > Hi Eric, > > ebied...@xmission.com (Eric W. Biederman) writes: > > > Nit: The tag should have been "userns:" rather than kernel. > > > > Giuseppe Scrivano writes: > > > >> writing to the id map fails when an extent overlaps

Re: [PATCH v1 3/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys

2021-04-01 Thread Serge E. Hallyn
On Wed, Mar 24, 2021 at 09:14:02AM -0700, James Bottomley wrote: > On Tue, 2021-03-23 at 14:07 -0400, Mimi Zohar wrote: > > On Tue, 2021-03-23 at 17:35 +0100, Ahmad Fatoum wrote: > > > Hello Horia, > > > > > > On 21.03.21 21:48, Horia Geantă wrote: > > > > On 3/16/2021 7:02 PM, Ahmad Fatoum

Re: [PATCH v28 07/12] landlock: Support filesystem access-control

2021-02-19 Thread Serge E. Hallyn
On Wed, Feb 10, 2021 at 09:17:25PM +0100, Mickaël Salaün wrote: > > On 10/02/2021 20:36, Serge E. Hallyn wrote: > > On Tue, Feb 02, 2021 at 05:27:05PM +0100, Mickaël Salaün wrote: > >> From: Mickaël Salaün > >> > >> Thanks to the Landlock objects

Re: [PATCH v28 07/12] landlock: Support filesystem access-control

2021-02-10 Thread Serge E. Hallyn
On Tue, Feb 02, 2021 at 05:27:05PM +0100, Mickaël Salaün wrote: > From: Mickaël Salaün > > Thanks to the Landlock objects and ruleset, it is possible to identify > inodes according to a process's domain. To enable an unprivileged This throws me off a bit. "identify inodes according to a

Re: [PATCH v28 06/12] fs,security: Add sb_delete hook

2021-02-06 Thread Serge E. Hallyn
On Fri, Feb 05, 2021 at 03:57:37PM +0100, Mickaël Salaün wrote: > > On 05/02/2021 15:21, Serge E. Hallyn wrote: > > On Tue, Feb 02, 2021 at 05:27:04PM +0100, Mickaël Salaün wrote: > >> From: Mickaël Salaün > >> > >> The sb_delete security hook is

Re: [PATCH v28 05/12] LSM: Infrastructure management of the superblock

2021-02-05 Thread Serge E. Hallyn
On Tue, Feb 02, 2021 at 05:27:03PM +0100, Mickaël Salaün wrote: > From: Casey Schaufler > > Move management of the superblock->sb_security blob out of the > individual security modules and into the security infrastructure. > Instead of allocating the blobs from within the modules, the modules >

Re: [PATCH v28 06/12] fs,security: Add sb_delete hook

2021-02-05 Thread Serge E. Hallyn
is new hook is needed by Landlock to release (ephemerally) tagged > struct inodes. This comes from the unprivileged nature of Landlock > described in the next commit. > > Cc: Al Viro > Cc: James Morris > Cc: Kees Cook > Cc: Serge E. Hallyn One note below, but Acked-by: Serg

Re: [PATCH v28 04/12] landlock: Add ptrace restrictions

2021-02-05 Thread Serge E. Hallyn
o additional restrictions when manipulating > processes. To be allowed to use ptrace(2) and related syscalls on a > target process, a landlocked process must have a subset of the target > process's rules (i.e. the tracee must be in a sub-domain of the tracer). > > Cc: James Morris &

Re: [PATCH v28 03/12] landlock: Set up the security framework and manage credentials

2021-02-03 Thread Serge E. Hallyn
system security policies. > A domain is inherited from a parent to its child the same way a thread > inherits a seccomp policy. > > Cc: James Morris > Cc: Kees Cook > Cc: Serge E. Hallyn Acked-by: Serge Hallyn > Signed-off-by: Mickaël Salaün > Reviewed-by: Jann Horn &

Re: [PATCH v28 02/12] landlock: Add ruleset and domain management

2021-02-03 Thread Serge E. Hallyn
nstraints (i.e. lose > accesses) over time. > > Cc: James Morris > Cc: Jann Horn > Cc: Kees Cook > Cc: Serge E. Hallyn Acked-by: Serge Hallyn > Signed-off-by: Mickaël Salaün > --- > > Changes since v27: > * Fix domains with layers of non-overlapping access

Re: [PATCH v28 08/12] landlock: Add syscall implementations

2021-02-03 Thread Serge E. Hallyn
t; > See the user and kernel documentation for more details (provided by a > following commit): > * Documentation/userspace-api/landlock.rst > * Documentation/security/landlock.rst > > Cc: Arnd Bergmann > Cc: James Morris > Cc: Jann Horn > Cc: Kees Cook > Cc: Serge E. H

Re: [PATCH v28 01/12] landlock: Add object management

2021-02-03 Thread Serge E. Hallyn
safely reference > objects. > > A following commit uses this generic object management for inodes. > > Cc: James Morris > Cc: Kees Cook > Cc: Serge E. Hallyn Acked-by: Serge Hallyn Just a few suggestions for the description below. > Signed-off-by: Mickaël S

Re: [PATCH 2/2] security.capability: fix conversions on getxattr

2021-01-30 Thread Serge E. Hallyn
On Fri, Jan 29, 2021 at 04:55:29PM -0600, Eric W. Biederman wrote: > "Serge E. Hallyn" writes: > > > On Thu, Jan 28, 2021 at 02:19:13PM -0600, Eric W. Biederman wrote: > >> "Serge E. Hallyn" writes: > >> > >> > On Tue, Jan 19, 202

Re: [PATCH 2/2] security.capability: fix conversions on getxattr

2021-01-29 Thread Serge E. Hallyn
On Fri, Jan 29, 2021 at 05:11:53PM -0600, Eric W. Biederman wrote: > "Serge E. Hallyn" writes: > > > On Thu, Jan 28, 2021 at 08:44:26PM +0100, Miklos Szeredi wrote: > >> On Thu, Jan 28, 2021 at 6:09 PM Serge E. Hallyn wrote: > >> > > >>

Re: [PATCH 2/2] security.capability: fix conversions on getxattr

2021-01-28 Thread Serge E. Hallyn
On Tue, Jan 19, 2021 at 07:34:49PM -0600, Eric W. Biederman wrote: > Miklos Szeredi writes: > > > If a capability is stored on disk in v2 format cap_inode_getsecurity() will > > currently return in v2 format unconditionally. > > > > This is wrong: v2 cap should be equivalent to a v3 cap with

Re: [PATCH] fix namespaced fscaps when !CONFIG_SECURITY

2020-12-05 Thread Serge E. Hallyn
Oh, I see you'd changed it inline :) Thanks On Sat, Dec 05, 2020 at 11:40:00AM -0600, Serge E. Hallyn wrote: > How odd - where did that come from? > > James, I force-pushed that with corrected bugzilla link to > 2020-11-29/fix-nscaps. Sorry about that. > > On Fri, Dec 04,

Re: [PATCH] fix namespaced fscaps when !CONFIG_SECURITY

2020-12-05 Thread Serge E. Hallyn
w_bug.cgi?id=209689 > > Reviewed-by: Andrew G. Morgan > > On Mon, Nov 30, 2020 at 6:58 PM James Morris wrote: > > > > On Sun, 29 Nov 2020, Serge E. Hallyn wrote: > > > > > Hi James, > > > > > > would you mind adding this to the security t

Re: [PATCH] fix namespaced fscaps when !CONFIG_SECURITY

2020-11-29 Thread Serge E. Hallyn
w G. Morgan > > > On Tue, Nov 17, 2020 at 7:09 AM Serge E. Hallyn wrote: > > > Namespaced file capabilities were introduced in 8db6c34f1dbc . > > When userspace reads an xattr for a namespaced capability, a > > virtualized representation of it is returned if the

[PATCH] fix namespaced fscaps when !CONFIG_SECURITY

2020-11-17 Thread Serge E. Hallyn
Namespaced file capabilities were introduced in 8db6c34f1dbc . When userspace reads an xattr for a namespaced capability, a virtualized representation of it is returned if the caller is in a user namespace owned by the capability's owning rootid. The function which performs this virtualization was

Re: [RFC PATCH 1/1] security: add fault injection capability

2020-10-15 Thread Serge E. Hallyn
On Thu, Oct 15, 2020 at 10:46:49AM +, Aleksandr Nogikh wrote: > From: Aleksandr Nogikh > > Add a fault injection capability to call_int_hook macro. This will > facilitate testing of fault tolerance of the code that invokes > security hooks as well as the fault tolerance of the LSM >

Re: LPC 2020 Hackroom Session: summary and next steps for isolated user namespaces

2020-10-15 Thread Serge E. Hallyn
On Tue, Oct 13, 2020 at 05:17:36PM +0200, Giuseppe Scrivano wrote: > "Serge E. Hallyn" writes: > > > On Mon, Oct 12, 2020 at 07:05:10PM +0200, Giuseppe Scrivano wrote: > >> Josh Triplett writes: > >> > >> > On Fri, Oct 09, 2020 at 11:26:

Re: LPC 2020 Hackroom Session: summary and next steps for isolated user namespaces

2020-10-15 Thread Serge E. Hallyn
On Wed, Oct 14, 2020 at 02:46:46PM -0500, Eric W. Biederman wrote: > "Serge E. Hallyn" writes: > > > On Mon, Oct 12, 2020 at 12:01:09AM -0500, Eric W. Biederman wrote: > >> Andy Lutomirski writes: > >> > >> > On Sun, Oct 11, 2020 at 1:53 PM

Re: LPC 2020 Hackroom Session: summary and next steps for isolated user namespaces

2020-10-13 Thread Serge E. Hallyn
On Mon, Oct 12, 2020 at 07:05:10PM +0200, Giuseppe Scrivano wrote: > Josh Triplett writes: > > > On Fri, Oct 09, 2020 at 11:26:06PM -0500, Serge E. Hallyn wrote: > >> > 3. Find a way to allow setgroups() in a user namespace while keeping > >> >in mind

Re: LPC 2020 Hackroom Session: summary and next steps for isolated user namespaces

2020-10-12 Thread Serge E. Hallyn
On Mon, Oct 12, 2020 at 12:01:09AM -0500, Eric W. Biederman wrote: > Andy Lutomirski writes: > > > On Sun, Oct 11, 2020 at 1:53 PM Josh Triplett wrote: > >> > >> On Fri, Oct 09, 2020 at 11:26:06PM -0500, Serge E. Hallyn wrote: > >> > > 3. Find a

Re: LPC 2020 Hackroom Session: summary and next steps for isolated user namespaces

2020-10-09 Thread Serge E. Hallyn
> 3. Find a way to allow setgroups() in a user namespace while keeping >in mind the case of groups used for negative access control. >This was suggested by Josh Triplett and Geoffrey Thomas. Their idea was to >investigate adding a prctl() to allow setgroups() to be called in a user >

Re: [PATCH v2] block: grant IOPRIO_CLASS_RT to CAP_SYS_NICE

2020-08-24 Thread Serge E. Hallyn
On Mon, Aug 24, 2020 at 03:10:34PM -0700, Khazhismel Kumykov wrote: > CAP_SYS_ADMIN is too broad, and ionice fits into CAP_SYS_NICE's grouping. > > Retain CAP_SYS_ADMIN permission for backwards compatibility. > > Signed-off-by: Khazhismel Kumykov Acked-by: Serge Hallyn > --- >

Re: [PATCH v6 6/7] prctl: exe link permission error changed from -EINVAL to -EPERM

2020-07-19 Thread Serge E. Hallyn
On Sun, Jul 19, 2020 at 12:04:16PM +0200, Adrian Reber wrote: > From: Nicolas Viennot > > This brings consistency with the rest of the prctl() syscall where > -EPERM is returned when failing a capability check. > > Signed-off-by: Nicolas Viennot > Signed-off-by: Adrian Reber Ok, i see how

Re: [PATCH v6 4/7] proc: allow access in init userns for map_files with CAP_CHECKPOINT_RESTORE

2020-07-19 Thread Serge E. Hallyn
On Sun, Jul 19, 2020 at 12:04:14PM +0200, Adrian Reber wrote: > Opening files in /proc/pid/map_files when the current user is > CAP_CHECKPOINT_RESTORE capable in the root namespace is useful for > checkpointing and restoring to recover files that are unreachable via > the file system such as

Re: [PATCH v5 0/6] capabilities: Introduce CAP_CHECKPOINT_RESTORE

2020-07-17 Thread Serge E. Hallyn
On Wed, Jul 15, 2020 at 04:49:48PM +0200, Adrian Reber wrote: > This is v5 of the 'Introduce CAP_CHECKPOINT_RESTORE' patchset. The > changes to v4 are: > > * split into more patches to have the introduction of >CAP_CHECKPOINT_RESTORE and the actual usage in different >patches > * reduce

Re: [PATCH] LSM: drop duplicated words in header file comments

2020-07-17 Thread Serge E. Hallyn
On Fri, Jul 17, 2020 at 04:36:40PM -0700, Randy Dunlap wrote: > From: Randy Dunlap > > Drop the doubled words "the" and "and" in comments. > > Signed-off-by: Randy Dunlap > Cc: James Morris > Cc: "Serge E. Hallyn" Acked-by: Serge H

Re: [PATCH] capabilities: Replace HTTP links with HTTPS ones

2020-07-17 Thread Serge E. Hallyn
On Mon, Jul 13, 2020 at 12:34:28PM +0200, Alexander A. Klimov wrote: > Rationale: > Reduces attack surface on kernel devs opening the links for MITM > as HTTPS traffic is much harder to manipulate. > > Deterministic algorithm: > For each file: > If not .svg: > For each line: > If

Re: [PATCH v4 2/3] selftests: add clone3() CAP_CHECKPOINT_RESTORE test

2020-07-03 Thread Serge E. Hallyn
On Fri, Jul 03, 2020 at 01:18:07PM +0200, Adrian Reber wrote: > On Thu, Jul 02, 2020 at 03:53:05PM -0500, Serge E. Hallyn wrote: > > On Wed, Jul 01, 2020 at 08:49:05AM +0200, Adrian Reber wrote: > > > This adds a test that changes its UID, uses capabilities to > > >

Re: [PATCH v4 3/3] prctl: Allow ptrace capable processes to change /proc/self/exe

2020-07-02 Thread Serge E. Hallyn
On Wed, Jul 01, 2020 at 10:55:37AM +0200, Christian Brauner wrote: > On Wed, Jul 01, 2020 at 08:49:06AM +0200, Adrian Reber wrote: > > From: Nicolas Viennot > > > > Previously, the current process could only change the /proc/self/exe > > link with local CAP_SYS_ADMIN. > > This commit relaxes

Re: [PATCH v4 3/3] prctl: Allow ptrace capable processes to change /proc/self/exe

2020-07-02 Thread Serge E. Hallyn
On Wed, Jul 01, 2020 at 08:49:06AM +0200, Adrian Reber wrote: > From: Nicolas Viennot > > Previously, the current process could only change the /proc/self/exe > link with local CAP_SYS_ADMIN. > This commit relaxes this restriction by permitting such change with > CAP_CHECKPOINT_RESTORE, and the

Re: [PATCH v4 2/3] selftests: add clone3() CAP_CHECKPOINT_RESTORE test

2020-07-02 Thread Serge E. Hallyn
On Wed, Jul 01, 2020 at 08:49:05AM +0200, Adrian Reber wrote: > This adds a test that changes its UID, uses capabilities to > get CAP_CHECKPOINT_RESTORE and uses clone3() with set_tid to > create a process with a given PID as non-root. Seems worth also verifying that it fails if you have no

Re: [PATCH RESEND] device_cgroup: Fix RCU list debugging warning

2020-06-07 Thread Serge E. Hallyn
On Sun, Jun 07, 2020 at 12:08:40PM -0700, Paul E. McKenney wrote: > On Sun, Jun 07, 2020 at 06:23:40AM +1000, Stephen Rothwell wrote: > > Hi all, > > > > On Mon, 6 Apr 2020 16:29:50 +0530 Amol Grover wrote: > > > > > > exceptions may be traversed using list_for_each_entry_rcu() > > > outside of

[PATCH 1/1] shiftfs: specify struct members

2020-05-17 Thread Serge E. Hallyn
struct path is declared as randomize_layout, so specify the struct members when initializing to avoid build failure. Signed-off-by: Serge Hallyn --- [ this is for https://git.kernel.org/pub/scm/linux/kernel/git/jejb/binfmt_misc.git/commit/?h=shiftfs-v3 , which i was just building for an

Re: [PATCH v4 2/3] nsproxy: attach to namespaces via pidfds

2020-05-07 Thread Serge E. Hallyn
On Tue, May 05, 2020 at 04:04:31PM +0200, Christian Brauner wrote: > For quite a while we have been thinking about using pidfds to attach to > namespaces. This patchset has existed for about a year already but we've > wanted to wait to see how the general api would be received and adopted. > Now

Re: [PATCH v4 1/3] nsproxy: add struct nsset

2020-05-07 Thread Serge E. Hallyn
On Tue, May 05, 2020 at 04:04:30PM +0200, Christian Brauner wrote: > Add a simple struct nsset. It holds all necessary pieces to switch to a new > set of namespaces without leaving a task in a half-switched state which we > will make use of in the next patch. This patch switches the existing setns

Re: [PATCH v3 1/2] fork: add clone3

2019-06-06 Thread Serge E. Hallyn
On Tue, Jun 04, 2019 at 06:09:43PM +0200, Christian Brauner wrote: > This adds the clone3 system call. > > As mentioned several times already (cf. [7], [8]) here's the promised > patchset for clone3(). > > We recently merged the CLONE_PIDFD patchset (cf. [1]). It took the last > free flag from

Re: RFC: on adding new CLONE_* flags [WAS Re: [PATCH 0/4] clone: add CLONE_PIDFD]

2019-05-04 Thread Serge E. Hallyn
On Mon, Apr 29, 2019 at 07:31:43PM +0200, Enrico Weigelt, metux IT consult wrote: Argh. Sorry, it seems your emails aren't making it into my inbox, only my once-in-a-long-while-checked lkml folder. Sorry again. > On 29.04.19 17:49, Serge E. Hallyn wrote: > > >> * all

Re: RFC: on adding new CLONE_* flags [WAS Re: [PATCH 0/4] clone: add CLONE_PIDFD]

2019-04-29 Thread Serge E. Hallyn
On Tue, Apr 16, 2019 at 08:32:50PM +0200, Enrico Weigelt, metux IT consult wrote: (Sorry for the late reply, I had missed this one) > On 15.04.19 17:50, Serge E. Hallyn wrote: > > Hi, > > >> I'm working on implementing plan9-like fs namespaces, where unprivileged>>

Re: RFC: on adding new CLONE_* flags [WAS Re: [PATCH 0/4] clone: add CLONE_PIDFD]

2019-04-15 Thread Serge E. Hallyn
On Mon, Apr 15, 2019 at 12:08:09PM +0200, Enrico Weigelt, metux IT consult wrote: > On 14.04.19 22:14, Christian Brauner wrote: > > Hi folks, > > > This patchset makes it possible to retrieve pid file descriptors at > > process creation time by introducing the new flag CLONE_PIDFD to the > >

Re: Allowing mapping supplemental groups in user namespace?

2019-03-28 Thread Serge E. Hallyn
On Thu, Mar 28, 2019 at 11:30:52AM -0700, Dmitry Torokhov wrote: > Hi Serge, > > On Thu, Mar 28, 2019 at 11:05 AM Serge E. Hallyn wrote: > > > > On Thu, Feb 28, 2019 at 11:27:38AM -0800, Dmitry Torokhov wrote: > > > Hi Eric, > > > > > > Currently,

Re: Allowing mapping supplemental groups in user namespace?

2019-03-28 Thread Serge E. Hallyn
On Thu, Feb 28, 2019 at 11:27:38AM -0800, Dmitry Torokhov wrote: > Hi Eric, > > Currently, unless caller has CAP_SETGID in parent namespace, we can > only map effective group id in the new user namespace. Would it be > possible to relax this rule to also allow mapping of supplemental > groups

Re: pidfd design

2019-03-24 Thread Serge E. Hallyn
On Wed, Mar 20, 2019 at 12:29:31PM -0700, Daniel Colascione wrote: > On Wed, Mar 20, 2019 at 11:52 AM Christian Brauner > wrote: > > I really want to see Joel's pidfd_wait() patchset and have more people > > review the actual code. > > Sure. But it's also unpleasant to have people write code

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-17 Thread Serge E. Hallyn
On Sun, Mar 17, 2019 at 10:11:10AM -0700, Daniel Colascione wrote: > On Sun, Mar 17, 2019 at 9:35 AM Serge E. Hallyn wrote: > > > > On Sun, Mar 17, 2019 at 12:42:40PM +0100, Christian Brauner wrote: > > > On Sat, Mar 16, 2019 at 09:53:06PM -0400, Joel Fernandes wrote: >

Re: [RFC] simple_lmk: Introduce Simple Low Memory Killer for Android

2019-03-17 Thread Serge E. Hallyn
On Sun, Mar 17, 2019 at 12:42:40PM +0100, Christian Brauner wrote: > On Sat, Mar 16, 2019 at 09:53:06PM -0400, Joel Fernandes wrote: > > On Sat, Mar 16, 2019 at 12:37:18PM -0700, Suren Baghdasaryan wrote: > > > On Sat, Mar 16, 2019 at 11:57 AM Christian Brauner > > > wrote: > > > > > > > > On

Re: [PATCH 4.20 282/352] fs/proc/base.c: use ns_capable instead of capable for timerslack_ns

2019-02-11 Thread Serge E. Hallyn
slack_ns. > > > > Link: http://lkml.kernel.org/r/20181030180012.232896-1-bmgor...@google.com > > Signed-off-by: Benjamin Gordon > > Acked-by: "Eric W. Biederman" > > Cc: John Stultz > > Cc: "Eric W. Biederman" > > Cc: Kees Cook &

Re: [PATCH ghak103 V1] audit: add support for fcaps v3

2019-01-24 Thread Serge E. Hallyn
On Wed, Jan 23, 2019 at 09:36:25PM -0500, Richard Guy Briggs wrote: > V3 namespaced file capabilities were introduced in > commit 8db6c34f1dbc ("Introduce v3 namespaced file capabilities") > > Add support for these by adding the "frootid" field to the existing > fcaps fields in the NAME and

Re: [PATCH v7 2/2] selftests: add tests for pidfd_send_signal()

2019-01-08 Thread Serge E. Hallyn
On Tue, Jan 08, 2019 at 11:20:23AM -0700, Tycho Andersen wrote: > On Tue, Jan 08, 2019 at 12:17:42PM -0600, Serge E. Hallyn wrote: > > On Tue, Jan 08, 2019 at 10:58:43AM -0700, Tycho Andersen wrote: > > > On Tue, Jan 08, 2019 at 11:54:15AM -0600, Serge E. Hallyn wrote: > >

Re: [PATCH v7 2/2] selftests: add tests for pidfd_send_signal()

2019-01-08 Thread Serge E. Hallyn
On Tue, Jan 08, 2019 at 10:58:43AM -0700, Tycho Andersen wrote: > On Tue, Jan 08, 2019 at 11:54:15AM -0600, Serge E. Hallyn wrote: > > On Tue, Jan 08, 2019 at 10:53:06AM -0700, Tycho Andersen wrote: > > > On Wed, Jan 02, 2019 at 05:16:54PM +0100, Chris

Re: [PATCH v7 2/2] selftests: add tests for pidfd_send_signal()

2019-01-08 Thread Serge E. Hallyn
On Tue, Jan 08, 2019 at 10:53:06AM -0700, Tycho Andersen wrote: > On Wed, Jan 02, 2019 at 05:16:54PM +0100, Christian Brauner wrote: > > + /* > > +* Stop the child so we can inspect whether we have > > +* recycled pid PID_RECYCLE. > > +

Re: [PATCH v6 2/2] selftests: add tests for pidfd_send_signal()

2019-01-01 Thread Serge E. Hallyn
On Tue, Jan 01, 2019 at 04:07:44PM +0100, Christian Brauner wrote: > On Mon, Dec 31, 2018 at 12:27:13AM +0100, Christian Brauner wrote: > > On Sun, Dec 30, 2018 at 03:02:45PM -0600, Serge Hallyn wrote: > > > On Sat, Dec 29, 2018 at 11:27:56PM +0100, Christian Brauner wrote: > > > > As suggested by

Re: [PATCH v6 2/2] selftests: add tests for pidfd_send_signal()

2018-12-30 Thread Serge E. Hallyn
On Sat, Dec 29, 2018 at 11:27:56PM +0100, Christian Brauner wrote: > As suggested by Andrew Morton in [1] add selftests for the new > sys_pidfd_send_signal() syscall. > This tests whether we can send a signal to an existing process and whether > sending a signal to a process that has already

Re: [PATCH v5 1/1] signal: add pidfd_send_signal() syscall

2018-12-13 Thread Serge E. Hallyn
On Sat, Dec 08, 2018 at 06:40:59AM +0100, Christian Brauner wrote: > The kill() syscall operates on process identifiers (pid). After a process > has exited its pid can be reused by another process. If a caller sends a > signal to a reused pid it will end up signaling the wrong process. This >

Re: [PATCH resend] eventfd: make eventfd files distinguishable in /proc/$PID/fd

2018-12-11 Thread Serge E. Hallyn
On Mon, Dec 10, 2018 at 03:35:46AM +0900, Masatake YAMATO wrote: > Finding endpoints of an IPC channel is one of essential task to > understand how a user program works. Procfs and netlink socket provide > enough hints to find endpoints for IPC channels like pipes, unix > sockets, and pseudo

Re: [PATCH v10 4/4] samples: add an example of seccomp user trap

2018-12-11 Thread Serge E. Hallyn
it serves to > illustrate how one might apply a policy dodging the various TOCTOU issues. > > Signed-off-by: Tycho Andersen > CC: Kees Cook > CC: Andy Lutomirski > CC: Oleg Nesterov > CC: Eric W. Biederman > CC: "Serge E. Hallyn" > CC: Christian Brauner > CC:

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-07 Thread Serge E. Hallyn
On Fri, Dec 07, 2018 at 02:54:25AM +0100, Christian Brauner wrote: > On Thu, Dec 06, 2018 at 05:39:18PM -0800, Daniel Colascione wrote: > > On Thu, Dec 6, 2018 at 4:59 PM Serge E. Hallyn wrote: > > > > > > On Thu, Dec 06, 2018 at 04:34:54PM -0800, Daniel Colascione w

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-07 Thread Serge E. Hallyn
On Fri, Dec 07, 2018 at 02:54:25AM +0100, Christian Brauner wrote: > On Thu, Dec 06, 2018 at 05:39:18PM -0800, Daniel Colascione wrote: > > On Thu, Dec 6, 2018 at 4:59 PM Serge E. Hallyn wrote: > > > > > > On Thu, Dec 06, 2018 at 04:34:54PM -0800, Daniel Colascione w

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-07 Thread Serge E. Hallyn
On Thu, Dec 06, 2018 at 01:18:58PM +0100, Christian Brauner wrote: > The kill() syscall operates on process identifiers (pid). After a process > has exited its pid can be reused by another process. If a caller sends a > signal to a reused pid it will end up signaling the wrong process. This >

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-07 Thread Serge E. Hallyn
On Thu, Dec 06, 2018 at 01:18:58PM +0100, Christian Brauner wrote: > The kill() syscall operates on process identifiers (pid). After a process > has exited its pid can be reused by another process. If a caller sends a > signal to a reused pid it will end up signaling the wrong process. This >

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-06 Thread Serge E. Hallyn
On Thu, Dec 06, 2018 at 04:34:54PM -0800, Daniel Colascione wrote: > On Thu, Dec 6, 2018 at 4:31 PM Serge E. Hallyn wrote: > > > > On Fri, Dec 07, 2018 at 12:17:45AM +0100, Christian Brauner wrote: > > > On Thu, Dec 06, 2018 at 11:39:48PM +0100, Christian Brauner wrote

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-06 Thread Serge E. Hallyn
On Thu, Dec 06, 2018 at 04:34:54PM -0800, Daniel Colascione wrote: > On Thu, Dec 6, 2018 at 4:31 PM Serge E. Hallyn wrote: > > > > On Fri, Dec 07, 2018 at 12:17:45AM +0100, Christian Brauner wrote: > > > On Thu, Dec 06, 2018 at 11:39:48PM +0100, Christian Brauner wrote

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-06 Thread Serge E. Hallyn
On Fri, Dec 07, 2018 at 12:17:45AM +0100, Christian Brauner wrote: > On Thu, Dec 06, 2018 at 11:39:48PM +0100, Christian Brauner wrote: > > On Thu, Dec 06, 2018 at 03:46:53PM -0600, Eric W. Biederman wrote: > > > Christian Brauner writes: > > > > > > >> Your intention is to add the thread case

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-06 Thread Serge E. Hallyn
On Fri, Dec 07, 2018 at 12:17:45AM +0100, Christian Brauner wrote: > On Thu, Dec 06, 2018 at 11:39:48PM +0100, Christian Brauner wrote: > > On Thu, Dec 06, 2018 at 03:46:53PM -0600, Eric W. Biederman wrote: > > > Christian Brauner writes: > > > > > > >> Your intention is to add the thread case

Re: [PATCH 7/7] ima: Support platform keyring for kernel appraisal

2018-12-06 Thread Serge E. Hallyn
On Sun, Nov 25, 2018 at 08:45:00PM +0530, Nayna Jain wrote: > On secure boot enabled systems, the bootloader verifies the kernel > image and possibly the initramfs signatures based on a set of keys. A > soft reboot(kexec) of the system, with the same kernel image and > initramfs, requires access

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-06 Thread Serge E. Hallyn
On Thu, Dec 06, 2018 at 10:30:40AM -0800, Kees Cook wrote: > On Thu, Dec 6, 2018 at 9:41 AM Christian Brauner wrote: > > I feel changing the name around by a single persons preferences is not > > really a nice thing to do community-wise. So I'd like to hear other > > people chime in first before

Re: [PATCH v4] signal: add taskfd_send_signal() syscall

2018-12-06 Thread Serge E. Hallyn
On Thu, Dec 06, 2018 at 10:30:40AM -0800, Kees Cook wrote: > On Thu, Dec 6, 2018 at 9:41 AM Christian Brauner wrote: > > I feel changing the name around by a single persons preferences is not > > really a nice thing to do community-wise. So I'd like to hear other > > people chime in first before

Re: [PATCH v9 3/4] seccomp: add a return code to trap to userspace

2018-12-03 Thread Serge E. Hallyn
On Mon, Dec 03, 2018 at 08:52:11AM -0700, Tycho Andersen wrote: > On Sun, Dec 02, 2018 at 11:26:50PM -0600, Serge E. Hallyn wrote: > > On Sun, Dec 02, 2018 at 08:28:26PM -0700, Tycho Andersen wrote: > > > +struct seccomp_knotif { > > > + /* The struct pid of the

Re: [PATCH v9 3/4] seccomp: add a return code to trap to userspace

2018-12-03 Thread Serge E. Hallyn
On Mon, Dec 03, 2018 at 08:52:11AM -0700, Tycho Andersen wrote: > On Sun, Dec 02, 2018 at 11:26:50PM -0600, Serge E. Hallyn wrote: > > On Sun, Dec 02, 2018 at 08:28:26PM -0700, Tycho Andersen wrote: > > > +struct seccomp_knotif { > > > + /* The struct pid of the

Re: [PATCH v9 3/4] seccomp: add a return code to trap to userspace

2018-12-02 Thread Serge E. Hallyn
s all > of the task memory that is necessary before applying its security policy, > the tracee's subsequent memory edits will not be read by the tracer. > > Signed-off-by: Tycho Andersen > CC: Kees Cook > CC: Andy Lutomirski > CC: Oleg Nesterov > CC: Eric W. Biederman >

Re: [PATCH v9 3/4] seccomp: add a return code to trap to userspace

2018-12-02 Thread Serge E. Hallyn
s all > of the task memory that is necessary before applying its security policy, > the tracee's subsequent memory edits will not be read by the tracer. > > Signed-off-by: Tycho Andersen > CC: Kees Cook > CC: Andy Lutomirski > CC: Oleg Nesterov > CC: Eric W. Biederman >

Re: [PATCH v9 2/4] seccomp: switch system call argument type to void *

2018-12-02 Thread Serge E. Hallyn
gt; > Signed-off-by: Tycho Andersen > CC: Kees Cook > CC: Andy Lutomirski > CC: Oleg Nesterov > CC: Eric W. Biederman > CC: "Serge E. Hallyn" Acked-by: Serge Hallyn Though I'm not entirely convinced there will be no ill effects of changing the argument type. I'

Re: [PATCH v9 2/4] seccomp: switch system call argument type to void *

2018-12-02 Thread Serge E. Hallyn
gt; > Signed-off-by: Tycho Andersen > CC: Kees Cook > CC: Andy Lutomirski > CC: Oleg Nesterov > CC: Eric W. Biederman > CC: "Serge E. Hallyn" Acked-by: Serge Hallyn Though I'm not entirely convinced there will be no ill effects of changing the argument type. I'

Re: [PATCH v9 1/4] seccomp: hoist struct seccomp_data recalculation higher

2018-12-02 Thread Serge E. Hallyn
t; Thanks Oleg for spotting this. > > Signed-off-by: Tycho Andersen > CC: Kees Cook > CC: Andy Lutomirski > CC: Oleg Nesterov > CC: Eric W. Biederman > CC: "Serge E. Hallyn" Acked-by: Serge Hallyn > CC: Christian Brauner > CC: Tyler Hicks > CC: Akihiro Sud

Re: [PATCH v9 1/4] seccomp: hoist struct seccomp_data recalculation higher

2018-12-02 Thread Serge E. Hallyn
t; Thanks Oleg for spotting this. > > Signed-off-by: Tycho Andersen > CC: Kees Cook > CC: Andy Lutomirski > CC: Oleg Nesterov > CC: Eric W. Biederman > CC: "Serge E. Hallyn" Acked-by: Serge Hallyn > CC: Christian Brauner > CC: Tyler Hicks > CC: Akihiro Sud

Re: [PATCH v2] signal: add procfd_signal() syscall

2018-11-22 Thread Serge E. Hallyn
On Tue, Nov 20, 2018 at 11:51:23AM +0100, Christian Brauner wrote: > The kill() syscall operates on process identifiers. After a process has > exited its pid can be reused by another process. If a caller sends a signal > to a reused pid it will end up signaling the wrong process. This issue has >

Re: [PATCH v2] signal: add procfd_signal() syscall

2018-11-22 Thread Serge E. Hallyn
On Tue, Nov 20, 2018 at 11:51:23AM +0100, Christian Brauner wrote: > The kill() syscall operates on process identifiers. After a process has > exited its pid can be reused by another process. If a caller sends a signal > to a reused pid it will end up signaling the wrong process. This issue has >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-21 Thread Serge E. Hallyn
On Mon, Nov 19, 2018 at 03:39:54PM -0700, Tycho Andersen wrote: > On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > > > +/** > > + * sys_procfd_signal - send a signal to a process through a process file > > + * descriptor > > + * @fd: the file descriptor

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-21 Thread Serge E. Hallyn
On Mon, Nov 19, 2018 at 03:39:54PM -0700, Tycho Andersen wrote: > On Mon, Nov 19, 2018 at 11:32:39AM +0100, Christian Brauner wrote: > > > > +/** > > + * sys_procfd_signal - send a signal to a process through a process file > > + * descriptor > > + * @fd: the file descriptor

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-21 Thread Serge E. Hallyn
On Tue, Nov 20, 2018 at 08:23:43AM +1100, Aleksa Sarai wrote: > On 2018-11-20, Aleksa Sarai wrote: > > On 2018-11-19, Christian Brauner wrote: > > > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > > > On 2018-11-19, Christian Brauner wrote: > > > > > + if (info) { > > > >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-21 Thread Serge E. Hallyn
On Tue, Nov 20, 2018 at 08:23:43AM +1100, Aleksa Sarai wrote: > On 2018-11-20, Aleksa Sarai wrote: > > On 2018-11-19, Christian Brauner wrote: > > > On Tue, Nov 20, 2018 at 07:28:57AM +1100, Aleksa Sarai wrote: > > > > On 2018-11-19, Christian Brauner wrote: > > > > > + if (info) { > > > >

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-21 Thread Serge E. Hallyn
On Tue, Nov 20, 2018 at 11:31:13AM +0100, Christian Brauner wrote: > On Mon, Nov 19, 2018 at 10:59:12PM -0600, Eric W. Biederman wrote: > > Daniel Colascione writes: > > > > > On Mon, Nov 19, 2018 at 1:37 PM Christian Brauner > > > wrote: > > >> > > >> On Mon, Nov 19, 2018 at 01:26:22PM -0800,

Re: [PATCH v1 2/2] signal: add procfd_signal() syscall

2018-11-21 Thread Serge E. Hallyn
On Tue, Nov 20, 2018 at 11:31:13AM +0100, Christian Brauner wrote: > On Mon, Nov 19, 2018 at 10:59:12PM -0600, Eric W. Biederman wrote: > > Daniel Colascione writes: > > > > > On Mon, Nov 19, 2018 at 1:37 PM Christian Brauner > > > wrote: > > >> > > >> On Mon, Nov 19, 2018 at 01:26:22PM -0800,

Re: [RFC PATCH] Implement /proc/pid/kill

2018-11-02 Thread Serge E. Hallyn
Quoting Christian Brauner (christian.brau...@canonical.com): > On Thu, Nov 01, 2018 at 01:40:59PM -0700, Joel Fernandes wrote: > > On Tue, Oct 30, 2018 at 09:24:00PM -0700, Joel Fernandes wrote: > > > On Tue, Oct 30, 2018 at 7:56 PM, Aleksa Sarai wrote: > > > > On 2018-10-31, Christian Brauner

Re: [RFC PATCH] Implement /proc/pid/kill

2018-11-02 Thread Serge E. Hallyn
Quoting Christian Brauner (christian.brau...@canonical.com): > On Thu, Nov 01, 2018 at 01:40:59PM -0700, Joel Fernandes wrote: > > On Tue, Oct 30, 2018 at 09:24:00PM -0700, Joel Fernandes wrote: > > > On Tue, Oct 30, 2018 at 7:56 PM, Aleksa Sarai wrote: > > > > On 2018-10-31, Christian Brauner

Re: [PATCH v8 2/2] samples: add an example of seccomp user trap

2018-10-29 Thread Serge E. Hallyn
it serves to > illustrate how one might apply a policy dodging the various TOCTOU issues. > > Signed-off-by: Tycho Andersen > CC: Kees Cook > CC: Andy Lutomirski > CC: Oleg Nesterov > CC: Eric W. Biederman > CC: "Serge E. Hallyn" > CC: Christian Brauner > CC:

Re: [PATCH v8 2/2] samples: add an example of seccomp user trap

2018-10-29 Thread Serge E. Hallyn
it serves to > illustrate how one might apply a policy dodging the various TOCTOU issues. > > Signed-off-by: Tycho Andersen > CC: Kees Cook > CC: Andy Lutomirski > CC: Oleg Nesterov > CC: Eric W. Biederman > CC: "Serge E. Hallyn" > CC: Christian Brauner > CC:

Re: [RFC v4 1/1] ns: add binfmt_misc to the user namespace

2018-10-06 Thread Serge E. Hallyn
On Sat, Oct 06, 2018 at 09:35:46PM +0200, Laurent Vivier wrote: > This patch allows to have a different binfmt_misc configuration > for each new user namespace. By default, the binfmt_misc configuration > is the one of the previous level, but if the binfmt_misc filesystem is > mounted in the new

  1   2   3   4   5   6   7   8   9   10   >