[RFC PATCH 6/6] powerpc/dexcr: Add enforced userspace ROP protection config

2023-10-08 Thread Benjamin Gray
The DEXCR Non-Privileged Hash Instruction Enable (NPHIE) aspect controls whether the hashst and hashchk instructions are treated as no-ops by the CPU. NPHIE behaviour per ISA 3.1B: 0: hashst and hashchk instructions are executed as no-ops (even when allowed by PCR) 1: hashst

[RFC PATCH 2/6] powerpc/dexcr: Add thread specific DEXCR configuration

2023-10-08 Thread Benjamin Gray
Add capability to track a DEXCR value per thread. Nothing actually changes these values yet, but they are correctly tracked, propagated, and used to set the hardware register. Signed-off-by: Benjamin Gray --- arch/powerpc/include/asm/processor.h | 12 arch/powerpc/kernel/process.c

[RFC PATCH 1/6] powerpc/dexcr: Make all aspects CPU features

2023-10-08 Thread Benjamin Gray
The CPU_FEATURE_* mechanism is the only way right now to get configuration from the "ibm,pa-features" devicetree node. Add a CPU_FEATURE_* entry for each other DEXCR aspect that will be exposed to userspace. The NPHIE feature value is changed for consistency; the actual value is never accessed or

[RFC PATCH 4/6] powerpc/dexcr: Add prctl implementation

2023-10-08 Thread Benjamin Gray
Adds an initial prctl interface implementation. Unprivileged processes can query the current prctl setting, including whether an aspect is implemented by the hardware or is permitted to be modified by a setter prctl. Editable aspects can be changed by a CAP_SYS_ADMIN privileged process. The prctl

[RFC PATCH 3/6] prctl: Define PowerPC DEXCR interface

2023-10-08 Thread Benjamin Gray
Adds the definitions and generic handler for prctl control of the PowerPC Dynamic Execution Control Register (DEXCR). Signed-off-by: Benjamin Gray --- include/uapi/linux/prctl.h | 13 + kernel/sys.c | 16 2 files changed, 29 insertions(+) diff --git

[RFC PATCH 0/6] Add dynamic DEXCR support

2023-10-08 Thread Benjamin Gray
(This RFC is mainly to get feedback on the user interface. Tests and documentation will be added to the non-rfc followups. This builds but is otherwise untested.) In the "Add static DEXCR support" series[1] the kernel was made to initialise the DEXCR to a static value on all CPUs when they

Re: [PATCH V5 1/3] tools/perf: Add text_end to "struct dso" to save .text section size

2023-10-08 Thread Namhyung Kim
On Mon, Oct 2, 2023 at 11:47 PM Athira Rajeev wrote: > > > > > On 03-Oct-2023, at 9:58 AM, Namhyung Kim wrote: > > > > Hello, > > > > On Thu, Sep 28, 2023 at 12:52 AM Athira Rajeev > > wrote: > >> > >> Update "struct dso" to include new member "text_end". > >> This new field will represent the

[PATCH] powerpc/paravirt: Improve vcpu_is_preempted

2023-10-08 Thread Srikar Dronamraju
PowerVM Hypervisor dispatches on a whole core basis. In a shared LPAR, a CPU from a core that is preempted may have a larger latency. In such a scenario, its preferable to choose a different CPU to run. If one of the CPUs in the core is active, i.e neither CEDED nor preempted, then consider this

Re: [PATCH V2] tools/perf: Add perf binary dependent rule for shellcheck log in Makefile.perf

2023-10-08 Thread Namhyung Kim
Hello, Sorry for the late reply. On Thu, Oct 5, 2023 at 8:27 AM Athira Rajeev wrote: > > > > > On 29-Sep-2023, at 12:19 PM, Athira Rajeev > > wrote: > > > > Add rule in new Makefile "tests/Makefile.tests" for running > > shellcheck on shell test scripts. This automates below shellcheck > >

[PATCH] tools/perf/arch/powerpc: Fix the CPU ID const char* value by adding 0x prefix

2023-10-08 Thread Athira Rajeev
Simple expression parser test fails in powerpc as below: 4: Simple expression parser test child forked, pid 170385 Using CPUID 004e2102 division by zero syntax error syntax error FAILED tests/expr.c:65 parse test failed test child finished with -1 Simple

[Bug 216156] [bisected] kmemleak: Not scanning unknown object at 0xc00000007f000000

2023-10-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216156 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|NEW |ASSIGNED

[PATCH v3 2/3] powerpc/fadump: add hotplug_ready sysfs interface

2023-10-08 Thread Sourabh Jain
The elfcorehdr describes the CPUs and memory of the crashed kernel to the kernel that captures the dump, known as the second or fadump kernel. The elfcorehdr needs to be updated if the system's memory changes due to memory hotplug or online/offline events. Currently, memory hotplug events are

[PATCH v3 1/3] powerpc: make fadump resilient with memory add/remove events

2023-10-08 Thread Sourabh Jain
Due to changes in memory resources caused by either memory hotplug or online/offline events, the elfcorehdr, which describes the CPUs and memory of the crashed kernel to the kernel that collects the dump (known as second/fadump kernel), becomes outdated. Consequently, attempting dump collection

[PATCH v3 3/3] Documentation/powerpc: update fadump implementation details

2023-10-08 Thread Sourabh Jain
The patch titled ("powerpc: make fadump resilient with memory add/remove events") has made significant changes to the implementation of fadump, particularly on elfcorehdr creation and fadump crash info header structure. Therefore, updating the fadump implementation documentation to reflect those

[PATCH v3 0/3] powerpc: make fadump resilient with memory add/remove events

2023-10-08 Thread Sourabh Jain
Problem: Due to changes in memory resources caused by either memory hotplug or online/offline events, the elfcorehdr, which describes the cpus and memory of the crashed kernel to the kernel that collects the dump (known as second/fadump kernel), becomes outdated. Consequently, attempting

Re: [net-next PATCH v2 4/4] netdev: use napi_schedule bool instead of napi_schedule_prep/__napi_schedule

2023-10-08 Thread Christian Marangi
On Sun, Oct 08, 2023 at 09:08:41AM +0200, Eric Dumazet wrote: > On Fri, Oct 6, 2023 at 8:49 PM Christian Marangi wrote: > > > > On Thu, Oct 05, 2023 at 06:16:26PM +0200, Eric Dumazet wrote: > > > On Tue, Oct 3, 2023 at 8:36 PM Christian Marangi > > > wrote: > > > > > > > > Replace if condition

[PATCH 00/20] mtd: Convert to platform remove callback returning void

2023-10-08 Thread Uwe Kleine-König
Hello, this series converts all platform drivers below drivers/mtd to use the .remove_new() callback. Compared to the traditional .remove() callback .remove_new() returns no value. This is a good thing because the driver core doesn't (and cannot) cope for errors during remove. The only effect of

[PATCH 06/20] mtd: powernv_flash: Convert to platform remove callback returning void

2023-10-08 Thread Uwe Kleine-König
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve

Re: [net-next PATCH v2 4/4] netdev: use napi_schedule bool instead of napi_schedule_prep/__napi_schedule

2023-10-08 Thread Eric Dumazet
On Fri, Oct 6, 2023 at 8:49 PM Christian Marangi wrote: > > On Thu, Oct 05, 2023 at 06:16:26PM +0200, Eric Dumazet wrote: > > On Tue, Oct 3, 2023 at 8:36 PM Christian Marangi > > wrote: > > > > > > Replace if condition of napi_schedule_prep/__napi_schedule and use bool > > > from napi_schedule

Re: [net-next PATCH v2 3/4] netdev: replace napi_reschedule with napi_schedule

2023-10-08 Thread Eric Dumazet
On Fri, Oct 6, 2023 at 8:52 PM Christian Marangi wrote: > > On Thu, Oct 05, 2023 at 06:41:03PM +0200, Eric Dumazet wrote: > > On Thu, Oct 5, 2023 at 6:32 PM Jakub Kicinski wrote: > > > > > > On Thu, 5 Oct 2023 18:11:56 +0200 Eric Dumazet wrote: > > > > OK, but I suspect some users of

Re: [PATCH] ASoC: fsl: Fix PM disable depth imbalance in fsl_easrc_probe

2023-10-08 Thread Shengjiu Wang
On Wed, Oct 4, 2023 at 3:12 PM Zhang Shurong wrote: > > The pm_runtime_enable will increase power disable depth. Thus > a pairing decrement is needed on the error handling path to > keep it balanced according to context. We fix it by calling > pm_runtime_disable when error returns. > Please add

[tip:locking/core] [futex] cb8c4312af: will-it-scale.per_process_ops -3.2% regression

2023-10-08 Thread kernel test robot
kernel config and materials to reproduce are available at: https://download.01.org/0day-ci/archive/20231008/202310081429.a30c99f2-oliver.s...@intel.com = compiler/cpufreq_governor/kconfig/mode/nr_task/rootfs/tb