Re: [PATCH] Revert "powerpc: Switch to relative jump labels"

2021-05-28 Thread Michael Ellerman
Roman Bolshakov writes: > This reverts commit b0b3b2c78ec075cec4721986a95abbbac8c3da4f. > > Otherwise, direct kernel boot with initramfs no longer works in QEMU. > It's broken in some bizarre way because a valid initramfs is not > recognized anymore: > > Found initrd at

Re: [PATCH v2] KVM: PPC: Book3S HV: Fix reverse map real-mode address lookup with huge vmalloc

2021-05-28 Thread Michael Ellerman
Nicholas Piggin writes: > real_vmalloc_addr() does not currently work for huge vmalloc, which is > what the reverse map can be allocated with for radix host, hash guest. > > Extract the hugepage aware equivalent from eeh code into a helper, and > convert existing sites including this one to use

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Paul Moore
On Fri, May 28, 2021 at 2:28 PM Daniel Borkmann wrote: > On 5/28/21 5:47 PM, Paul Moore wrote: > > Let's reset. > > Sure, yep, lets shortly take one step back. :) > > > What task_struct is running the BPF tracing program which is calling > > into security_locked_down()? My current feeling is

[PATCH] powerpc/barrier: Avoid collision with clang's __lwsync macro

2021-05-28 Thread Nathan Chancellor
A change in clang 13 results in the __lwsync macro being defined as __builtin_ppc_lwsync, which emits 'lwsync' or 'msync' depending on what the target supports. This breaks the build because of -Werror in arch/powerpc, along with thousands of warnings: In file included from

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Daniel Borkmann
On 5/28/21 5:47 PM, Paul Moore wrote: On Fri, May 28, 2021 at 3:10 AM Daniel Borkmann wrote: On 5/28/21 3:37 AM, Paul Moore wrote: On Mon, May 17, 2021 at 5:22 AM Ondrej Mosnacek wrote: Commit 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") added an implementation of

Re: [PATCH -next] ASoC: imx-rpmsg: fix platform_no_drv_owner.cocci warnings

2021-05-28 Thread Mark Brown
From: Mark Brown,,, On Thu, 27 May 2021 19:07:32 +0800, Zou Wei wrote: > ./sound/soc/fsl/imx-rpmsg.c:140:3-8: No need to set .owner here. The core > will do it. > > Remove .owner field if calls are used which set it automatically > > Generated by:

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Paul Moore
On Fri, May 28, 2021 at 10:43 AM Daniel Borkmann wrote: > On 5/28/21 3:42 PM, Ondrej Mosnacek wrote: > > (I'm off work today and plan to reply also to Paul's comments next > > week, but for now let me at least share a couple quick thoughts on > > Daniel's patch.) Oooh, I sense some disagreement

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Paul Moore
On Fri, May 28, 2021 at 3:10 AM Daniel Borkmann wrote: > On 5/28/21 3:37 AM, Paul Moore wrote: > > On Mon, May 17, 2021 at 5:22 AM Ondrej Mosnacek wrote: > >> > >> Commit 59438b46471a ("security,lockdown,selinux: implement SELinux > >> lockdown") added an implementation of the locked_down LSM

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Daniel Borkmann
On 5/28/21 3:42 PM, Ondrej Mosnacek wrote: (I'm off work today and plan to reply also to Paul's comments next week, but for now let me at least share a couple quick thoughts on Daniel's patch.) On Fri, May 28, 2021 at 11:56 AM Daniel Borkmann wrote: On 5/28/21 9:09 AM, Daniel Borkmann wrote:

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Steven Rostedt
On Mon, 17 May 2021 11:20:06 +0200 Ondrej Mosnacek wrote: > diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c > index 1261e8b41edb..7edde3fc22f5 100644 > --- a/fs/tracefs/inode.c > +++ b/fs/tracefs/inode.c > @@ -396,7 +396,7 @@ struct dentry *tracefs_create_file(const char *name, > umode_t

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Ondrej Mosnacek
(I'm off work today and plan to reply also to Paul's comments next week, but for now let me at least share a couple quick thoughts on Daniel's patch.) On Fri, May 28, 2021 at 11:56 AM Daniel Borkmann wrote: > > On 5/28/21 9:09 AM, Daniel Borkmann wrote: > > On 5/28/21 3:37 AM, Paul Moore wrote:

Re: [PATCH] perf vendor events: Fix eventcode of power10 json events

2021-05-28 Thread Arnaldo Carvalho de Melo
Em Fri, May 28, 2021 at 01:26:50PM +0530, kajoljain escreveu: > > > On 5/26/21 11:42 AM, Nageswara Sastry wrote: > > > > > >> On 25-May-2021, at 8:57 PM, Paul A. Clarke wrote: > >>> > >> I lost the original message, but Nageswara Sastry said: > >>> 1. Extracted all the 244 events from the

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Daniel Borkmann
On 5/28/21 1:47 PM, Jiri Olsa wrote: On Fri, May 28, 2021 at 11:56:02AM +0200, Daniel Borkmann wrote: Ondrej / Paul / Jiri: at least for the BPF tracing case specifically (I haven't looked at the rest but it's also kind of independent), the attached fix should address both reported issues,

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Jiri Olsa
On Fri, May 28, 2021 at 11:56:02AM +0200, Daniel Borkmann wrote: SNIP > Ondrej / Paul / Jiri: at least for the BPF tracing case specifically (I > haven't looked > at the rest but it's also kind of independent), the attached fix should > address both > reported issues, please take a look &

Re: [PATCH] Revert "powerpc: Switch to relative jump labels"

2021-05-28 Thread Greg Kurz
On Fri, 28 May 2021 04:29:43 +0300 Roman Bolshakov wrote: > This reverts commit b0b3b2c78ec075cec4721986a95abbbac8c3da4f. > > Otherwise, direct kernel boot with initramfs no longer works in QEMU. > It's broken in some bizarre way because a valid initramfs is not > recognized anymore: > >

Re: [PATCH 1/3] sched/topology: Allow archs to populate distance map

2021-05-28 Thread Srikar Dronamraju
* Peter Zijlstra [2021-05-28 10:43:23]: > On Mon, May 24, 2021 at 09:48:29PM +0530, Srikar Dronamraju wrote: > > * Valentin Schneider [2021-05-24 15:16:09]: > > > > I suppose one way to avoid the hook would be to write some "fake" distance > > > values into your distance_lookup_table[] for

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Jiri Olsa
On Fri, May 28, 2021 at 11:56:02AM +0200, Daniel Borkmann wrote: SNIP > > Ondrej / Paul / Jiri: at least for the BPF tracing case specifically (I > haven't looked > at the rest but it's also kind of independent), the attached fix should > address both > reported issues, please take a look &

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Daniel Borkmann
On 5/28/21 9:09 AM, Daniel Borkmann wrote: On 5/28/21 3:37 AM, Paul Moore wrote: On Mon, May 17, 2021 at 5:22 AM Ondrej Mosnacek wrote: Commit 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") added an implementation of the locked_down LSM hook to SELinux, with the aim

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Jiri Olsa
On Fri, May 28, 2021 at 09:09:57AM +0200, Daniel Borkmann wrote: > On 5/28/21 3:37 AM, Paul Moore wrote: > > On Mon, May 17, 2021 at 5:22 AM Ondrej Mosnacek wrote: > > > > > > Commit 59438b46471a ("security,lockdown,selinux: implement SELinux > > > lockdown") added an implementation of the

[PATCH v7 32/32] KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path

2021-05-28 Thread Nicholas Piggin
POWER9 and later processors always go via the P9 guest entry path now. Remove the remaining support from the P7/8 path. Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv.c| 62 ++-- arch/powerpc/kvm/book3s_hv_interrupts.S | 9 +-

[PATCH v7 31/32] KVM: PPC: Book3S HV P9: implement hash host / hash guest support

2021-05-28 Thread Nicholas Piggin
Implement support for hash guests under hash host. This has to save and restore the host SLB, and ensure that the MMU is off while switching into the guest SLB. POWER9 and later CPUs now always go via the P9 path. The "fast" guest mode is now renamed to the P9 mode, which is consistent with its

[PATCH v7 30/32] KVM: PPC: Book3S HV P9: implement hash guest support

2021-05-28 Thread Nicholas Piggin
Implement hash guest support. Guest entry/exit has to restore and save/clear the SLB, plus several other bits to accommodate hash guests in the P9 path. Radix host, hash guest support is removed from the P7/8 path. The HPT hcalls and faults are not handled in real mode, which is a performance

[PATCH v7 29/32] KVM: PPC: Book3S HV P9: Reflect userspace hcalls to hash guests to support PR KVM

2021-05-28 Thread Nicholas Piggin
The reflection of sc 1 interrupts from guest PR=1 to the guest kernel is required to support a hash guest running PR KVM where its guest is making hcalls with sc 1. In preparation for hash guest support, add this hcall reflection to the P9 path. The P7/8 path does this in its realmode hcall

[PATCH v7 28/32] KVM: PPC: Book3S HV: add virtual mode handlers for HPT hcalls and page faults

2021-05-28 Thread Nicholas Piggin
In order to support hash guests in the P9 path (which does not do real mode hcalls or page fault handling), these real-mode hash specific interrupts need to be implemented in virt mode. Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv.c| 145 ++--

[PATCH v7 27/32] KVM: PPC: Book3S HV: small pseries_do_hcall cleanup

2021-05-28 Thread Nicholas Piggin
Functionality should not be changed. Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index cf403280b199..9ba77747bf00

[PATCH v7 26/32] KVM: PPC: Book3S HV P9: Allow all P9 processors to enable nested HV

2021-05-28 Thread Nicholas Piggin
All radix guests go via the P9 path now, so there is no need to limit nested HV to processors that support "mixed mode" MMU. Remove the restriction. Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v7 25/32] KVM: PPC: Book3S HV: Remove unused nested HV tests in XICS emulation

2021-05-28 Thread Nicholas Piggin
Commit f3c18e9342a44 ("KVM: PPC: Book3S HV: Use XICS hypercalls when running as a nested hypervisor") added nested HV tests in XICS hypercalls, but not all are required. * icp_eoi is only called by kvmppc_deliver_irq_passthru which is only called by kvmppc_check_passthru which is only caled by

[PATCH v7 24/32] KVM: PPC: Book3S HV: Remove virt mode checks from real mode handlers

2021-05-28 Thread Nicholas Piggin
Now that the P7/8 path no longer supports radix, real-mode handlers do not need to deal with being called in virt mode. This change effectively reverts commit acde25726bc6 ("KVM: PPC: Book3S HV: Add radix checks in real-mode hypercall handlers"). It removes a few more real-mode tests in rm hcall

[PATCH v7 23/32] KVM: PPC: Book3S HV: Remove radix guest support from P7/8 path

2021-05-28 Thread Nicholas Piggin
The P9 path now runs all supported radix guest combinations, so remove radix guest support from the P7/8 path. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/asm-offsets.c | 1 - arch/powerpc/kvm/book3s_hv_rmhandlers.S | 103 +--- 2 files changed, 3

[PATCH v7 22/32] KVM: PPC: Book3S HV: Remove support for dependent threads mode on P9

2021-05-28 Thread Nicholas Piggin
Dependent-threads mode is the normal KVM mode for pre-POWER9 SMT processors, where all threads in a core (or subcore) would run the same partition at the same time, or they would run the host. This design was mandated by MMU state that is shared between threads in a processor, so the

[PATCH v7 21/32] KVM: PPC: Book3S HV: Implement radix prefetch workaround by disabling MMU

2021-05-28 Thread Nicholas Piggin
Rather than partition the guest PID space + flush a rogue guest PID to work around this problem, instead fix it by always disabling the MMU when switching in or out of guest MMU context in HV mode. This may be a bit less efficient, but it is a lot less complicated and allows the P9 path to

[PATCH v7 20/32] KVM: PPC: Book3S HV P9: Switch to guest MMU context as late as possible

2021-05-28 Thread Nicholas Piggin
Move MMU context switch as late as reasonably possible to minimise code running with guest context switched in. This becomes more important when this code may run in real-mode, with later changes. Move WARN_ON as early as possible so program check interrupts are less likely to tangle everything

[PATCH v7 19/32] KVM: PPC: Book3S HV P9: Add helpers for OS SPR handling

2021-05-28 Thread Nicholas Piggin
This is a first step to wrapping supervisor and user SPR saving and loading up into helpers, which will then be called independently in bare metal and nested HV cases in order to optimise SPR access. Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv.c | 148

[PATCH v7 18/32] KVM: PPC: Book3S HV P9: Move SPR loading after expiry time check

2021-05-28 Thread Nicholas Piggin
This is wasted work if the time limit is exceeded. Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv_p9_entry.c | 36 --- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv_p9_entry.c

[PATCH v7 17/32] KVM: PPC: Book3S HV P9: Improve exit timing accounting coverage

2021-05-28 Thread Nicholas Piggin
The C conversion caused exit timing to become a bit cramped. Expand it to cover more of the entry and exit code. Reviewed-by: Alexey Kardashevskiy Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv_p9_entry.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v7 16/32] KVM: PPC: Book3S HV P9: Read machine check registers while MSR[RI] is 0

2021-05-28 Thread Nicholas Piggin
SRR0/1, DAR, DSISR must all be protected from machine check which can clobber them. Ensure MSR[RI] is clear while they are live. Reviewed-by: Alexey Kardashevskiy Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_hv.c | 11 +++-- arch/powerpc/kvm/book3s_hv_p9_entry.c | 33

[PATCH v7 15/32] KVM: PPC: Book3S HV P9: inline kvmhv_load_hv_regs_and_go into __kvmhv_vcpu_entry_p9

2021-05-28 Thread Nicholas Piggin
Now the initial C implementation is done, inline more HV code to make rearranging things easier. And rename __kvmhv_vcpu_entry_p9 to drop the leading underscores as it's now C, and is now a more complete vcpu entry. Reviewed-by: Fabiano Rosas Signed-off-by: Nicholas Piggin ---

[PATCH v7 14/32] KVM: PPC: Book3S HV P9: Implement the rest of the P9 path in C

2021-05-28 Thread Nicholas Piggin
Almost all logic is moved to C, by introducing a new in_guest mode for the P9 path that branches very early in the KVM interrupt handler to P9 exit code. The main P9 entry and exit assembly is now only about 160 lines of low level stack setup and register save/restore, plus a bad-interrupt

[PATCH v7 13/32] KVM: PPC: Book3S HV P9: Stop handling hcalls in real-mode in the P9 path

2021-05-28 Thread Nicholas Piggin
In the interest of minimising the amount of code that is run in "real-mode", don't handle hcalls in real mode in the P9 path. This requires some new handlers for H_CEDE and xics-on-xive to be added before xive is pulled or cede logic is checked. This introduces a change in radix guest behaviour

[PATCH v7 12/32] KVM: PPC: Book3S HV P9: Move radix MMU switching instructions together

2021-05-28 Thread Nicholas Piggin
Switching the MMU from radix<->radix mode is tricky particularly as the MMU can remain enabled and requires a certain sequence of SPR updates. Move these together into their own functions. This also includes the radix TLB check / flush because it's tied in to MMU switching due to tlbiel getting

[PATCH v7 11/32] KVM: PPC: Book3S HV P9: Move xive vcpu context management into kvmhv_p9_guest_entry

2021-05-28 Thread Nicholas Piggin
Move the xive management up so the low level register switching can be pushed further down in a later patch. XIVE MMIO CI operations can run in higher level code with machine checks, tracing, etc., available. Reviewed-by: Alexey Kardashevskiy Signed-off-by: Nicholas Piggin ---

[PATCH v7 10/32] KVM: PPC: Book3S HV P9: Reduce irq_work vs guest decrementer races

2021-05-28 Thread Nicholas Piggin
irq_work's use of the DEC SPR is racy with guest<->host switch and guest entry which flips the DEC interrupt to guest, which could lose a host work interrupt. This patch closes one race, and attempts to comment another class of races. Signed-off-by: Nicholas Piggin ---

[PATCH v7 09/32] KVM: PPC: Book3S HV P9: Move setting HDEC after switching to guest LPCR

2021-05-28 Thread Nicholas Piggin
LPCR[HDICE]=0 suppresses hypervisor decrementer exceptions on some processors, so it must be enabled before HDEC is set. Rather than set it in the host LPCR then setting HDEC, move the HDEC update to after the guest MMU context (including LPCR) is loaded. There shouldn't be much concern with

[PATCH v7 08/32] KVM: PPC: Book3S HV P9: implement kvmppc_xive_pull_vcpu in C

2021-05-28 Thread Nicholas Piggin
This is more symmetric with kvmppc_xive_push_vcpu, and has the advantage that it runs with the MMU on. The extra test added to the asm will go away with a future change. Reviewed-by: Cédric Le Goater Reviewed-by: Alexey Kardashevskiy Signed-off-by: Nicholas Piggin ---

[PATCH v7 07/32] KVM: PPC: Book3S 64: Minimise hcall handler calling convention differences

2021-05-28 Thread Nicholas Piggin
This sets up the same calling convention from interrupt entry to KVM interrupt handler for system calls as exists for other interrupt types. This is a better API, it uses a save area rather than SPR, and it has more registers free to use. Using a single common API helps maintain it, and it

[PATCH v7 06/32] KVM: PPC: Book3S 64: move bad_host_intr check to HV handler

2021-05-28 Thread Nicholas Piggin
The bad_host_intr check will never be true with PR KVM, move it to HV code. Reviewed-by: Alexey Kardashevskiy Signed-off-by: Nicholas Piggin --- arch/powerpc/kvm/book3s_64_entry.S | 4 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 +++- arch/powerpc/kvm/book3s_segment.S | 3 +++

[PATCH v7 05/32] KVM: PPC: Book3S 64: Move interrupt early register setup to KVM

2021-05-28 Thread Nicholas Piggin
Like the earlier patch for hcalls, KVM interrupt entry requires a different calling convention than the Linux interrupt handlers set up. Move the code that converts from one to the other into KVM. Reviewed-by: Fabiano Rosas Signed-off-by: Nicholas Piggin ---

[PATCH v7 04/32] KVM: PPC: Book3S 64: Move hcall early register setup to KVM

2021-05-28 Thread Nicholas Piggin
System calls / hcalls have a different calling convention than other interrupts, so there is code in the KVMTEST to massage these into the same form as other interrupt handlers. Move this work into the KVM hcall handler. This means teaching KVM a little more about the low level interrupt handler

[PATCH v7 03/32] KVM: PPC: Book3S 64: add hcall interrupt handler

2021-05-28 Thread Nicholas Piggin
Add a separate hcall entry point. This can be used to deal with the different calling convention. Reviewed-by: Daniel Axtens Reviewed-by: Fabiano Rosas Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/exceptions-64s.S | 6 +++--- arch/powerpc/kvm/book3s_64_entry.S | 6 +- 2 files

[PATCH v7 02/32] KVM: PPC: Book3S 64: Move GUEST_MODE_SKIP test into KVM

2021-05-28 Thread Nicholas Piggin
Move the GUEST_MODE_SKIP logic into KVM code. This is quite a KVM internal detail that has no real need to be in common handlers. Add a comment explaining the what and why of KVM "skip" interrupts. Reviewed-by: Daniel Axtens Reviewed-by: Fabiano Rosas Signed-off-by: Nicholas Piggin ---

[PATCH v7 01/32] KVM: PPC: Book3S 64: move KVM interrupt entry to a common entry point

2021-05-28 Thread Nicholas Piggin
Rather than bifurcate the call depending on whether or not HV is possible, and have the HV entry test for PR, just make a single common point which does the demultiplexing. This makes it simpler to add another type of exit handler. Acked-by: Paul Mackerras Reviewed-by: Daniel Axtens

[PATCH v7 00/32] KVM: PPC: Book3S: C-ify the P9 entry/exit code

2021-05-28 Thread Nicholas Piggin
Git tree here https://github.com/npiggin/linux/tree/kvm-in-c-5.14-1 This series applies to upstream plus a couple of KVM regression fixes not yet in powerpc tree, which are included in the above git tree. I split out the series into a few parts including about a dozen which were merged in the

[PATCH v7 00/32] KVM: PPC: Book3S: C-ify the P9 entry/exit code

2021-05-28 Thread Nicholas Piggin
Git tree here https://github.com/npiggin/linux/tree/kvm-in-c-5.14-1 This series applies to upstream plus a couple of KVM regression fixes not yet in powerpc tree, which are included in the above git tree. I split out the series into a few parts including about a dozen which were merged in the

Re: [PATCH 1/3] sched/topology: Allow archs to populate distance map

2021-05-28 Thread Peter Zijlstra
On Mon, May 24, 2021 at 09:48:29PM +0530, Srikar Dronamraju wrote: > * Valentin Schneider [2021-05-24 15:16:09]: > > I suppose one way to avoid the hook would be to write some "fake" distance > > values into your distance_lookup_table[] for offline nodes using your > > distance_ref_point_depth

Re: [PATCH] perf vendor events: Fix eventcode of power10 json events

2021-05-28 Thread kajoljain
On 5/26/21 11:42 AM, Nageswara Sastry wrote: > > >> On 25-May-2021, at 8:57 PM, Paul A. Clarke wrote: >>> >> I lost the original message, but Nageswara Sastry said: >>> 1. Extracted all the 244 events from the patch. >>> 2. Check them in 'perf list' - all 244 events found >>> 3. Ran all the

Re: [RFC v2 4/4] powerpc/papr_scm: Add cpu hotplug support for nvdimm pmu device

2021-05-28 Thread kajoljain
On 5/26/21 2:02 PM, Peter Zijlstra wrote: > On Wed, May 26, 2021 at 12:56:58PM +0530, kajoljain wrote: >> On 5/25/21 7:46 PM, Peter Zijlstra wrote: >>> On Tue, May 25, 2021 at 06:52:16PM +0530, Kajol Jain wrote: > It adds cpumask to designate a cpu to make HCALL to collect the

[PATCH] powerpc: make show_stack's stack walking KASAN-safe

2021-05-28 Thread Daniel Axtens
Make our stack-walking code KASAN-safe by using READ_ONCE_NOCHECK - generic code, arm64, s390 and x86 all do this for similar sorts of reasons: when unwinding a stack, we might touch memory that KASAN has marked as being out-of-bounds. In ppc64 KASAN development, I hit this sometimes when checking

[PATCH v2] mm: generalize ZONE_[DMA|DMA32]

2021-05-28 Thread Kefeng Wang
ZONE_[DMA|DMA32] configs have duplicate definitions on platforms that subscribe them. Instead, just make them generic options which can be selected on applicable platforms. Also only x86/arm64 architectures could enable both ZONE_DMA and ZONE_DMA32 if EXPERT, add ARCH_HAS_ZONE_DMA_SET to make dma

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Daniel Borkmann
On 5/28/21 3:37 AM, Paul Moore wrote: On Mon, May 17, 2021 at 5:22 AM Ondrej Mosnacek wrote: Commit 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") added an implementation of the locked_down LSM hook to SELinux, with the aim to restrict which domains are allowed to

Re: [PATCH 0/3] Rid W=1 warnings from Crypto

2021-05-28 Thread Herbert Xu
On Thu, May 20, 2021 at 10:27:30AM +0100, Lee Jones wrote: > This set is part of a larger effort attempting to clean-up W=1 > kernel builds, which are currently overwhelmingly riddled with > niggly little warnings. > > Lee Jones (3): > crypto: cavium: Fix a bunch of kernel-doc related issues >