Re: [RESEND PATCH v18 2/4] overlayfs: handle XATTR_NOSECURITY flag for get xattr method

2020-10-30 Thread Mark Salyzyn
On 10/30/20 8:07 AM, Miklos Szeredi wrote: On Wed, Oct 21, 2020 at 5:19 PM Mark Salyzyn wrote: Because of the overlayfs getxattr recursion, the incoming inode fails to update the selinux sid resulting in avc denials being reported against a target context of u:object_r:unlabeled:s0. Solution

Re: [RESEND PATCH v18 0/4] overlayfs override_creds=off & nested get xattr fix

2020-10-22 Thread Mark Salyzyn
On 10/21/20 10:19 PM, Eric Biggers wrote: On Wed, Oct 21, 2020 at 08:18:59AM -0700, Mark Salyzyn wrote: Mark Salyzyn (3): Add flags option to get xattr method paired to __vfs_getxattr overlayfs: handle XATTR_NOSECURITY flag for get xattr method overlayfs: override_creds=off option

[RESEND PATCH v18 4/4] overlayfs: inode_owner_or_capable called during execv

2020-10-22 Thread Mark Salyzyn
From: John Stultz Using old_creds as an indication that we are not overriding the credentials, bypass call to inode_owner_or_capable. This solves a problem with all execv calls being blocked when using the caller's credentials. Signed-off-by: John Stultz Signed-off-by: Mark Salyzyn Fixes

[RESEND PATCH v18 3/4] overlayfs: override_creds=off option bypass creator_cred

2020-10-21 Thread Mark Salyzyn
or general use in time. Signed-off-by: Mark Salyzyn Cc: linux-fsde...@vger.kernel.org Cc: linux-unio...@vger.kernel.org Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley Cc: linux-security-mod...@vger.ker

[RESEND PATCH v18 2/4] overlayfs: handle XATTR_NOSECURITY flag for get xattr method

2020-10-21 Thread Mark Salyzyn
usted xattr management. Signed-off-by: Mark Salyzyn Cc: linux-fsde...@vger.kernel.org Cc: linux-unio...@vger.kernel.org Cc: Stephen Smalley Cc: linux-kernel@vger.kernel.org Cc: linux-security-mod...@vger.kernel.org Cc: kernel-t...@android.com Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal

[RESEND PATCH v18 1/4] Add flags option to get xattr method paired to __vfs_getxattr

2020-10-21 Thread Mark Salyzyn
ed:s0 context making the logs cosmetically useless for audit2allow. This patch series is inert and is the wide-spread addition of the flags option for xattr functions, and a replacement of __vfs_getxattr with __vfs_getxattr(...XATTR_NOSECURITY). Signed-off-by: Mark Salyzyn Reviewed-by: Jan Kara

[RESEND PATCH v18 0/4] overlayfs override_creds=off & nested get xattr fix

2020-10-21 Thread Mark Salyzyn
Mark Salyzyn (3): Add flags option to get xattr method paired to __vfs_getxattr overlayfs: handle XATTR_NOSECURITY flag for get xattr method overlayfs: override_creds=off option bypass creator_cred Mark Salyzyn + John Stultz (1): overlayfs: inode_owner_or_capable called during execv

[RESEND PATCH v18 4/4] overlayfs: inode_owner_or_capable called during execv

2020-10-21 Thread Mark Salyzyn
From: John Stultz Using old_creds as an indication that we are not overriding the credentials, bypass call to inode_owner_or_capable. This solves a problem with all execv calls being blocked when using the caller's credentials. Signed-off-by: John Stultz Signed-off-by: Mark Salyzyn Fixes

Re: [PATCH v18 0/4] overlayfs override_creds=off & nested get xattr fix

2020-10-21 Thread Mark Salyzyn
-by: Mark Salyzyn Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley Cc: John Stultz Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org To: linux-fsde...@vger.kernel.org To: linux-unio

[PATCH v18 0/4] overlayfs override_creds=off & nested get xattr fix

2020-10-21 Thread Mark Salyzyn
Mark Salyzyn (3): Add flags option to get xattr method paired to __vfs_getxattr overlayfs: handle XATTR_NOSECURITY flag for get xattr method overlayfs: override_creds=off option bypass creator_cred Mark Salyzyn + John Stultz (1): overlayfs: inode_owner_or_capable called during execv

[PATCH v18 3/4] overlayfs: override_creds=off option bypass creator_cred

2020-10-21 Thread Mark Salyzyn
or general use in time. Signed-off-by: Mark Salyzyn To: linux-fsde...@vger.kernel.org To: linux-unio...@vger.kernel.org Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley Cc: linux-security-mod...@vger.ker

[PATCH v18 4/4] overlayfs: inode_owner_or_capable called during execv

2020-10-21 Thread Mark Salyzyn
From: John Stultz Using old_creds as an indication that we are not overriding the credentials, bypass call to inode_owner_or_capable. This solves a problem with all execv calls being blocked when using the caller's credentials. Signed-off-by: John Stultz Signed-off-by: Mark Salyzyn Fixes

[PATCH v18 2/4] overlayfs: handle XATTR_NOSECURITY flag for get xattr method

2020-10-21 Thread Mark Salyzyn
usted xattr management. Signed-off-by: Mark Salyzyn To: linux-fsde...@vger.kernel.org To: linux-unio...@vger.kernel.org Cc: Stephen Smalley Cc: linux-kernel@vger.kernel.org Cc: linux-security-mod...@vger.kernel.org Cc: kernel-t...@android.com Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal

[PATCH v18 1/4] Add flags option to get xattr method paired to __vfs_getxattr

2020-10-21 Thread Mark Salyzyn
ed:s0 context making the logs cosmetically useless for audit2allow. This patch series is inert and is the wide-spread addition of the flags option for xattr functions, and a replacement of __vfs_getxattr with __vfs_getxattr(...XATTR_NOSECURITY). Signed-off-by: Mark Salyzyn Reviewed-by: Jan Kara

Re: [PATCH v17 2/4] overlayfs: handle XATTR_NOSECURITY flag for get xattr method

2020-10-21 Thread Mark Salyzyn
On 10/20/20 12:17 PM, Mark Salyzyn wrote: Because of the overlayfs getxattr recursion, the incoming inode fails to update the selinux sid resulting in avc denials being reported against a target context of u:object_r:unlabeled:s0. Solution is to respond to the XATTR_NOSECURITY flag in get xattr

Re: [PATCH v17 1/4] Add flags option to get xattr method paired to __vfs_getxattr

2020-10-21 Thread Mark Salyzyn
On 10/20/20 6:17 PM, Paul Moore wrote: On Tue, Oct 20, 2020 at 3:17 PM Mark Salyzyn wrote: Add a flag option to get xattr method that could have a bit flag of XATTR_NOSECURITY passed to it. XATTR_NOSECURITY is generally then set in the __vfs_getxattr path when called by security

[PATCH v17 0/4] overlayfs override_creds=off & nested get xattr fix

2020-10-20 Thread Mark Salyzyn
Mark Salyzyn (3): Add flags option to get xattr method paired to __vfs_getxattr overlayfs: handle XATTR_NOSECURITY flag for get xattr method overlayfs: override_creds=off option bypass creator_cred Mark Salyzyn + John Stultz (1): overlayfs: inode_owner_or_capable called during execv

[PATCH v17 3/4] overlayfs: override_creds=off option bypass creator_cred

2020-10-20 Thread Mark Salyzyn
or general use in time. Signed-off-by: Mark Salyzyn To: linux-fsde...@vger.kernel.org To: linux-unio...@vger.kernel.org Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley Cc: linux-security-mod...@vger.ker

[PATCH v17 1/4] Add flags option to get xattr method paired to __vfs_getxattr

2020-10-20 Thread Mark Salyzyn
ed:s0 context making the logs cosmetically useless for audit2allow. This patch series is inert and is the wide-spread addition of the flags option for xattr functions, and a replacement of __vfs_getxattr with __vfs_getxattr(...XATTR_NOSECURITY). Signed-off-by: Mark Salyzyn Reviewed-by: Jan Kara

[PATCH v17 4/4] overlayfs: inode_owner_or_capable called during execv

2020-10-20 Thread Mark Salyzyn
Using old_creds as an indication that we are not overriding the credentials, bypass call to inode_owner_or_capable. This solves a problem with all execv calls being blocked when using the caller's credentials. Signed-off-by: John Stultz Signed-off-by: Mark Salyzyn Fixes: 05acefb4872da (&quo

[PATCH v17 2/4] overlayfs: handle XATTR_NOSECURITY flag for get xattr method

2020-10-20 Thread Mark Salyzyn
usted xattr management. Signed-off-by: Mark Salyzyn To: linux-fsde...@vger.kernel.org To: linux-unio...@vger.kernel.org Cc: Stephen Smalley Cc: linux-kernel@vger.kernel.org Cc: linux-security-mod...@vger.kernel.org Cc: kernel-t...@android.com Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal

[PATCH v16 1/4] Add flags option to get xattr method paired to __vfs_getxattr

2020-10-19 Thread Mark Salyzyn
ed:s0 context making the logs cosmetically useless for audit2allow. This patch series is inert and is the wide-spread addition of the flags option for xattr functions, and a replacement of __vfs_getxattr with __vfs_getxattr(...XATTR_NOSECURITY). Signed-off-by: Mark Salyzyn Reviewed-by: Jan Kara

[PATCH v16 3/4] overlayfs: override_creds=off option bypass creator_cred

2020-10-19 Thread Mark Salyzyn
or general use in time. Signed-off-by: Mark Salyzyn To: linux-fsde...@vger.kernel.org To: linux-unio...@vger.kernel.org Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley Cc: John Stultz Cc: linux-se

[PATCH v15 0/4] overlayfs override_creds=off & nested get xattr fix

2020-10-19 Thread Mark Salyzyn
Mark Salyzyn (3): Add flags option to get xattr method paired to __vfs_getxattr overlayfs: handle XATTR_NOSECURITY flag for get xattr method overlayfs: override_creds=off option bypass creator_cred Mark Salyzyn + John Stultz (1): overlayfs: inode_owner_or_capable called during execv

[PATCH v16 4/4] overlayfs: inode_owner_or_capable called during execv

2020-10-19 Thread Mark Salyzyn
From: John Stultz Using old_creds as an indication that we are not overriding the credentials, bypass call to inode_owner_or_capable. This solves a problem with all execv calls being blocked when using the caller's credentials. Signed-off-by: John Stultz Signed-off-by: Mark Salyzyn Fixes

[PATCH v16 2/4] overlayfs: handle XATTR_NOSECURITY flag for get xattr method

2020-10-19 Thread Mark Salyzyn
usted xattr management. Signed-off-by: Mark Salyzyn To: linux-fsde...@vger.kernel.org To: linux-unio...@vger.kernel.org Cc: Stephen Smalley Cc: linux-kernel@vger.kernel.org Cc: linux-security-mod...@vger.kernel.org Cc: kernel-t...@android.com Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal

commit 37bd22420f85 ("af_key: pfkey_dump needs parameter validation") to stable

2020-09-24 Thread Mark Salyzyn
Please consider commit 37bd22420f856fcd976989f1d4f1f7ad28e1fcac ("af_key: pfkey_dump needs parameter validation") for merge into all the maintained stable trees. Cc: net...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: kernel-t...@android.com Cc: sta...@vger.kernel.org Cc: Greg KH

Re: [PATCH] netlink: add buffer boundary checking

2020-07-24 Thread Mark Salyzyn
On 7/24/20 2:14 PM, Jacob Keller wrote: On 7/23/2020 12:35 PM, Eric Dumazet wrote: On 7/23/20 11:21 AM, Mark Salyzyn wrote: Many of the nla_get_* inlines fail to check attribute's length before copying the content resulting in possible out-of-boundary accesses. Adjust the inlines to perform

Re: [PATCH] netlink: add buffer boundary checking

2020-07-23 Thread Mark Salyzyn
On 7/23/20 12:35 PM, Eric Dumazet wrote: I believe this will hide bugs, that syzbot was able to catch. syzbot failed to catch the problem because of padding u8, u16 and u32 were all immune because they would go out of bounds into a padded buffer :-( On 7/23/20 12:19 PM, David Miller wrote:

[PATCH] netlink: add buffer boundary checking

2020-07-23 Thread Mark Salyzyn
critical and do not need a likely fast path. Signed-off-by: Mark Salyzyn Cc: net...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: kernel-t...@android.com Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Thomas Graf Fixes: bfa83a9e03cf ("[NETLINK]: Type-safe netlink messages/attrib

[PATCH v2] af_key: pfkey_dump needs parameter validation

2020-07-22 Thread Mark Salyzyn
In pfkey_dump() dplen and splen can both be specified to access the xfrm_address_t structure out of bounds in__xfrm_state_filter_match() when it calls addr_match() with the indexes. Return EINVAL if either are out of range. Signed-off-by: Mark Salyzyn Cc: net...@vger.kernel.org Cc: linux-kernel

Re: af_key: pfkey_dump needs parameter validation

2020-07-22 Thread Mark Salyzyn
On 7/22/20 2:33 AM, Steffen Klassert wrote: On Tue, Jul 21, 2020 at 06:23:54AM -0700, Mark Salyzyn wrote: In pfkey_dump() dplen and splen can both be specified to access the xfrm_address_t structure out of bounds in__xfrm_state_filter_match() when it calls addr_match() with the indexes. Return

af_key: pfkey_dump needs parameter validation

2020-07-21 Thread Mark Salyzyn
In pfkey_dump() dplen and splen can both be specified to access the xfrm_address_t structure out of bounds in__xfrm_state_filter_match() when it calls addr_match() with the indexes. Return EINVAL if either are out of range. Signed-off-by: Mark Salyzyn Cc: net...@vger.kernel.org Cc: linux-kernel

[PATCH v2]: arch: arm64: vdso: export the symbols for time()

2020-06-15 Thread Mark Salyzyn
7.52 ns 7.51 ns 93253809 Signed-off-by: Chiawei Wang Signed-off-by: Mark Salyzyn Cc: linux-kernel@vger.kernel.org Cc: kernel-t...@android.com Cc: Catalin Marinas Cc: Will Deacon Cc: Thomas Gleixner Cc: Vincenzo Frascino Cc: Enrico Weigelt Cc: Greg Kroah-Hartman Cc: Alexios

[PATCH]: arch: arm64: vdso: export the symbols for time()

2020-06-15 Thread Mark Salyzyn
7.52 ns 7.51 ns 93253809 Signed-off-by: Chiawei Wang Signed-off-by: Mark Salyzyn --- arch/arm64/include/asm/vdso/compat_gettimeofday.h | 2 ++ arch/arm64/include/asm/vdso/gettimeofday.h| 2 ++ arch/arm64/kernel/vdso/vdso.lds.S | 1 + arch/arm64/kernel

Re: [PATCH] lib/vdso: use CLOCK_REALTIME_COARSE for time()

2020-06-11 Thread Mark Salyzyn
On Jun 11, 2020, at 12:34 PM, Thomas Gleixner wrote: > > Mark Salyzyn writes: >> From: Chiawei Wang >> >> CLOCK_REALTIME in vdso data won't be updated if >> __arch_use_vsyscall() returns false. > > Errm! > > # git grep __arch_use_vsyscall > #

[PATCH] lib/vdso: use CLOCK_REALTIME_COARSE for time()

2020-06-11 Thread Mark Salyzyn
. Signed-off-by: Chiawei Wang Signed-off-by: Mark Salyzyn Cc: linux-kernel@vger.kernel.org Cc: kernel-t...@android.com Cc: sta...@vger.kernel.org # 5.4+ --- lib/vdso/gettimeofday.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c

Re: linux-next: Tree for Oct 23

2019-10-23 Thread Mark Salyzyn
On 10/22/19 11:05 PM, Shaokun Zhang wrote: +Cc: Mark Salyzyn There is a compiler failure on arm64 platform, as follow: zhangshaokun@ubuntu:~/linux-next$ make -j64 CALLscripts/atomic/check-atomics.sh CC arch/arm64/kernel/asm-offsets.s In file included from ./include/linux/sysctl.h

Re: [PATCH] mm: export cma alloc and release

2019-10-07 Thread Mark Salyzyn
On 10/7/19 9:53 AM, Christoph Hellwig wrote: On Mon, Oct 07, 2019 at 09:50:31AM -0700, Mark Salyzyn wrote: On 10/5/19 1:37 AM, Christoph Hellwig wrote: On Thu, Oct 03, 2019 at 09:55:28AM +0100, Catalin Marinas wrote: Aren't drivers supposed to use the DMA API for such allocations rather than

Re: [PATCH] mm: export cma alloc and release

2019-10-07 Thread Mark Salyzyn
not be modularized for the moment. Sincerely -- Mark Salyzyn

Re: [PATCH] ovl: filter of trusted xattr results in audit

2019-10-07 Thread Mark Salyzyn
On 10/7/19 9:40 AM, Greg Kroah-Hartman wrote: On Mon, Oct 07, 2019 at 06:17:25PM +0200, Greg Kroah-Hartman wrote: On Mon, Oct 07, 2019 at 06:16:16PM +0200, Greg Kroah-Hartman wrote: On Mon, Oct 07, 2019 at 09:09:16AM -0700, Mark Salyzyn wrote: When filtering xattr list for reading, presence

Re: [PATCH] ovl: filter of trusted xattr results in audit

2019-10-07 Thread Mark Salyzyn
On 10/7/19 9:17 AM, Greg Kroah-Hartman wrote: On Mon, Oct 07, 2019 at 06:16:16PM +0200, Greg Kroah-Hartman wrote: On Mon, Oct 07, 2019 at 09:09:16AM -0700, Mark Salyzyn wrote: When filtering xattr list for reading, presence of trusted xattr results in a security audit log. However

[PATCH] ovl: filter of trusted xattr results in audit

2019-10-07 Thread Mark Salyzyn
the request to list the xattrs present. Switch to has_capability_noaudit to reflect a more appropriate check. Signed-off-by: Mark Salyzyn Cc: linux-security-mod...@vger.kernel.org Cc: kernel-t...@android.com Cc: Greg Kroah-Hartman Cc: sta...@vger.kernel.org # v3.18 Fixes: upstream a082c6f680da

[PATCH] mm: export cma alloc and release

2019-10-02 Thread Mark Salyzyn
Some drivers can not be turned into a module without cma_alloc and cma_release exported. Examples include ion, and we also found some out of tree infiniband and camera drivers. Signed-off-by: Mark Salyzyn Cc: kernel-t...@android.com Cc: linux-kernel@vger.kernel.org --- mm/cma.c | 2 ++ 1 file

Re: [PATCH v2] net: enable wireless core features with LEGACY_WEXT_ALLCONFIG

2019-09-09 Thread Mark Salyzyn
On 9/6/19 4:30 PM, Greg KH wrote: On Fri, Sep 06, 2019 at 12:24:00PM -0700, Mark Salyzyn wrote: In embedded environments the requirements are to be able to pick and chose which features one requires built into the kernel. If an embedded environment wants to supports loading modules that have

[PATCH v2] net: enable wireless core features with LEGACY_WEXT_ALLCONFIG

2019-09-06 Thread Mark Salyzyn
features to provide the API surface for them to load. Introduce CONFIG_LEGACY_WEXT_ALLCONFIG to select all legacy wireless extension core features by activating in turn all the associated hidden configuration options, without having to specifically select any wireless module(s). Signed-off-by: Mark

[PATCH] net: enable wireless core features with WIRELESS_ALLCONFIG

2019-09-06 Thread Mark Salyzyn
to provide the API surface for them to load. Introduce CONFIG_WIRELESS_ALLCONFIG to select all wireless core features by activating all the hidden configuration options, without having to specifically select any wireless module(s). Signed-off-by: Mark Salyzyn Cc: kernel-t...@android.com Cc: Johannes Berg

[PATCH] overlayfs: filter of trusted xattr results in audit.

2019-08-29 Thread Mark Salyzyn
the request to list the xattrs present. Switch to ns_capable_noaudit to reflect a more appropriate check. Signed-off-by: Mark Salyzyn Cc: linux-ker...@vger.kernel.orga Cc: linux-security-mod...@vger.kernel.org Cc: kernel-t...@android.com Cc: sta...@vger.kernel.org # 4.4, 4.9, 4.14 & 4.19 ---

Re: [PATCH] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-13 Thread Mark Salyzyn
r") b296821a7c42 ("xattr_handler: pass dentry and inode as separate arguments of ->get()") ef4af94edcf8 ("orangefs: switch decode_dirents() to use of kcalloc()") f0ed4418d46d ("Orangefs: Remove upcall trailers which are not used.") f7ab093f74bf ("Orangefs: kernel client part 1") f7be4ee07fb7 ("Orangefs: kernel client part 4") NOTE: The patch will not be queued to stable trees until it is upstream. How should we proceed with this patch? -- Thanks, Sasha Wait for upstream of course. Given the conflicts, I can provide back-ports once upstream upon request. It should be noted that the backports should be mechanical and trivial (skip non-existent filesystems like orangfs, drop separate inode argument that did not exist in earlier kernels). I will submit the next spin (missed a few filesystems, build errors) with references to the requested stable trees again, so noise will continue. Sincerely -- Mark Salyzyn

[PATCH v12 3/5] overlayfs: handle XATTR_NOSECURITY flag for get xattr method

2019-07-30 Thread Mark Salyzyn
er that the target context was blocked. For selinux this would solve the cosmetic issue of the selinux log and allow audit2allow to correctly report the rule needed to address the access problem. Signed-off-by: Mark Salyzyn Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. B

[PATCH v12 1/5] overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh

2019-07-30 Thread Mark Salyzyn
Assumption never checked, should fail if the mounter creds are not sufficient. Signed-off-by: Mark Salyzyn Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley Cc: linux-unio...@vger.kernel.org Cc: linux

Re: [PATCH v10 4/5] overlayfs: internal getxattr operations without sepolicy checking

2019-07-25 Thread Mark Salyzyn
Thanks for the review. On 7/25/19 4:00 AM, Amir Goldstein wrote: On Wed, Jul 24, 2019 at 10:57 PM Mark Salyzyn wrote: Check impure, opaque, origin & meta xattr with no sepolicy audit (using __vfs_getxattr) since these operations are internal to overlayfs operations and do not disclose

[PATCH v10 4/5] overlayfs: internal getxattr operations without sepolicy checking

2019-07-24 Thread Mark Salyzyn
heck can be expensive. Signed-off-by: Mark Salyzyn Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley Cc: linux-unio...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: kern

[PATCH v10 1/5] overlayfs: check CAP_DAC_READ_SEARCH before issuing exportfs_decode_fh

2019-07-24 Thread Mark Salyzyn
Assumption never checked, should fail if the mounter creds are not sufficient. Signed-off-by: Mark Salyzyn Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley Cc: linux-unio...@vger.kernel.org Cc: linux

[PATCH v10 2/5] Add optional __get xattr method paired to __vfs_getxattr

2019-07-24 Thread Mark Salyzyn
Add an optional __get xattr method that would be called, if set, only in __vfs_getxattr instead of the regular get xattr method. Signed-off-by: Mark Salyzyn Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley

[PATCH v10 3/5] overlayfs: add __get xattr method

2019-07-24 Thread Mark Salyzyn
in, rather than being denied with an -EACCES when vfs_getxattr handler is called. Signed-off-by: Mark Salyzyn Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley Cc: linux-unio...@vger.kernel.org Cc: linux

[PATCH v10 5/5] overlayfs: override_creds=off option bypass creator_cred

2019-07-24 Thread Mark Salyzyn
or general use in time. Signed-off-by: Mark Salyzyn Cc: Miklos Szeredi Cc: Jonathan Corbet Cc: Vivek Goyal Cc: Eric W. Biederman Cc: Amir Goldstein Cc: Randy Dunlap Cc: Stephen Smalley Cc: linux-unio...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc

Re: RFC: BUG: overlayfs getxattr recursion leaves a poison sid.

2019-07-09 Thread Mark Salyzyn
On 7/9/19 9:33 AM, Casey Schaufler wrote: On 7/9/2019 9:23 AM, Mark Salyzyn wrote: For EACCES return for getxattr, sid appears to be expected updated in parent node. For some accesses purely cosmetic for correct avc logging, and depending on kernel vintage for others (older than 4.4) the lack

RFC: BUG: overlayfs getxattr recursion leaves a poison sid.

2019-07-09 Thread Mark Salyzyn
t;sid = cisec->sid; + } + EXPORT_SYMBOL_GPL(selinux_copy_sid); Sincerely -- Mark Salyzyn

Re: [PATCH v6 17/19] mips: Add support for generic vDSO

2019-06-03 Thread Mark Salyzyn
On 05/31/2019 01:34 AM, Arnd Bergmann wrote: On Thu, May 30, 2019 at 4:16 PM Vincenzo Frascino wrote: --- a/arch/mips/vdso/vdso.lds.S +++ b/arch/mips/vdso/vdso.lds.S @@ -99,6 +99,10 @@ VERSION global: __vdso_clock_gettime; __vdso_gettimeofday; +

Please cherrypick 592acbf1682128 to 3.18.y and 4.4.y

2019-05-23 Thread Mark Salyzyn
Cherry pick security-related fix 592acbf16821288ecdc4192c47e3774a4c48bb64 ("ext4: zero out the unused memory region in the extent tree block") to 3.18.y and 4.4.y The cherry-pick is clean and requires no back-porting. Is already present in 4.9.y+ Signed-off-by: Mark Salyzyn

Re: [PATCH] arch64: export __flush_dcache_area

2019-05-20 Thread Mark Salyzyn
On 05/17/2019 02:53 PM, Catalin Marinas wrote: On Fri, May 17, 2019 at 12:59:56PM -0700, Mark Salyzyn wrote: Some (out of tree modular) drivers feel a need to ensure data is flushed to the DDR before continuing flow. Signed-off-by: Mark Salyzyn Cc: linux-kernel@vger.kernel.org Cc: kernel-t

[PATCH] arch64: export __flush_dcache_area

2019-05-17 Thread Mark Salyzyn
Some (out of tree modular) drivers feel a need to ensure data is flushed to the DDR before continuing flow. Signed-off-by: Mark Salyzyn Cc: linux-kernel@vger.kernel.org Cc: kernel-t...@android.com --- arch/arm64/mm/cache.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/mm

Re: overlayfs access checks on underlying layers

2019-03-04 Thread Mark Salyzyn
On 11/29/2018 05:49 AM, Vivek Goyal wrote: So will override_creds=off solve the NFS issue also where all access will happen with the creds of task now? Though it will stil require more priviliges in task for other operations in overlay to succeed. NFS problems seems to have ended the

[stable 3.18 backport v2] netlink: Trim skb to alloc size to avoid MSG_TRUNC

2019-02-22 Thread Mark Salyzyn
_size was only little over 32KiB. This patch trims skb to allocated size in order to allow the user to avoid truncation with more reasonable buffer size. Signed-off-by: Ronen Arad Signed-off-by: David S. Miller (cherry pick commit db65a3aaf29ecce2e34271d52e8d2336b97bd9fe) Signed-off-by: M

Re: stable 3.18 backport: netlink: Trim skb to alloc size to avoid MSG_TRUNC

2019-02-04 Thread Mark Salyzyn
On 02/01/2019 11:41 AM, Mark Salyzyn wrote: if (alloc_size < nlk->max_recvmsg_len) { if (alloc_min_size < nlk->max_recvmgs_len) { -- Mark

stable 3.18 backport: netlink: Trim skb to alloc size to avoid MSG_TRUNC

2019-02-01 Thread Mark Salyzyn
2KiB. This patch trims skb to allocated size in order to allow the user to avoid truncation with more reasonable buffer size. Signed-off-by: Ronen Arad Signed-off-by: David S. Miller (cherry pick commit db65a3aaf29ecce2e34271d52e8d2336b97bd9fe) Signed-off-by: Mark Salyzyn --- net/netlink/af_netli

/proc/iomem: only expose physical resource addresses to privileged users

2018-11-02 Thread Mark Salyzyn
t that had to be reverted because some system programs actually use it. This limits all the detailed resource information to properly credentialed users instead. Signed-off-by: Linus Torvalds Signed-off-by: Mark Salyzyn Cc: linux-kernel@vger.kernel.org Cc: sta...@vger.kernel.org # 3.18 --- kernel/resou

/proc/iomem: only expose physical resource addresses to privileged users

2018-11-02 Thread Mark Salyzyn
t that had to be reverted because some system programs actually use it. This limits all the detailed resource information to properly credentialed users instead. Signed-off-by: Linus Torvalds Signed-off-by: Mark Salyzyn Cc: linux-kernel@vger.kernel.org Cc: sta...@vger.kernel.org # 3.18 --- kernel/resou

Re: RESEND and REBASE arm+arm64+aarch32 vdso rewrite

2018-10-02 Thread Mark Salyzyn
On 10/02/2018 03:00 AM, Catalin Marinas wrote: On Mon, Oct 01, 2018 at 01:44:52PM -0700, Mark Salyzyn wrote: On 10/01/2018 11:49 AM, John Stultz wrote: On Mon, Oct 1, 2018 at 10:58 AM, Mark Salyzyn wrote: Last sent 23 Nov 2016. The following 23 patches are rebased and resent, and represent

Re: RESEND and REBASE arm+arm64+aarch32 vdso rewrite

2018-10-02 Thread Mark Salyzyn
On 10/02/2018 03:00 AM, Catalin Marinas wrote: On Mon, Oct 01, 2018 at 01:44:52PM -0700, Mark Salyzyn wrote: On 10/01/2018 11:49 AM, John Stultz wrote: On Mon, Oct 1, 2018 at 10:58 AM, Mark Salyzyn wrote: Last sent 23 Nov 2016. The following 23 patches are rebased and resent, and represent

Re: RESEND and REBASE arm+arm64+aarch32 vdso rewrite

2018-10-02 Thread Mark Salyzyn
On 10/02/2018 01:50 AM, Russell King - ARM Linux wrote: On Mon, Oct 01, 2018 at 01:44:52PM -0700, Mark Salyzyn wrote: Despite the gain of 0.4% for screen-on battery life, where Android has a mix of 64 and 32 bit applications, thus still relevant _today_ on 64 bit architectures (providing vDSO32

Re: RESEND and REBASE arm+arm64+aarch32 vdso rewrite

2018-10-02 Thread Mark Salyzyn
On 10/02/2018 01:50 AM, Russell King - ARM Linux wrote: On Mon, Oct 01, 2018 at 01:44:52PM -0700, Mark Salyzyn wrote: Despite the gain of 0.4% for screen-on battery life, where Android has a mix of 64 and 32 bit applications, thus still relevant _today_ on 64 bit architectures (providing vDSO32

Re: RESEND [PATCH v6 11/12] lib: vdso: Add support for CLOCK_BOOTTIME

2018-10-01 Thread Mark Salyzyn
On 10/01/2018 11:15 AM, Thomas Gleixner wrote: On Mon, 1 Oct 2018, Mark Salyzyn wrote: +static notrace int do_boottime(const struct vdso_data *vd, struct timespec *ts) +{ + u32 seq, mult, shift; + u64 nsec, cycle_last; + vdso_wtm_clock_nsec_t wtm_nsec; + + /* open

Re: RESEND [PATCH v6 11/12] lib: vdso: Add support for CLOCK_BOOTTIME

2018-10-01 Thread Mark Salyzyn
On 10/01/2018 11:15 AM, Thomas Gleixner wrote: On Mon, 1 Oct 2018, Mark Salyzyn wrote: +static notrace int do_boottime(const struct vdso_data *vd, struct timespec *ts) +{ + u32 seq, mult, shift; + u64 nsec, cycle_last; + vdso_wtm_clock_nsec_t wtm_nsec; + + /* open

Re: RESEND and REBASE arm+arm64+aarch32 vdso rewrite

2018-10-01 Thread Mark Salyzyn
On 10/01/2018 11:49 AM, John Stultz wrote: On Mon, Oct 1, 2018 at 10:58 AM, Mark Salyzyn wrote: Last sent 23 Nov 2016. The following 23 patches are rebased and resent, and represent a rewrite of the arm and arm64 vDSO into C, adding support for arch32 (32-bit user space hosted 64-bit kernels

Re: RESEND and REBASE arm+arm64+aarch32 vdso rewrite

2018-10-01 Thread Mark Salyzyn
On 10/01/2018 11:49 AM, John Stultz wrote: On Mon, Oct 1, 2018 at 10:58 AM, Mark Salyzyn wrote: Last sent 23 Nov 2016. The following 23 patches are rebased and resent, and represent a rewrite of the arm and arm64 vDSO into C, adding support for arch32 (32-bit user space hosted 64-bit kernels

RESEND [PATCH v2 6/6] arm64: Wire up and expose the new compat vDSO

2018-10-01 Thread Mark Salyzyn
Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: John Stultz Cc: Mark Rutland Cc: Laura Abbott Cc: Kees Cook Cc: Ard Biesheuvel Cc: Andy Gross Cc: Andrew Pinski Cc: Thomas

RESEND [PATCH v2 6/6] arm64: Wire up and expose the new compat vDSO

2018-10-01 Thread Mark Salyzyn
Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: John Stultz Cc: Mark Rutland Cc: Laura Abbott Cc: Kees Cook Cc: Ard Biesheuvel Cc: Andy Gross Cc: Andrew Pinski Cc: Thomas

RESEND [PATCH 5/6] arm64: compat: 32-bit vDSO setup

2018-10-01 Thread Mark Salyzyn
From: Kevin Brodsky If the compat vDSO is enabled, install it in compat processes. In this case, the compat vDSO replaces the sigreturn page (it provides its own sigreturn trampolines). Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc

RESEND [PATCH 5/6] arm64: compat: 32-bit vDSO setup

2018-10-01 Thread Mark Salyzyn
From: Kevin Brodsky If the compat vDSO is enabled, install it in compat processes. In this case, the compat vDSO replaces the sigreturn page (it provides its own sigreturn trampolines). Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc

RESEND [PATCH v2 4/6] arm64: compat: Add a 32-bit vDSO

2018-10-01 Thread Mark Salyzyn
n both arm and arm64, overlapping any optimizations for each architecture. Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Dave Martin Cc: "Eric W. Biederman" Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: J

RESEND [PATCH v2 4/6] arm64: compat: Add a 32-bit vDSO

2018-10-01 Thread Mark Salyzyn
n both arm and arm64, overlapping any optimizations for each architecture. Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Dave Martin Cc: "Eric W. Biederman" Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: J

RESEND [PATCH 1/6] arm64: compat: Use vDSO sigreturn trampolines if available

2018-10-01 Thread Mark Salyzyn
From: Kevin Brodsky If the compat vDSO is enabled, it replaces the sigreturn page. Therefore, we use the sigreturn trampolines the vDSO provides instead. Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas

RESEND [PATCH 1/6] arm64: compat: Use vDSO sigreturn trampolines if available

2018-10-01 Thread Mark Salyzyn
From: Kevin Brodsky If the compat vDSO is enabled, it replaces the sigreturn page. Therefore, we use the sigreturn trampolines the vDSO provides instead. Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas

RESEND [PATCH 3/6] arm64: Refactor vDSO init/setup

2018-10-01 Thread Mark Salyzyn
From: Kevin Brodsky Move the logic for setting up mappings and pages for the vDSO into static functions. This makes the vDSO setup code more consistent with the compat side and will allow to reuse it for the future compat vDSO. Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested

RESEND [PATCH 2/6] arm64: elf: Set AT_SYSINFO_EHDR in compat processes

2018-10-01 Thread Mark Salyzyn
of elf_addr_t, because elf_addr_t is Elf32_Off in compat_binfmt_elf.c, and casting context.vdso to u32 would trigger a pointer narrowing warning. Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc

RESEND [PATCH 3/6] arm64: Refactor vDSO init/setup

2018-10-01 Thread Mark Salyzyn
From: Kevin Brodsky Move the logic for setting up mappings and pages for the vDSO into static functions. This makes the vDSO setup code more consistent with the compat side and will allow to reuse it for the future compat vDSO. Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested

RESEND [PATCH 2/6] arm64: elf: Set AT_SYSINFO_EHDR in compat processes

2018-10-01 Thread Mark Salyzyn
of elf_addr_t, because elf_addr_t is Elf32_Off in compat_binfmt_elf.c, and casting context.vdso to u32 would trigger a pointer narrowing warning. Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc

RESEND [PATCH] arm64: compat: Expose offset to registers in sigframes

2018-10-01 Thread Mark Salyzyn
. Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: John Stultz Cc: Mark Rutland Cc: Laura Abbott Cc: Kees Cook Cc: Ard Biesheuvel Cc: Andy

RESEND [PATCH] arm64: compat: Expose offset to registers in sigframes

2018-10-01 Thread Mark Salyzyn
. Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: John Stultz Cc: Mark Rutland Cc: Laura Abbott Cc: Kees Cook Cc: Ard Biesheuvel Cc: Andy

RESEND [PATCH v3 3/3] arm64: compat: Add CONFIG_KUSER_HELPERS

2018-10-01 Thread Mark Salyzyn
helper from a 32-bit process will result in a segfault. Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: John Stultz Cc: Mark Rutland Cc: Laura

RESEND [PATCH v3 3/3] arm64: compat: Add CONFIG_KUSER_HELPERS

2018-10-01 Thread Mark Salyzyn
helper from a 32-bit process will result in a segfault. Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: John Stultz Cc: Mark Rutland Cc: Laura

RESEND [PATCH v3 2/3] arm64: compat: Split the sigreturn trampolines and kuser helpers (assembler sources)

2018-10-01 Thread Mark Salyzyn
sources to its own file. Wrapped the comments to reduce the wrath of checkpatch.pl. Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: John Stultz

RESEND [PATCH v3 2/3] arm64: compat: Split the sigreturn trampolines and kuser helpers (assembler sources)

2018-10-01 Thread Mark Salyzyn
sources to its own file. Wrapped the comments to reduce the wrath of checkpatch.pl. Signed-off-by: Kevin Brodsky Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James Morse Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Andy Lutomirski Cc: Dmitry Safonov Cc: John Stultz

RESEND [PATCH v3 1/3] arm64: compat: Split the sigreturn trampolines and kuser helpers (C sources)

2018-10-01 Thread Mark Salyzyn
on [vectors] being there as the last mapping in /proc/maps). mm->context.vdso used to point to the [vectors] page, which is unnecessary (as its address is fixed). It now points to the [sigpage] page (whose address is randomized like a vDSO). Signed-off-by: Kevin Brodsky Signed-off-by: Mark Saly

RESEND [PATCH v3 1/3] arm64: compat: Split the sigreturn trampolines and kuser helpers (C sources)

2018-10-01 Thread Mark Salyzyn
on [vectors] being there as the last mapping in /proc/maps). mm->context.vdso used to point to the [vectors] page, which is unnecessary (as its address is fixed). It now points to the [sigpage] page (whose address is randomized like a vDSO). Signed-off-by: Kevin Brodsky Signed-off-by: Mark Saly

RESEND [PATCH] lib: vdso: add support for time

2018-10-01 Thread Mark Salyzyn
From: Mark Salyzyn Add time() vdso support to match up with existing support in the x86's vdso. Currently benefitting arm and arm64 which uses the common vgettimeofday.c implementation. On arm provides about a ~14 fold improvement in speed over the straight syscall, and about a ~5 fold

RESEND [PATCH] lib: vdso: add support for time

2018-10-01 Thread Mark Salyzyn
From: Mark Salyzyn Add time() vdso support to match up with existing support in the x86's vdso. Currently benefitting arm and arm64 which uses the common vgettimeofday.c implementation. On arm provides about a ~14 fold improvement in speed over the straight syscall, and about a ~5 fold

RESEND [PATCH v5 12/12] lib: vdso: do not expose gettimeofday, if no arch supported timer

2018-10-01 Thread Mark Salyzyn
to simplify future maintenance. If ARCH_PROVIDES_TIMER is not defined, do not expose gettimeofday. libc will default directly to syscall. Also ifdef clock_gettime switch cases and stubs if not supported and other unused components. Signed-off-by: Mark Salyzyn Tested-by: Mark Salyzyn Cc: James

  1   2   3   4   5   6   7   >