Re: [PATCH RFC v1 00/15] iommu/virtio: Nested stage support with Arm

2021-01-26 Thread Auger Eric
Hi Vivek, On 1/21/21 6:34 PM, Vivek Kumar Gautam wrote: > Hi Eric, > > > On 1/19/21 2:33 PM, Auger Eric wrote: >> Hi Vivek, >> >> On 1/15/21 1:13 PM, Vivek Gautam wrote: >>> This patch-series aims at enabling Nested stage translation in guests >>>

Re: WARNING in pskb_expand_head

2021-01-25 Thread Eric Dumazet
oducer: https://syzkaller.appspot.com/x/repro.c?x=13856bc750 > > > > The issue was bisected to: > > > > commit 3226b158e67cfaa677fd180152bfb28989cb2fac > > Author: Eric Dumazet > > Date: Wed Jan 13 16:18:19 2021 + > > > > net: avoid 32 x t

Re: [PATCH net] tcp: make TCP_USER_TIMEOUT accurate for zero window probes

2021-01-22 Thread Eric Dumazet
rto_to_user_timeout() > helper to improve accuracy"). > > Signed-off-by: Enke Chen > Reviewed-by: Neal Cardwell > --- SGTM, thanks ! Signed-off-by: Eric Dumazet

[PATCH v5 4/4] integrity: Load mokx variables into the blacklist keyring

2021-01-22 Thread Eric Snowberg
mokx into the blacklist keyring during boot. Signed-off-by: Eric Snowberg Suggested-by: James Bottomley --- security/integrity/platform_certs/load_uefi.c | 20 +-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/security/integrity/platform_certs/load_uefi.c b

[PATCH v5 1/4] certs: Add EFI_CERT_X509_GUID support for dbx entries

2021-01-22 Thread Eric Snowberg
in the .blacklist keyring are referenced, if a matching key is found, the key will be rejected. Signed-off-by: Eric Snowberg Reviewed-by: Jarkko Sakkinen Signed-off-by: David Howells --- v5: Function name changes done by David Howells --- certs/blacklist.c | 32

[PATCH v5 0/4] Add EFI_CERT_X509_GUID support for dbx/mokx entries

2021-01-22 Thread Eric Snowberg
] https://patchwork.kernel.org/project/linux-security-module/patch/20200916004927.64276-1-eric.snowb...@oracle.com/ [2] https://lore.kernel.org/patchwork/cover/1315485/ Eric Snowberg (4): certs: Add EFI_CERT_X509_GUID support for dbx entries certs: Move load_system_certificate_list to a common

[PATCH v5 3/4] certs: Add ability to preload revocation certs

2021-01-22 Thread Eric Snowberg
Add a new Kconfig option called SYSTEM_REVOCATION_KEYS. If set, this option should be the filename of a PEM-formated file containing X.509 certificates to be included in the default blacklist keyring. Signed-off-by: Eric Snowberg Acked-by: Jarkko Sakkinen --- certs/Kconfig

[PATCH v5 2/4] certs: Move load_system_certificate_list to a common function

2021-01-22 Thread Eric Snowberg
Move functionality within load_system_certificate_list to a common function, so it can be reused in the future. Signed-off-by: Eric Snowberg Acked-by: Jarkko Sakkinen --- certs/Makefile | 2 +- certs/common.c | 56 ++ certs/common.h

Re: [RFC PATCH v3 1/8] Use refcount_t for ucounts reference counting

2021-01-21 Thread Eric W. Biederman
Alexey Gladkov writes: > On Tue, Jan 19, 2021 at 07:57:36PM -0600, Eric W. Biederman wrote: >> Alexey Gladkov writes: >> >> > On Mon, Jan 18, 2021 at 12:34:29PM -0800, Linus Torvalds wrote: >> >> On Mon, Jan 18, 2021 at 11:46 AM Alexey Gladkov >> >

[RFC][PATCH] apparmor: Enforce progressively tighter permissions for no_new_privs

2021-01-20 Thread Eric W. Biederman
pace by having no_new_privs enforce progressinvely tighter permissions. Fixes: 9fcf78cca198 ("apparmor: update domain transitions that are subsets of confinement at nnp") Signed-off-by: Eric W. Biederman --- I came accross this while examining the places cred_guard_mutex is used and tryi

Re: [RFC][PATCH] apparmor: Enforce progressively tighter permissions for no_new_privs

2021-01-20 Thread Eric W. Biederman
TL;DR selinux and apparmor ignore no_new_privs What? John Johansen writes: > On 1/20/21 1:26 PM, Eric W. Biederman wrote: >> >> The current understanding of apparmor with respect to no_new_privs is at >> odds with how no_new_privs is implemented and unde

Re: [PATCH v4] certs: Add EFI_CERT_X509_GUID support for dbx entries

2021-01-20 Thread Eric Snowberg
> On Jan 20, 2021, at 4:26 AM, Jarkko Sakkinen wrote: > > On Fri, Jan 15, 2021 at 09:49:02AM -0700, Eric Snowberg wrote: >> >>> On Jan 15, 2021, at 2:15 AM, Jarkko Sakkinen wrote: >>> >>> On Wed, Jan 13, 2021 at 05:11:10PM -0700, Eric Snowberg wrot

Re: [RFC][PATCH] apparmor: Enforce progressively tighter permissions for no_new_privs

2021-01-20 Thread Eric W. Biederman
This should now Cc the correct email address for James Morris. ebied...@xmission.com (Eric W. Biederman) writes: > The current understanding of apparmor with respect to no_new_privs is at > odds with how no_new_privs is implemented and understood by the rest of > the kernel

Re: [PATCH] Increase limit of max_user_watches from 1/25 to 1/16

2021-01-20 Thread Eric Curtin
On Wed, 20 Jan 2021 at 13:02, Eric Curtin wrote: > > The current default value for max_user_watches is the 1/16 (6.25%) of > the available low memory, divided for the "watch" cost in bytes. > > Tools like inotify-tools and visual studio code, seem to hit these

[PATCH] Increase limit of max_user_watches from 1/25 to 1/16

2021-01-20 Thread Eric Curtin
value for this. Signed-off-by: Eric Curtin --- Documentation/admin-guide/sysctl/fs.rst | 4 ++-- fs/eventpoll.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/admin-guide/sysctl/fs.rst b/Documentation/admin-guide/sysctl/fs

[PATCH] Update Documentation/admin-guide/sysctl/fs.rst

2021-01-20 Thread Eric Curtin
max_user_watches for epoll should say 1/25, rather than 1/32 Signed-off-by: Eric Curtin --- Documentation/admin-guide/sysctl/fs.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/sysctl/fs.rst b/Documentation/admin-guide/sysctl/fs.rst index

Re: [PATCH net] tcp: Fix potential use-after-free due to double kfree().

2021-01-20 Thread Eric Dumazet
his kind of issue does not happen for IPv6. This is > > because tcp_v6_syn_recv_sock() clones both ipv6_opt and pktopts which > > correspond to ireq_opt in IPv4. > > > > Fixes: 01770a166165 ("tcp: fix race condition when creating child sockets > > from syncookies") > > CC: Ricardo Dias > > Signed-off-by: Kuniyuki Iwashima > > Reviewed-by: Benjamin Herrenschmidt > > Ricardo, Eric, any reason this was written this way? Well, I guess that was a plain bug. IPv4 options are not used often I think. Reviewed-by: Eric Dumazet

Re: [RFC v3 2/2] vfio/platform: msi: add Broadcom platform devices

2021-01-20 Thread Auger Eric
Hi Alex, On 1/19/21 11:45 PM, Alex Williamson wrote: > On Fri, 15 Jan 2021 10:24:33 +0100 > Auger Eric wrote: > >> Hi Vikas, >> On 1/15/21 7:35 AM, Vikas Gupta wrote: >>> Hi Eric, >>> >>> On Tue, Jan 12, 2021 at 2:52 PM Auger Eric wrote: &

Re: [dm-devel] [PATCH AUTOSEL 5.4 03/26] dm integrity: select CRYPTO_SKCIPHER

2021-01-19 Thread Eric Biggers
se it was renamed from CRYPTO_BLKCIPHER in 5.5. If this patch is really important enough to backport, CRYPTO_SKCIPHER will need to be changed to CRYPTO_BLKCIPHER. - Eric

Re: [RFC PATCH v3 1/8] Use refcount_t for ucounts reference counting

2021-01-19 Thread Eric W. Biederman
ebied...@xmission.com (Eric W. Biederman) writes: > Alexey Gladkov writes: > >> On Mon, Jan 18, 2021 at 12:34:29PM -0800, Linus Torvalds wrote: >>> On Mon, Jan 18, 2021 at 11:46 AM Alexey Gladkov >>> wrote: >>> > >>> > Sorry about that.

Re: [RFC PATCH v3 1/8] Use refcount_t for ucounts reference counting

2021-01-19 Thread Eric W. Biederman
eems nice. Perhaps the path forward would be to start with stupid/correct code that always takes the ucounts_lock for every increment of ucounts->count, that is later replaced with something more optimal. Not impacting performance in the non-namespace cases and having good performance in the other cases is a fundamental requirement of merging code like this. Eric

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

2021-01-19 Thread Eric W. Biederman
this works with stacking. In particular ovl_xattr_set appears to call vfs_getxattr without overriding the creds. What the purpose of that is I haven't quite figured out. It looks like it is just a probe to see if an xattr is present so maybe it is ok. Acked-by: "Eric W. Bieder

Re: [PATCH 0/2] capability conversion fixes

2021-01-19 Thread Eric W. Biederman
a different userns thatn curent_user_ns for the overlay filesystem and that would break this. So while I agree with the making a minimal fix for now. We need a good fix because this code is much too subtle, and it can break very easily with no one noticing. Eric > Thanks, > Miklos

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

2021-01-19 Thread Eric W. Biederman
delegated_inode and breaking leases. Code that is enabled with CONFIG_FILE_LOCKING. So unless I am missing something this introduces a different regression into ecryptfs. > > Reported-by: Eric W. Biederman > Cc: Tyler Hicks > Fixes: 7c03e2cda4a5 ("vfs: move cap_convert

[PATCH] rename lpfc_sli4_dump_page_a0 to lpfc_sli4_dump_sfp_pagea0

2021-01-19 Thread Eric Curtin
Comment did not match function signature. Signed-off-by: Eric Curtin --- drivers/scsi/lpfc/lpfc_mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index 3414ffcb26fe..c03a7f12dd65 100644 --- a/drivers/scsi

Re: [PATCH RFC v1 00/15] iommu/virtio: Nested stage support with Arm

2021-01-19 Thread Auger Eric
t virtio backend > and support in VMM. > > For testing we have added necessary support in kvmtool. The changes in > kvmtool are based on virtio-iommu development branch by Jean-Philippe > Brucker [3]. > > The tested kernel branch contains following in the order bottom to top >

Re: [RFC V1 3/7] crypto: ghash - Optimized GHASH computations

2021-01-15 Thread Eric Biggers
CLMULQDQ and not AES-NI. In general, we've tried to > implement x86 CPU features independently, even if they never show up in > a real CPU independently. We only add optimized implementations of crypto algorithms if they are actually useful, though. If they would never be used in practice, that's not useful. - Eric

Re: [RFC V1 3/7] crypto: ghash - Optimized GHASH computations

2021-01-15 Thread Eric Biggers
case for authentication only. > > Although I am not sure if GHASH is specifically used for this or SHA? > > Also, I do not know of any cores that implement PCLMULQDQ and not AES-NI. > dm-verity only uses unkeyed hash algorithms. So no, it doesn't use GHASH. - Eric

Re: [PATCH v4] certs: Add EFI_CERT_X509_GUID support for dbx entries

2021-01-15 Thread Eric Snowberg
> On Jan 15, 2021, at 10:21 AM, James Bottomley > wrote: > > On Tue, 2020-09-15 at 20:49 -0400, Eric Snowberg wrote: >> The Secure Boot Forbidden Signature Database, dbx, contains a list of >> now revoked signatures and keys previously approved to boot with UEFI >

Re: [PATCH v4] certs: Add EFI_CERT_X509_GUID support for dbx entries

2021-01-15 Thread Eric Snowberg
> On Jan 15, 2021, at 2:15 AM, Jarkko Sakkinen wrote: > > On Wed, Jan 13, 2021 at 05:11:10PM -0700, Eric Snowberg wrote: >> >>> On Jan 13, 2021, at 1:41 PM, Jarkko Sakkinen >>> wrote: >>> >>> On Tue, Jan 12, 2021 at 02:57:39PM +0

Re: [PATCH net] skbuff: back tiny skbs with kmalloc() in __netdev_alloc_skb() too

2021-01-15 Thread Eric Dumazet
On Fri, Jan 15, 2021 at 12:55 AM Alexander Lobakin wrote: > > Commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for > tiny skbs") ensured that skbs with data size lower than 1025 bytes > will be kmalloc'ed to avoid excessive page cache fragmentation and > memory consumption. > Howeve

Re: cBPF socket filters failing - inexplicably?

2021-01-15 Thread Eric Dumazet
is too late to filter. > > Eric, thoughts? Exactly, this is what happens. I do not know how tcpdump and other programs deal with this. Maybe by setting a small buffer size, or draining the queue. > > On Wed, Jan 6, 2021 at 6:55 AM Tom Cook wrote: > > > > Another factoid

Re: [RFC v3 1/2] vfio/platform: add support for msi

2021-01-15 Thread Auger Eric
Hi Vikas, On 1/15/21 7:26 AM, Vikas Gupta wrote: > Hi Eric, > > On Tue, Jan 12, 2021 at 2:30 PM Auger Eric wrote: >> >> Hi Vikas, >> >> On 1/5/21 6:53 AM, Vikas Gupta wrote: >>> On Tue, Dec 22, 2020 at 10:57 PM Auger Eric wrote: >>>> >

Re: [RFC v3 2/2] vfio/platform: msi: add Broadcom platform devices

2021-01-15 Thread Auger Eric
Hi Vikas, On 1/15/21 7:35 AM, Vikas Gupta wrote: > Hi Eric, > > On Tue, Jan 12, 2021 at 2:52 PM Auger Eric wrote: >> >> Hi Vikas, >> >> On 12/14/20 6:45 PM, Vikas Gupta wrote: >>> Add msi support for Broadcom platform devices >>> >>> Si

Re: [PATCH v13 07/15] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs

2021-01-14 Thread Auger Eric
Hi Jean, On 1/14/21 6:33 PM, Jean-Philippe Brucker wrote: > Hi Eric, > > On Thu, Jan 14, 2021 at 05:58:27PM +0100, Auger Eric wrote: >>>> The uacce-devel branches from >>>>> https://github.com/Linaro/linux-kernel-uadk do provide this at the moment >&g

Re: [PATCH v13 07/15] iommu/smmuv3: Allow stage 1 invalidation with unmanaged ASIDs

2021-01-14 Thread Auger Eric
Hi Shameer, Jean-Philippe, On 12/4/20 11:23 AM, Auger Eric wrote: > Hi Shameer, Jean-Philippe, > > On 12/4/20 11:20 AM, Shameerali Kolothum Thodi wrote: >> Hi Jean, >> >>> -Original Message- >>> From: Jean-Philippe Brucker [mailto:jean-phili...@li

[PATCH v2 5/9] KVM: arm: move has_run_once after the map_resources

2021-01-14 Thread Eric Auger
executing the test. This patch moves the assignment after the kvm_vgic_map_resources(). Signed-off-by: Eric Auger --- v1 -> v2: - slight reword of the commit msg (for instance) --- arch/arm64/kvm/arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/arm.c b/a

[PATCH v2 8/9] KVM: arm64: vgic-v3: Expose GICR_TYPER.Last for userspace

2021-01-14 Thread Eric Auger
R.Last bit still makes sense for architecture compliance. This patch restores its support (if the redistributor region was set) while keeping the code safe. Signed-off-by: Eric Auger --- arch/arm64/kvm/vgic/vgic-mmio-v3.c | 7 ++- include/kvm/arm_vgic.h | 1 + 2 files changed, 7

[PATCH v2 7/9] KVM: arm64: Simplify argument passing to vgic_uaccess_[read|write]

2021-01-14 Thread Eric Auger
,write}. Signed-off-by: Eric Auger --- v1 -> v2: - reworded the commit message as suggested by Alexandru --- arch/arm64/kvm/vgic/vgic-mmio.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/arm64/kvm/vgic/vgic-mmio.c b/arch/arm64/kvm/vgic/vgic-mmio.c in

[PATCH v2 9/9] KVM: selftests: aarch64/vgic-v3 init sequence tests

2021-01-14 Thread Eric Auger
group and especially the GICR_TYPER read. The goal was to test the case recently fixed by commit 23bde34771f1 ("KVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace"). The API under test can be found at Documentation/virt/kvm/devices/arm-vgic-v3.rst Signed-off-by:

[PATCH v2 6/9] docs: kvm: devices/arm-vgic-v3: enhance KVM_DEV_ARM_VGIC_CTRL_INIT doc

2021-01-14 Thread Eric Auger
kvm_arch_vcpu_precreate() returns -EBUSY if the vgic is already initialized. So let's document that KVM_DEV_ARM_VGIC_CTRL_INIT must be called after all vcpu creations. Signed-off-by: Eric Auger --- v1 -> v2: - Must be called after all vcpu creations -> Must be called after all

[PATCH v2 2/9] KVM: arm64: Fix KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION read

2021-01-14 Thread Eric Auger
rm64: Implement KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION") Cc: sta...@vger.kernel.org#v4.17+ Signed-off-by: Eric Auger Reviewed-by: Alexandru Elisei --- v1 -> v2: - in the commit message, remove the statement that the index always is 0 - add Alexandru's R-b --- arch/arm64/kvm/vgic/vgic-kvm-devi

[PATCH v2 4/9] KVM: arm/arm64: vgic: Reset base address on kvm_vgic_dist_destroy()

2021-01-14 Thread Eric Auger
On vgic_dist_destroy(), the addresses are not reset. However for kvm selftest purpose this would allow to continue the test execution even after a failure when running KVM_RUN. So let's reset the base addresses. Signed-off-by: Eric Auger --- v1 -> v2: - use dist-> in the else and

[PATCH v2 3/9] KVM: arm64: vgic-v3: Fix error handling in vgic_v3_set_redist_base()

2021-01-14 Thread Eric Auger
vgic_register_redist_iodev(). In such a case, remove the newly added redistributor region and free it. Signed-off-by: Eric Auger --- v1 -> v2: - fix the commit message and split declaration/assignment of rdreg --- arch/arm64/kvm/vgic/vgic-mmio-v3.c | 8 +++- 1 file changed, 7 insertions(+), 1 delet

[PATCH v2 1/9] KVM: arm64: vgic-v3: Fix some error codes when setting RDIST base

2021-01-14 Thread Eric Auger
by looking at the count field. Signed-off-by: Eric Auger --- v1 -> v2: - simplify the check sequence --- arch/arm64/kvm/vgic/vgic-mmio-v3.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/arm64/kvm/vgic/vgic-mmio-v3.c b/arch/arm64/kvm/vgic/vgic-mmio

[PATCH v2 0/9] KVM/ARM: Some vgic fixes and init sequence KVM selftests

2021-01-14 Thread Eric Auger
they can be augmented with a lot more register access tests, but let's try to move forward incrementally ... Best Regards Eric This series can be found at: https://github.com/eauger/linux/tree/vgic_kvmselftests_v2 History: - Took into account all comments from Marc and Alexandru's ex

Re: [PATCH 8/9] KVM: arm64: vgic-v3: Expose GICR_TYPER.Last for userspace

2021-01-14 Thread Auger Eric
Hi Alexandru, On 1/12/21 6:02 PM, Alexandru Elisei wrote: > Hi Eric, > > On 12/12/20 6:50 PM, Eric Auger wrote: >> Commit 23bde34771f1 ("KVM: arm64: vgic-v3: Drop the >> reporting of GICR_TYPER.Last for userspace") temporarily fixed >> a bug identified whe

Re: [PATCH 5/9] KVM: arm: move has_run_once after the map_resources

2021-01-14 Thread Auger Eric
Hi Alexandru, On 1/12/21 3:55 PM, Alexandru Elisei wrote: > Hi Eric, > > On 12/12/20 6:50 PM, Eric Auger wrote: >> has_run_once is set to true at the beginning of >> kvm_vcpu_first_run_init(). This generally is not an issue >> except when exercising the code with K

Re: [PATCH 1/9] KVM: arm64: vgic-v3: Fix some error codes when setting RDIST base

2021-01-14 Thread Auger Eric
Hi Alexandru, On 1/6/21 5:32 PM, Alexandru Elisei wrote: > Hi Eric, > > On 12/12/20 6:50 PM, Eric Auger wrote: >> KVM_DEV_ARM_VGIC_GRP_ADDR group doc says we should return >> -EEXIST in case the base address of the redist is already set. >> We currently return -EINVA

Re: [PATCH v4] certs: Add EFI_CERT_X509_GUID support for dbx entries

2021-01-13 Thread Eric Snowberg
> On Jan 13, 2021, at 1:41 PM, Jarkko Sakkinen > wrote: > > On Tue, Jan 12, 2021 at 02:57:39PM +, David Howells wrote: >> Eric Snowberg wrote: >> >>>> On Dec 10, 2020, at 2:49 AM, David Howells wrote: >>>> >>>> Eric Snowber

Re: [PATCH] tcp: fix TCP_USER_TIMEOUT with zero window

2021-01-13 Thread Eric Dumazet
On Wed, Jan 13, 2021 at 9:12 PM Enke Chen wrote: > > From: Enke Chen > > The TCP session does not terminate with TCP_USER_TIMEOUT when data > remain untransmitted due to zero window. > > The number of unanswered zero-window probes (tcp_probes_out) is > reset to zero with incoming acks irrespectiv

Re: [PATCH 3/9] KVM: arm64: vgic-v3: Fix error handling in vgic_v3_set_redist_base()

2021-01-13 Thread Auger Eric
Hi Marc, On 12/28/20 4:35 PM, Marc Zyngier wrote: > Hi Eric, > > On Sat, 12 Dec 2020 18:50:04 +0000, > Eric Auger wrote: >> >> vgic_register_all_redist_iodevs may succeed while >> vgic_register_all_redist_iodevs fails. For example this can happen > > Th

Re: [PATCH 6/9] docs: kvm: devices/arm-vgic-v3: enhance KVM_DEV_ARM_VGIC_CTRL_INIT doc

2021-01-13 Thread Auger Eric
Hi Alexandru, On 1/12/21 4:39 PM, Alexandru Elisei wrote: > Hi Eric, > > On 12/12/20 6:50 PM, Eric Auger wrote: >> kvm_arch_vcpu_precreate() returns -EBUSY if the vgic is >> already initialized. So let's document that KVM_DEV_ARM_VGIC_CTRL_INIT >> must be

Re: [PATCH 4/9] KVM: arm/arm64: vgic: Reset base address on kvm_vgic_dist_destroy()

2021-01-13 Thread Auger Eric
Hi Marc, On 12/28/20 4:41 PM, Marc Zyngier wrote: > On Sat, 12 Dec 2020 18:50:05 +, > Eric Auger wrote: >> >> On vgic_dist_destroy(), the addresses are not reset. However for >> kvm selftest purpose this would allow to continue the test execution >> even after

Re: [PATCH 2/9] KVM: arm64: Fix KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION read

2021-01-13 Thread Auger Eric
Hi Alexandru, On 1/6/21 6:12 PM, Alexandru Elisei wrote: > Hi Eric, > > The patch looks correct to me. kvm_vgic_addr() masks out all the bits except > index > from addr, so we don't need to do it in vgic_get_common_attr(): > > Reviewed-by: Alexandru Elisei > &g

Re: [PATCH 7/9] KVM: arm64: Simplify argument passing to vgic_uaccess_[read|write]

2021-01-13 Thread Auger Eric
Hi Alexandru, On 1/12/21 5:16 PM, Alexandru Elisei wrote: > Hi Eric, > > On 1/12/21 4:04 PM, Alexandru Elisei wrote: >> Hi Eric, >> >> On 12/12/20 6:50 PM, Eric Auger wrote: >>> Instead of converting the vgic_io_device handle to a kvm_io_device >>&g

Re: [PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing

2021-01-13 Thread Eric Dumazet
On Wed, Jan 13, 2021 at 6:03 PM Jakub Kicinski wrote: > > On Wed, 13 Jan 2021 05:46:05 +0100 Eric Dumazet wrote: > > On Wed, Jan 13, 2021 at 2:02 AM Jakub Kicinski wrote: > > > > > > On Tue, 12 Jan 2021 13:23:16 +0100 Eric Dumazet wrote: > > > > On Tue,

Re: [RFC PATCH v2 1/8] Use atomic type for ucounts reference counting

2021-01-13 Thread Eric W. Biederman
Alexey Gladkov writes: We might want to use refcount_t instead of atomic_t. Not a big deal either way. > Signed-off-by: Alexey Gladkov > --- > include/linux/user_namespace.h | 2 +- > kernel/ucount.c| 10 +- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff

Re: [RFC PATCH v2 2/8] Add a reference to ucounts for each user

2021-01-13 Thread Eric W. Biederman
The subject is wrong. This should be: [RFC PATCH v2 2/8] Add a reference to ucounts for each cred. Further the explanation could use a little work. Something along the lines of: For RLIMIT_NPROC and some other rlimits the user_struct that holds the global limit is kept alive for the lifetime

Re: [PATCH v13 00/15] SMMUv3 Nested Stage Setup (IOMMU part)

2021-01-13 Thread Auger Eric
Hi Shameer, On 1/8/21 6:05 PM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >> -Original Message----- >> From: Eric Auger [mailto:eric.au...@redhat.com] >> Sent: 18 November 2020 11:22 >> To: eric.auger@gmail.com; eric.au...@redhat.com; >> io...@list

Re: [PATCH v2 net-next 2/3] skbuff: (re)use NAPI skb cache on allocation path

2021-01-13 Thread Eric Dumazet
On Wed, Jan 13, 2021 at 2:37 PM Alexander Lobakin wrote: > > Instead of calling kmem_cache_alloc() every time when building a NAPI > skb, (re)use skbuff_heads from napi_alloc_cache.skb_cache. Previously > this cache was only used for bulk-freeing skbuff_heads consumed via > napi_consume_skb() or _

Re: [PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing

2021-01-12 Thread Eric Dumazet
On Wed, Jan 13, 2021 at 2:02 AM Jakub Kicinski wrote: > > On Tue, 12 Jan 2021 13:23:16 +0100 Eric Dumazet wrote: > > On Tue, Jan 12, 2021 at 12:08 PM Alexander Lobakin wrote: > > > > > > From: Edward Cree > > > Date: Tue, 12 Jan 2021 09:54:04 + >

Re: [PATCH] tcp: keepalive fixes

2021-01-12 Thread Eric Dumazet
On Tue, Jan 12, 2021 at 11:48 PM Yuchung Cheng wrote: > > On Tue, Jan 12, 2021 at 2:31 PM Enke Chen wrote: > > > > From: Enke Chen > > > > In this patch two issues with TCP keepalives are fixed: > > > > 1) TCP keepalive does not timeout when there are data waiting to be > >delivered and then

[PATCH RESEND] random: fix the RNDRESEEDCRNG ioctl

2021-01-12 Thread Eric Biggers
From: Eric Biggers The RNDRESEEDCRNG ioctl reseeds the primary_crng from itself, which doesn't make sense. Reseed it from the input_pool instead. Fixes: d848e5f8e1eb ("random: add new ioctl RNDRESEEDCRNG") Cc: sta...@vger.kernel.org Cc: linux-cry...@vger.kernel.org Cc: Andy

[PATCH RESEND] random: remove dead code left over from blocking pool

2021-01-12 Thread Eric Biggers
From: Eric Biggers Remove some dead code that was left over following commit 90ea1c6436d2 ("random: remove the blocking pool"). Cc: linux-cry...@vger.kernel.org Cc: Andy Lutomirski Cc: Jann Horn Cc: Theodore Ts'o Reviewed-by: Andy Lutomirski Signed-off-by: Eric Biggers ---

[PATCH RESEND] random: initialize ChaCha20 constants with correct endianness

2021-01-12 Thread Eric Biggers
From: Eric Biggers On big endian CPUs, the ChaCha20-based CRNG is using the wrong endianness for the ChaCha20 constants. This doesn't matter cryptographically, but technically it means it's not ChaCha20 anymore. Fix it to always use the standard constants. Cc: linux-cry...@vger.ker

Re: [PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing

2021-01-12 Thread Eric Dumazet
On Tue, Jan 12, 2021 at 7:26 PM Alexander Lobakin wrote: > > From: Eric Dumazet > Date: Tue, 12 Jan 2021 13:32:56 +0100 > > > On Tue, Jan 12, 2021 at 11:56 AM Alexander Lobakin wrote: > >> > > > >> > >> Ah, I should've mentioned that I

Re: [PATCH v4] certs: Add EFI_CERT_X509_GUID support for dbx entries

2021-01-12 Thread Eric Snowberg
d appreciate any feedback on that series as well. Thanks > David > --- > commit 8913866babb96fcfe452aac6042ca8862d4c0b53 > Author: Eric Snowberg > Date: Tue Sep 15 20:49:27 2020 -0400 > >certs: Add EFI_CERT_X509_GUID support for dbx entries > >The Secure Boo

Re: [PATCH v2 01/10] vfs: move cap_convert_nscap() call into vfs_setxattr()

2021-01-12 Thread Eric W. Biederman
ebied...@xmission.com (Eric W. Biederman) writes: > So there is the basic question do we want to read the raw bytes on disk > or do we want to return something meaningful to the reader. As the > existing tools use the xattr interface to set/clear fscaps returning > data to user space

Re: [PATCH v2 01/10] vfs: move cap_convert_nscap() call into vfs_setxattr()

2021-01-12 Thread Eric W. Biederman
Miklos Szeredi writes: > On Tue, Jan 12, 2021 at 1:15 AM Eric W. Biederman > wrote: >> >> Miklos Szeredi writes: >> >> > On Fri, Jan 01, 2021 at 11:35:16AM -0600, Eric W. Biederman wrote: > >> > For one: a v2 fscap is supposed to be equivalent t

Re: [PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing

2021-01-12 Thread Eric Dumazet
On Tue, Jan 12, 2021 at 11:56 AM Alexander Lobakin wrote: > > > Ah, I should've mentioned that I use UDP GRO Fraglists, so these > numbers are for GRO. > Right, this suggests UDP GRO fraglist is a pathological case of GRO, not saving memory. Real GRO (TCP in most cases) will consume one skb, an

Re: [PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing

2021-01-12 Thread Eric Dumazet
On Tue, Jan 12, 2021 at 12:08 PM Alexander Lobakin wrote: > > From: Edward Cree > Date: Tue, 12 Jan 2021 09:54:04 + > > > Without wishing to weigh in on whether this caching is a good idea... > > Well, we already have a cache to bulk flush "consumed" skbs, although > kmem_cache_free() is gene

Re: [RFC v3 2/2] vfio/platform: msi: add Broadcom platform devices

2021-01-12 Thread Auger Eric
set module is mandated (except if reset_required is forced to 0), I am wondering if we shouldn't try to turn the reset module into a "specialization" module and put the msi hooks there. I am afraid we may end up having modules for each and every vfio platform feature specialization. At the moment that's fully bearable but I can't predict what's next. As the mandated feature is the reset capability maybe we could just keep the config/module name terminology, tune the kconfig help message to mention the msi support in case of flex-rm? What do you think? Thanks Eric > + > +MODULE_LICENSE("GPL v2"); > +MODULE_AUTHOR("Broadcom"); >

Re: [RFC v3 1/2] vfio/platform: add support for msi

2021-01-12 Thread Auger Eric
Hi Vikas, On 1/5/21 6:53 AM, Vikas Gupta wrote: > On Tue, Dec 22, 2020 at 10:57 PM Auger Eric wrote: >> >> Hi Vikas, >> >> On 12/14/20 6:45 PM, Vikas Gupta wrote: >>> MSI support for platform devices.The MSI block >>> is added as an extended IRQ whic

Re: [PATCH net-next 0/5] skbuff: introduce skbuff_heads bulking and reusing

2021-01-12 Thread Eric Dumazet
On Mon, Jan 11, 2021 at 7:27 PM Alexander Lobakin wrote: > > Inspired by cpu_map_kthread_run() and _kfree_skb_defer() logics. > > Currently, all sorts of skb allocation always do allocate > skbuff_heads one by one via kmem_cache_alloc(). > On the other hand, we have percpu napi_alloc_cache to stor

Re: [PATCH 2/2] scsi: ufs: Remove unnecessary devm_kfree

2021-01-11 Thread Eric Biggers
;crypto_cap_array); > out: > /* Indicate that init failed by clearing UFSHCD_CAP_CRYPTO */ > hba->caps &= ~UFSHCD_CAP_CRYPTO; Looks fine, feel free to add: Reviewed-by: Eric Biggers I think this was here to free the memory in the case where the crypto support gets disab

Re: [PATCH v2 01/10] vfs: move cap_convert_nscap() call into vfs_setxattr()

2021-01-11 Thread Eric W. Biederman
Miklos Szeredi writes: > On Fri, Jan 01, 2021 at 11:35:16AM -0600, Eric W. Biederman wrote: >> Miklos Szeredi writes: >> >> > cap_convert_nscap() does permission checking as well as conversion of the >> > xattr value conditionally based on fs's user-ns.

Re: [RFC PATCH v2 0/8] Count rlimits in each user namespace

2021-01-11 Thread Eric W. Biederman
er_fork that sets RLIMIT_NPROC runs as never_fork_user and sets RLIMIT_NPROC to 1 in it's systemd service file. Further suppose there is a user bob who has two containers he wants to run: container1 and container2. Both containers start the never_fork service. Bob first starts container1 and inside it the never_fork service starts. Bob starts container2 and the never_fork service fails to start. Does that make it clear that it is the count of the processes that would exceed 1 if both instances of the never_fork service starts that would be the problem? Eric

Re: Malicious fs images was Re: ext4 regression in v5.9-rc2 from e7bfb5c9bb3d on ro fs with overlapped bitmaps

2021-01-11 Thread Eric Biggers
make-work Google AIs spraying zeroday code in > public places and the community developers having to clean up the mess. syzkaller is an open source project that implements a coverage-guided fuzzer for multiple operating system kernels; it's not "Google AI". Anyone can run syzkaller (either by itself, or as part of a syzbot instance) and find the same bugs. - Eric

Re: Re: [PATCH] evm: Fix memleak in init_desc

2021-01-09 Thread Eric Biggers
; > + } > > > > > > desc->tfm = *tfm; > > > > > > rc = crypto_shash_init(desc); > > > if (rc) { > > > + if (tmp_tfm) > > > + crypto_free_shash(tmp_tfm); > > > kfree(desc); > > > return ERR_PTR(rc); > > > } > > > > There's no need to check for NULL before calling crypto_free_shash(). > > > > I find there is a crypto_shash_tfm() in the definition of > crypto_free_shash(). Will this lead to null pointer dereference > when we use it to free a NULL pointer? > No. It does &tfm->base, not tfm->base. - Eric

Re: [PATCH] x86/vm86/32: Remove VM86_SCREEN_BITMAP support

2021-01-09 Thread Eric W. Biederman
uses this support (on 32bit where dosemu can use vm86)? It may still be a valid removal target I just wanted to point out what the original user was. Eric > Cc: Andrea Arcangeli > Cc: Linux-MM > Cc: Jason Gunthorpe > Cc: x...@kernel.org > Cc: Linus Torvalds > Cc: Matthew Wi

Re: KMSAN: uninit-value in __crypto_memneq (2)

2021-01-09 Thread Eric Biggers
+Jason, since this looks WireGuard-related. On Sat, Jan 09, 2021 at 05:05:24AM -0800, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:73d62e81 kmsan: random: prevent boot-time reports in _mix_.. > git tree: https://github.com/google/kmsan.git master > co

Re: [PATCH] evm: Fix memleak in init_desc

2021-01-09 Thread Eric Biggers
(desc); > if (rc) { > + if (tmp_tfm) > + crypto_free_shash(tmp_tfm); > kfree(desc); > return ERR_PTR(rc); > } There's no need to check for NULL before calling crypto_free_shash(). - Eric

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Eric Biggers
r just a wrapper for the shash API, and it doesn't handle modules being dynamically loaded/unloaded. So switching to it may cause a performance regression. What I'd recommend is making crc32c_le() able to call architecture-speccific implementations directly, similar to blake2s() and chacha20() in lib/crypto/. Then there would be no concern about when modules get loaded, etc... - Eric

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Eric Biggers
iguring things when a new crypto module is loaded (like what lib/crc-t10dif.c does). Until one of those is done, switching to crc32c_le() might cause performance regressions. - Eric

Re: [PATCH 3/5] crypto: add RFC5869 HKDF

2021-01-07 Thread Eric Biggers
HKDF, it would be better to stick to the terminology used in RFC 5869 (https://tools.ietf.org/html/rfc5869), as generally that's what people are most familiar with for HKDF. It also matches the HKDF paper (https://eprint.iacr.org/2010/264.pdf) more closely. - Eric

Re: [PATCH 5/5] fs: use HKDF implementation from kernel crypto API

2021-01-07 Thread Eric Biggers
truct crypto_shash *hmac_tfm, > >    const u8 *key, size_t keysize, > >    const u8 *salt, size_t saltsize); > > I wanted to have an identical interface for all types of KDFs to allow turning > them into a template eventually. For example, SP800-108 KDFs only have one > parameter. Hence the use of a kvec. But the API being provided is a library function specifically for HKDF. So there's no need to make it conform to some other API. - Eric

Re: [PATCH 3/5] crypto: add RFC5869 HKDF

2021-01-06 Thread Eric Biggers
fied in RFC5869, it is > optional. In case such context is not provided, the caller must provide > NULL / 0 for the info / info_nvec parameters. Any reason not to call this crypto_hkdf_expand() to match the specification? - Eric

Re: [PATCH 5/5] fs: use HKDF implementation from kernel crypto API

2021-01-06 Thread Eric Biggers
;counter, 1, tmp); > - if (err) > - goto out; > - memcpy(&okm[i], tmp, okmlen - i); > - memzero_explicit(tmp, sizeof(tmp)); > - } else { > - err = crypto_shash_finup(desc, &counter, 1, &okm[i]); > - if (err) > - goto out; > - } > - counter++; > - prev = &okm[i]; > - } > - err = 0; > -out: > if (unlikely(err)) > memzero_explicit(okm, okmlen); /* so caller doesn't need to */ > - shash_desc_zero(desc); Shouldn't crypto_hkdf_generate() handle the above memzero_explicit() of the output buffer on error, so that all callers don't need to do it? - Eric

Re: [PATCH 0/5] Add KDF implementations to crypto API

2021-01-06 Thread Eric Biggers
On Wed, Jan 06, 2021 at 10:59:24PM -0800, Eric Biggers wrote: > On Thu, Jan 07, 2021 at 07:37:05AM +0100, Stephan Mueller wrote: > > Am Montag, dem 04.01.2021 um 14:20 -0800 schrieb Eric Biggers: > > > On Mon, Jan 04, 2021 at 10:45:57PM +0100, Stephan Müller wrote: > >

Re: [PATCH 0/5] Add KDF implementations to crypto API

2021-01-06 Thread Eric Biggers
On Thu, Jan 07, 2021 at 07:37:05AM +0100, Stephan Mueller wrote: > Am Montag, dem 04.01.2021 um 14:20 -0800 schrieb Eric Biggers: > > On Mon, Jan 04, 2021 at 10:45:57PM +0100, Stephan Müller wrote: > > > The HKDF addition is used to replace the implementation in the files

Re: in_compat_syscall() on x86

2021-01-05 Thread Eric W. Biederman
Al Viro writes: > On Mon, Jan 04, 2021 at 06:47:38PM -0600, Eric W. Biederman wrote: >> >> It is defined in the Ubuntu kernel configs I've got lurking: >> >> Both 3.8.0-19_generic (Ubuntu 13.04) and 5.4.0-56_generic (probably >> >> 20.04). >>

Re: in_compat_syscall() on x86

2021-01-04 Thread Eric W. Biederman
Andy Lutomirski writes: >> On Jan 4, 2021, at 2:36 PM, David Laight wrote: >> >> From: Eric W. Biederman >>> Sent: 04 January 2021 20:41 >>> >>> Al Viro writes: >>> >>>> On Mon, Jan 04, 2021 at 12:16:56PM +,

Re: [PATCH 0/5] Add KDF implementations to crypto API

2021-01-04 Thread Eric Biggers
fstests -c ext4 generic/582' should be enough for this, though you could run all the tests if you want. - Eric

Re: in_compat_syscall() on x86

2021-01-04 Thread Eric W. Biederman
us there. So I don't think we have any cases where we actually need a flag that is independent of the system call but we have come very close. For people who want to optimize I suggest tracking down the handful of users of x32 and see if x32 can be made to just go away. Eric

Re: [PATCH] random: initialize ChaCha20 constants with correct endianness

2021-01-04 Thread Eric Biggers
On Fri, Nov 20, 2020 at 10:52:54AM -0800, Eric Biggers wrote: > On Mon, Oct 26, 2020 at 09:33:54AM -0700, Eric Biggers wrote: > > On Tue, Oct 06, 2020 at 08:51:45PM -0700, Eric Biggers wrote: > > > On Fri, Sep 18, 2020 at 02:57:05PM -0700, Eric Biggers wrote: > > > >

Re: [PATCH] random: remove dead code left over from blocking pool

2021-01-04 Thread Eric Biggers
On Fri, Nov 20, 2020 at 10:52:35AM -0800, Eric Biggers wrote: > On Mon, Oct 26, 2020 at 09:34:03AM -0700, Eric Biggers wrote: > > On Tue, Oct 06, 2020 at 08:50:58PM -0700, Eric Biggers wrote: > > > On Tue, Sep 15, 2020 at 09:36:52PM -0700, Eric Biggers wrote: > >

Re: [PATCH] random: fix the RNDRESEEDCRNG ioctl

2021-01-04 Thread Eric Biggers
On Fri, Nov 20, 2020 at 10:52:14AM -0800, Eric Biggers wrote: > On Mon, Oct 26, 2020 at 09:33:43AM -0700, Eric Biggers wrote: > > On Tue, Oct 06, 2020 at 08:50:21PM -0700, Eric Biggers wrote: > > > On Tue, Sep 15, 2020 at 09:19:08PM -0700, Eric Biggers wrote: > >

Re: [PATCH v3] vfs: don't unnecessarily clone write access for writable fds

2021-01-04 Thread Eric Biggers
On Tue, Sep 22, 2020 at 09:44:18AM -0700, Eric Biggers wrote: > From: Eric Biggers > > There's no need for mnt_want_write_file() to increment mnt_writers when > the file is already open for writing, provided that > mnt_drop_write_file() is changed to conditionally decrement

[PATCH 2/2] Bluetooth: hci_h5: Add support for binding RTL8723DS with device tree

2021-01-02 Thread John-Eric Kamps
RTL8723DS could be handled by btrtl-driver, so add ability to bind it using device tree. Signed-off-by: John-Eric Kamps --- drivers/bluetooth/hci_h5.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c index 7be16a7f653b..fb9817f97d45

<    1   2   3   4   5   6   7   8   9   10   >