[PATCH AUTOSEL 4.14 09/12] usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc

2023-09-08 Thread Sasha Levin
From: Ma Ke [ Upstream commit ce9daa2efc0872a9a68ea51dc8000df05893ef2e ] We should verify the bound of the array to assure that host may not manipulate the index to point past endpoint array. Signed-off-by: Ma Ke Acked-by: Li Yang Link:

[PATCH AUTOSEL 4.19 09/14] usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc

2023-09-08 Thread Sasha Levin
From: Ma Ke [ Upstream commit ce9daa2efc0872a9a68ea51dc8000df05893ef2e ] We should verify the bound of the array to assure that host may not manipulate the index to point past endpoint array. Signed-off-by: Ma Ke Acked-by: Li Yang Link:

[PATCH AUTOSEL 5.4 09/14] usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc

2023-09-08 Thread Sasha Levin
From: Ma Ke [ Upstream commit ce9daa2efc0872a9a68ea51dc8000df05893ef2e ] We should verify the bound of the array to assure that host may not manipulate the index to point past endpoint array. Signed-off-by: Ma Ke Acked-by: Li Yang Link:

[PATCH AUTOSEL 5.10 10/16] usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc

2023-09-08 Thread Sasha Levin
From: Ma Ke [ Upstream commit ce9daa2efc0872a9a68ea51dc8000df05893ef2e ] We should verify the bound of the array to assure that host may not manipulate the index to point past endpoint array. Signed-off-by: Ma Ke Acked-by: Li Yang Link:

[PATCH AUTOSEL 5.15 11/19] usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc

2023-09-08 Thread Sasha Levin
From: Ma Ke [ Upstream commit ce9daa2efc0872a9a68ea51dc8000df05893ef2e ] We should verify the bound of the array to assure that host may not manipulate the index to point past endpoint array. Signed-off-by: Ma Ke Acked-by: Li Yang Link:

[PATCH AUTOSEL 6.1 13/24] usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc

2023-09-08 Thread Sasha Levin
From: Ma Ke [ Upstream commit ce9daa2efc0872a9a68ea51dc8000df05893ef2e ] We should verify the bound of the array to assure that host may not manipulate the index to point past endpoint array. Signed-off-by: Ma Ke Acked-by: Li Yang Link:

[PATCH AUTOSEL 6.4 13/25] usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc

2023-09-08 Thread Sasha Levin
From: Ma Ke [ Upstream commit ce9daa2efc0872a9a68ea51dc8000df05893ef2e ] We should verify the bound of the array to assure that host may not manipulate the index to point past endpoint array. Signed-off-by: Ma Ke Acked-by: Li Yang Link:

[PATCH AUTOSEL 6.5 14/28] usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc

2023-09-08 Thread Sasha Levin
From: Ma Ke [ Upstream commit ce9daa2efc0872a9a68ea51dc8000df05893ef2e ] We should verify the bound of the array to assure that host may not manipulate the index to point past endpoint array. Signed-off-by: Ma Ke Acked-by: Li Yang Link:

[PATCH AUTOSEL 5.4 5/6] powerpc/pseries: fix possible memory leak in ibmebus_bus_init()

2023-09-08 Thread Sasha Levin
From: ruanjinjie [ Upstream commit afda85b963c12947e298ad85d757e333aa40fd74 ] If device_register() returns error in ibmebus_bus_init(), name of kobject which is allocated in dev_set_name() called in device_add() is leaked. As comment of device_add() says, it should call put_device() to drop

[PATCH AUTOSEL 5.15 6/7] powerpc/pseries: fix possible memory leak in ibmebus_bus_init()

2023-09-08 Thread Sasha Levin
From: ruanjinjie [ Upstream commit afda85b963c12947e298ad85d757e333aa40fd74 ] If device_register() returns error in ibmebus_bus_init(), name of kobject which is allocated in dev_set_name() called in device_add() is leaked. As comment of device_add() says, it should call put_device() to drop

[PATCH AUTOSEL 6.1 7/9] powerpc/pseries: fix possible memory leak in ibmebus_bus_init()

2023-09-08 Thread Sasha Levin
From: ruanjinjie [ Upstream commit afda85b963c12947e298ad85d757e333aa40fd74 ] If device_register() returns error in ibmebus_bus_init(), name of kobject which is allocated in dev_set_name() called in device_add() is leaked. As comment of device_add() says, it should call put_device() to drop

[PATCH AUTOSEL 4.14 5/5] powerpc/pseries: fix possible memory leak in ibmebus_bus_init()

2023-09-08 Thread Sasha Levin
From: ruanjinjie [ Upstream commit afda85b963c12947e298ad85d757e333aa40fd74 ] If device_register() returns error in ibmebus_bus_init(), name of kobject which is allocated in dev_set_name() called in device_add() is leaked. As comment of device_add() says, it should call put_device() to drop

[PATCH AUTOSEL 4.19 6/6] powerpc/pseries: fix possible memory leak in ibmebus_bus_init()

2023-09-08 Thread Sasha Levin
From: ruanjinjie [ Upstream commit afda85b963c12947e298ad85d757e333aa40fd74 ] If device_register() returns error in ibmebus_bus_init(), name of kobject which is allocated in dev_set_name() called in device_add() is leaked. As comment of device_add() says, it should call put_device() to drop

[PATCH AUTOSEL 5.4 6/6] PCI: rpaphp: Error out on busy status from get-sensor-state

2023-09-08 Thread Sasha Levin
From: Mahesh Salgaonkar [ Upstream commit 77583f77ed9b1452ac62caebf09b2206da10bbf9 ] When certain PHB HW failure causes pHyp to recover PHB, it marks the PE state as temporarily unavailable until recovery is complete. This also triggers an EEH handler in Linux which needs to notify drivers, and

[PATCH AUTOSEL 5.10 5/5] powerpc/pseries: fix possible memory leak in ibmebus_bus_init()

2023-09-08 Thread Sasha Levin
From: ruanjinjie [ Upstream commit afda85b963c12947e298ad85d757e333aa40fd74 ] If device_register() returns error in ibmebus_bus_init(), name of kobject which is allocated in dev_set_name() called in device_add() is leaked. As comment of device_add() says, it should call put_device() to drop

[PATCH AUTOSEL 6.4 09/11] powerpc/pseries: fix possible memory leak in ibmebus_bus_init()

2023-09-08 Thread Sasha Levin
From: ruanjinjie [ Upstream commit afda85b963c12947e298ad85d757e333aa40fd74 ] If device_register() returns error in ibmebus_bus_init(), name of kobject which is allocated in dev_set_name() called in device_add() is leaked. As comment of device_add() says, it should call put_device() to drop

[PATCH AUTOSEL 6.5 09/11] powerpc/pseries: fix possible memory leak in ibmebus_bus_init()

2023-09-08 Thread Sasha Levin
From: ruanjinjie [ Upstream commit afda85b963c12947e298ad85d757e333aa40fd74 ] If device_register() returns error in ibmebus_bus_init(), name of kobject which is allocated in dev_set_name() called in device_add() is leaked. As comment of device_add() says, it should call put_device() to drop

Re: [PATCH gmem FIXUP v2] mm, compaction: make testing mapping_unmovable() safe

2023-09-08 Thread Sean Christopherson
On Fri, 08 Sep 2023 09:42:23 +0200, Vlastimil Babka wrote: > As Kirill pointed out, mapping can be removed under us due to > truncation. Test it under folio lock as already done for the async > compaction / dirty folio case. To prevent locking every folio with > mapping to do the test, do it only

Re: [PATCH v7 0/4] kexec: Fix kexec_file_load for llvm16 with PGO

2023-09-08 Thread Song Liu
On Fri, Sep 8, 2023 at 2:52 PM Ricardo Ribalda wrote: > > Hi Song > > On Fri, 8 Sept 2023 at 23:48, Song Liu wrote: > > > > Hi Ricardo, > > > > Thanks for your kind reply. > > > > On Fri, Sep 8, 2023 at 2:18 PM Ricardo Ribalda wrote: > > > > > > Hi Song > > > > > > On Fri, 8 Sept 2023 at 01:08,

Re: [PATCH v7 0/4] kexec: Fix kexec_file_load for llvm16 with PGO

2023-09-08 Thread Ricardo Ribalda
Hi Song On Fri, 8 Sept 2023 at 23:48, Song Liu wrote: > > Hi Ricardo, > > Thanks for your kind reply. > > On Fri, Sep 8, 2023 at 2:18 PM Ricardo Ribalda wrote: > > > > Hi Song > > > > On Fri, 8 Sept 2023 at 01:08, Song Liu wrote: > > > > > > Hi Ricardo and folks, > > > > > > On Fri, May 19,

Re: [PATCH v7 0/4] kexec: Fix kexec_file_load for llvm16 with PGO

2023-09-08 Thread Song Liu
Hi Ricardo, Thanks for your kind reply. On Fri, Sep 8, 2023 at 2:18 PM Ricardo Ribalda wrote: > > Hi Song > > On Fri, 8 Sept 2023 at 01:08, Song Liu wrote: > > > > Hi Ricardo and folks, > > > > On Fri, May 19, 2023 at 7:48 AM Ricardo Ribalda > > wrote: > > > > > > When upreving llvm I

Re: [PATCH v7 0/4] kexec: Fix kexec_file_load for llvm16 with PGO

2023-09-08 Thread Ricardo Ribalda
Hi Song On Fri, 8 Sept 2023 at 01:08, Song Liu wrote: > > Hi Ricardo and folks, > > On Fri, May 19, 2023 at 7:48 AM Ricardo Ribalda wrote: > > > > When upreving llvm I realised that kexec stopped working on my test > > platform. > > > > The reason seems to be that due to PGO there are multiple

Re: [PATCH v7 0/3 RESEND] generic and PowerPC SED Opal keystore

2023-09-08 Thread Jens Axboe
On 9/8/23 9:30 AM, gjo...@linux.vnet.ibm.com wrote: > From: Greg Joyce > > This patchset extends the capabilites incorporated into for-6.6/block > (https://git.kernel.dk/cgit/linux/commit/?h=for-6.6/block=3bfeb61256643281ac4be5b8a57e9d9da3db4335) > by allowing the SED Opal key to be seeded into

Re: [syzbot] [mm?] kernel BUG in vma_replace_policy

2023-09-08 Thread syzbot
syzbot has bisected this issue to: commit 49b0638502da097c15d46cd4e871dbaa022caf7c Author: Suren Baghdasaryan Date: Fri Aug 4 15:27:19 2023 + mm: enable page walking API to lock vmas during the walk bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=11fd234868 start

Re: [PATCH RFC] powerpc/rtas: Make it possible to disable sys_rtas

2023-09-08 Thread Nathan Lynch
>> > There are about 3 known use cases that absolutely need access by other >> > means than sys_rtas to work with lockdown, and about other 3 that would >> > work either way. >> >> How do you figure that? I count 11 librtas APIs that use work areas (and >> therefore /dev/mem) that are

Re: [PATCH V2] tools/perf: Add includes for detected configs in Makefile.perf

2023-09-08 Thread Ian Rogers
On Fri, Sep 8, 2023 at 7:51 AM Athira Rajeev wrote: > > Makefile.perf uses "CONFIG_*" checks in the code. Example the config > for libtraceevent is used to set PYTHON_EXT_SRCS > > ifeq ($(CONFIG_LIBTRACEEVENT),y) > PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)

Re: [PATCHv5 1/3] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-09-08 Thread kernel test robot
Hi Pingfan, kernel test robot noticed the following build errors: [auto build test ERROR on powerpc/fixes] [also build test ERROR on linus/master v6.5 next-20230908] [cannot apply to powerpc/next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch

[PATCH v7 0/3 RESEND] generic and PowerPC SED Opal keystore

2023-09-08 Thread gjoyce
From: Greg Joyce This patchset extends the capabilites incorporated into for-6.6/block (https://git.kernel.dk/cgit/linux/commit/?h=for-6.6/block=3bfeb61256643281ac4be5b8a57e9d9da3db4335) by allowing the SED Opal key to be seeded into the keyring from a secure permanent keystore. It has gone

[PATCH v7 3/3 RESEND] powerpc/pseries: PLPKS SED Opal keystore support

2023-09-08 Thread gjoyce
From: Greg Joyce Define operations for SED Opal to read/write keys from POWER LPAR Platform KeyStore(PLPKS). This allows non-volatile storage of SED Opal keys. Signed-off-by: Greg Joyce Reviewed-by: Jonathan Derrick Reviewed-by: Hannes Reinecke --- arch/powerpc/platforms/pseries/Kconfig

[PATCH v7 2/3 RESEND] block: sed-opal: keystore access for SED Opal keys

2023-09-08 Thread gjoyce
From: Greg Joyce Allow for permanent SED authentication keys by reading/writing to the SED Opal non-volatile keystore. Signed-off-by: Greg Joyce Reviewed-by: Jonathan Derrick --- block/sed-opal.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git

[PATCH v7 1/3 RESEND] block:sed-opal: SED Opal keystore

2023-09-08 Thread gjoyce
From: Greg Joyce Add read and write functions that allow SED Opal keys to stored in a permanent keystore. Signed-off-by: Greg Joyce Reviewed-by: Jonathan Derrick --- block/Makefile | 2 +- block/sed-opal-key.c | 24 include/linux/sed-opal-key.h

[PATCH v2] cpufreq: pmac32: Use of_property_read_reg() to parse "reg"

2023-09-08 Thread Rob Herring
Use the recently added of_property_read_reg() helper to get the untranslated "reg" address value. Acked-by: Viresh Kumar Signed-off-by: Rob Herring --- v2: - Add missing include --- drivers/cpufreq/pmac32-cpufreq.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH V2] tools/perf: Add includes for detected configs in Makefile.perf

2023-09-08 Thread Athira Rajeev
Makefile.perf uses "CONFIG_*" checks in the code. Example the config for libtraceevent is used to set PYTHON_EXT_SRCS ifeq ($(CONFIG_LIBTRACEEVENT),y) PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources) else PYTHON_EXT_SRCS := $(shell grep -v

[PATCHv5 3/3] powerpc/setup: alloc extra paca_ptrs to hold boot_cpuid

2023-09-08 Thread Pingfan Liu
paca_ptrs should be large enough to hold the boot_cpuid, hence, its lower boundary is set to the bigger one between boot_cpuid+1 and nr_cpus. On the other hand, some kernel component: -1. the timer assumes cpu0 online since the timer_list->flags subfield 'TIMER_CPUMASK' is zero if not initialized

[PATCHv5 2/3] powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus

2023-09-08 Thread Pingfan Liu
If the boot_cpuid is smaller than nr_cpus, it requires extra effort to ensure the boot_cpu is in cpu_present_mask. This can be achieved by reserving the last quota for the boot cpu. Note: the restriction on nr_cpus will be lifted with more effort in the next patch Signed-off-by: Pingfan Liu Cc:

[PATCHv5 0/3] enable nr_cpus for powerpc

2023-09-08 Thread Pingfan Liu
It is a long time since my last v4 [1]. The code has undergone great changes. The paca[] array has been reorganized and indexed by paca_ptrs[], which dramatically decreases the memory consumption even if there are many unpresent cpus in the middle. However, reordering the logical cpu numbers can

[PATCHv5 1/3] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-09-08 Thread Pingfan Liu
*** Idea *** For kexec -p, the boot cpu can be not the cpu0, this causes the problem of allocating memory for paca_ptrs[]. However, in theory, there is no requirement to assign cpu's logical id as its present sequence in the device tree. But there is something like cpu_first_thread_sibling(),

Re: [PATCH V2] perf test: Fix parse-events tests to skip parametrized events

2023-09-08 Thread Athira Rajeev
> On 08-Sep-2023, at 11:04 AM, Sachin Sant wrote: > > > >> On 07-Sep-2023, at 10:29 PM, Athira Rajeev >> wrote: >> >> Testcase "Parsing of all PMU events from sysfs" parse events for >> all PMUs, and not just cpu. In case of powerpc, the PowerVM >> environment supports events from

Re: [PATCH] tools/perf: Add includes for detected configs in Makefile.perf

2023-09-08 Thread Athira Rajeev
> On 08-Sep-2023, at 4:41 AM, Ian Rogers wrote: > > On Thu, Sep 7, 2023 at 10:19 AM Athira Rajeev > wrote: >> >> Makefile.perf uses "CONFIG_*" checks in the code. Example the config >> for libtraceevent is used to set PYTHON_EXT_SRCS >> >>ifeq ($(CONFIG_LIBTRACEEVENT),y) >>

Re: [PATCH 0/3] Fix for shellcheck issues with version "0.6"

2023-09-08 Thread Athira Rajeev
> On 08-Sep-2023, at 5:20 AM, Ian Rogers wrote: > > On Thu, Sep 7, 2023 at 10:17 AM Athira Rajeev > wrote: >> >> From: root >> >> shellcheck was run on perf tool shell scripts s a pre-requisite >> to include a build option for shellcheck discussed here: >>

Re: [RFC PATCH] powerpc: Make crashing cpu to be discovered first in kdump kernel.

2023-09-08 Thread Pingfan Liu
Hi Mahesh, Thanks for sharing your great idea. I was in the middle of V5 and finish it today. My v5 is based on the same idea of my v4 [1] with the improvement of the code. And I will send it out. [1]:

[PATCH v4 5/5] powerpc/bpf: use patch_instructions()

2023-09-08 Thread Hari Bathini
Use the newly introduced patch_instructions() that handles patching multiple instructions with one call. This improves speed of exectution for JIT'ing bpf programs. Without this patch (on a POWER9 lpar): # time modprobe test_bpf real2m59.681s user0m0.000s sys 1m44.160s #

[PATCH v4 4/5] powerpc/code-patching: introduce patch_instructions()

2023-09-08 Thread Hari Bathini
patch_instruction() entails setting up pte, patching the instruction, clearing the pte and flushing the tlb. If multiple instructions need to be patched, every instruction would have to go through the above drill unnecessarily. Instead, introduce function patch_instructions() that sets up the pte,

[PATCH v4 3/5] powerpc/bpf: use bpf_jit_binary_pack_[alloc|finalize|free]

2023-09-08 Thread Hari Bathini
Use bpf_jit_binary_pack_alloc in powerpc jit. The jit engine first writes the program to the rw buffer. When the jit is done, the program is copied to the final location with bpf_jit_binary_pack_finalize. With multiple jit_subprogs, bpf_jit_free is called on some subprograms that haven't got

[PATCH v4 2/5] powerpc/bpf: implement bpf_arch_text_invalidate for bpf_prog_pack

2023-09-08 Thread Hari Bathini
Implement bpf_arch_text_invalidate and use it to fill unused part of the bpf_prog_pack with trap instructions when a BPF program is freed. Signed-off-by: Hari Bathini --- arch/powerpc/net/bpf_jit_comp.c | 15 +++ 1 file changed, 15 insertions(+) diff --git

[PATCH v4 1/5] powerpc/bpf: implement bpf_arch_text_copy

2023-09-08 Thread Hari Bathini
bpf_arch_text_copy is used to dump JITed binary to RX page, allowing multiple BPF programs to share the same page. Use patch_instruction() to implement it. Signed-off-by: Hari Bathini --- arch/powerpc/net/bpf_jit_comp.c | 41 - 1 file changed, 40 insertions(+), 1

[PATCH v4 0/5] powerpc/bpf: use BPF prog pack allocator

2023-09-08 Thread Hari Bathini
Most BPF programs are small, but they consume a page each. For systems with busy traffic and many BPF programs, this may also add significant pressure on instruction TLB. High iTLB pressure usually slows down the whole system causing visible performance degradation for production workloads.

Re: [PATCH v2 1/3] perf vendor events: Update JSON/events for power10 platform

2023-09-08 Thread kajoljain
On 9/6/23 19:56, Arnaldo Carvalho de Melo wrote: > Em Tue, Sep 05, 2023 at 05:10:37PM +0530, Kajol Jain escreveu: >> Update JSON/Events list with data-source events for power10 platform. > > Thanks, applied the series. > > - Arnaldo Hi Arnaldo, Thanks for pulling the patchset. Thanks, Kajol

Re: [PATCH v2 2/3] perf vendor events: Update JSON/events for power10 platform

2023-09-08 Thread kajoljain
On 9/6/23 19:55, Arnaldo Carvalho de Melo wrote: > Em Tue, Sep 05, 2023 at 05:10:38PM +0530, Kajol Jain escreveu: >> Update JSON/Events list with additional data-source events >> for power10 platform. > > I changed the cset title to: > > "perf vendor events power10: Add extra data-source

Re: [PATCH v2 1/3] perf vendor events: Update JSON/events for power10 platform

2023-09-08 Thread kajoljain
On 9/6/23 19:52, Arnaldo Carvalho de Melo wrote: > Em Tue, Sep 05, 2023 at 05:10:37PM +0530, Kajol Jain escreveu: >> Update JSON/Events list with data-source events for power10 platform. > > Next time could you please provide some pointer to the document from > where these metrics came if it

Re: Kernel crash during ltp(min_free_kbytes) test run (zone_reclaimable_pages)

2023-09-08 Thread Liu Shixin
On 2023/9/7 22:22, Sachin Sant wrote: > While running LTP tests (specifically min_free_kbytes) on a Power server > booted with 6.5.0-next-20230906 following crash was encountered. > > [ 3952.404936] __vm_enough_memory: pid: 440285, comm: min_free_kbytes, not > enough memory for the allocation

Re: [PATCH 8/8] c-sky: rm sentinel element from ctl_talbe array

2023-09-08 Thread Guo Ren
Acked-by: Guo Ren On Wed, Sep 6, 2023 at 6:04 PM Joel Granados via B4 Relay wrote: > > From: Joel Granados > > This commit comes at the tail end of a greater effort to remove the > empty elements at the end of the ctl_table arrays (sentinels) which > will reduce the overall build time size of

[PATCH gmem FIXUP v2] mm, compaction: make testing mapping_unmovable() safe

2023-09-08 Thread Vlastimil Babka
As Kirill pointed out, mapping can be removed under us due to truncation. Test it under folio lock as already done for the async compaction / dirty folio case. To prevent locking every folio with mapping to do the test, do it only for unevictable folios, as we can expect the unmovable mapping

Re: Kernel crash during ltp(min_free_kbytes) test run (zone_reclaimable_pages)

2023-09-08 Thread Michael Ellerman
Sachin Sant writes: > While running LTP tests (specifically min_free_kbytes) on a Power server > booted with 6.5.0-next-20230906 following crash was encountered. > > [ 3952.404936] __vm_enough_memory: pid: 440285, comm: min_free_kbytes, not > enough memory for the allocation > [ 3956.895519]

[PATCH] tty: hvc: remove set but unused variable

2023-09-08 Thread Bo Liu
The local variable vdev in hvcs_destruct_port() is set but not used. Remove the variable and related code. Signed-off-by: Bo Liu --- drivers/tty/hvc/hvcs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index d29fdfe9d93d..b537d1fb67d4