RE: [PATCH v4] vmscan: add trace events for lru_gen

2023-09-25 Thread 김재원
>On Mon, Sep 25, 2023 at 10:20?PM Jaewon Kim wrote: >> >> As the legacy lru provides, the lru_gen needs some trace events for >> debugging. >> >> This commit introduces 2 trace events. >> trace_mm_vmscan_lru_gen_scan >> trace_mm_vmscan_lru_gen_evict >> >> Each event is similar to the

Re: [PATCH v4] vmscan: add trace events for lru_gen

2023-09-25 Thread Yu Zhao
On Mon, Sep 25, 2023 at 10:20 PM Jaewon Kim wrote: > > As the legacy lru provides, the lru_gen needs some trace events for > debugging. > > This commit introduces 2 trace events. > trace_mm_vmscan_lru_gen_scan > trace_mm_vmscan_lru_gen_evict > > Each event is similar to the following legacy

[PATCH v4] vmscan: add trace events for lru_gen

2023-09-25 Thread Jaewon Kim
As the legacy lru provides, the lru_gen needs some trace events for debugging. This commit introduces 2 trace events. trace_mm_vmscan_lru_gen_scan trace_mm_vmscan_lru_gen_evict Each event is similar to the following legacy events. trace_mm_vmscan_lru_isolate,

[PATCH] [v2] ieee802154: ca8210: Fix a potential UAF in ca8210_probe

2023-09-25 Thread Dinghao Liu
If of_clk_add_provider() fails in ca8210_register_ext_clock(), it calls clk_unregister() to release priv->clk and returns an error. However, the caller ca8210_probe() then calls ca8210_remove(), where priv->clk is freed again in ca8210_unregister_ext_clock(). In this case, a use-after-free may

Re: [PATCH v5 01/18] cgroup/misc: Add per resource callbacks for CSS events

2023-09-25 Thread Haitao Huang
Hi Jarkko On Mon, 25 Sep 2023 12:09:21 -0500, Jarkko Sakkinen wrote: On Sat Sep 23, 2023 at 6:06 AM EEST, Haitao Huang wrote: From: Kristen Carlson Accardi The misc cgroup controller (subsystem) currently does not perform resource type specific action for Cgroups Subsystem State (CSS)

RE: [PATCH v3] vmscan: add trace events for lru_gen

2023-09-25 Thread 김재원
>Hello, > >On Sun, 24 Sep 2023 23:23:43 +0900 Jaewon Kim wrote: > >> As the legacy lru provides, the lru_gen needs some trace events for >> debugging. >> >> This commit introduces 2 trace events. >> trace_mm_vmscan_lru_gen_scan >> trace_mm_vmscan_lru_gen_evict >> >> Each event is similar to

Re: [PATCH v5 04/12] fprobe: Use ftrace_regs in fprobe entry handler

2023-09-25 Thread Google
On Tue, 26 Sep 2023 00:14:33 +0200 Jiri Olsa wrote: > On Mon, Sep 25, 2023 at 09:15:15PM +0900, Masami Hiramatsu wrote: > > Hi Jiri, > > > > On Mon, 25 Sep 2023 12:41:59 +0200 > > Jiri Olsa wrote: > > > > > On Sun, Sep 24, 2023 at 10:36:36PM +0900, Masami Hiramatsu (Google) wrote: > > > >

Re: [PATCH v5 04/12] fprobe: Use ftrace_regs in fprobe entry handler

2023-09-25 Thread Jiri Olsa
On Mon, Sep 25, 2023 at 09:15:15PM +0900, Masami Hiramatsu wrote: > Hi Jiri, > > On Mon, 25 Sep 2023 12:41:59 +0200 > Jiri Olsa wrote: > > > On Sun, Sep 24, 2023 at 10:36:36PM +0900, Masami Hiramatsu (Google) wrote: > > > From: Masami Hiramatsu (Google) > > > > > > This allows fprobes to be

Re: [PATCH v3] vmscan: add trace events for lru_gen

2023-09-25 Thread SeongJae Park
Hello, On Sun, 24 Sep 2023 23:23:43 +0900 Jaewon Kim wrote: > As the legacy lru provides, the lru_gen needs some trace events for > debugging. > > This commit introduces 2 trace events. > trace_mm_vmscan_lru_gen_scan > trace_mm_vmscan_lru_gen_evict > > Each event is similar to the

Re: [PATCH v5 02/18] cgroup/misc: Add SGX EPC resource type and export APIs for SGX driver

2023-09-25 Thread Tejun Heo
On Fri, Sep 22, 2023 at 08:06:41PM -0700, Haitao Huang wrote: > From: Kristen Carlson Accardi > > Add SGX EPC memory, MISC_CG_RES_SGX_EPC, to be a valid resource type > for the misc controller. > > Add per resource type private data so that SGX can store additional per > cgroup data in

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-25 Thread Clément Léger
On 25/09/2023 20:04, Clément Léger wrote: > > > On 25/09/2023 18:04, Beau Belgrave wrote: >> On Mon, Sep 25, 2023 at 09:53:16AM +0200, Clément Léger wrote: >>> >>> >>> On 22/09/2023 21:22, Beau Belgrave wrote: On Tue, Sep 19, 2023 at 02:59:12PM +0200, Clément Léger wrote: > >

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-25 Thread Clément Léger
On 25/09/2023 18:04, Beau Belgrave wrote: > On Mon, Sep 25, 2023 at 09:53:16AM +0200, Clément Léger wrote: >> >> >> On 22/09/2023 21:22, Beau Belgrave wrote: >>> On Tue, Sep 19, 2023 at 02:59:12PM +0200, Clément Léger wrote: On 14/09/2023 19:29, Steven Rostedt wrote: > On

[PATCH] remoteproc: zynqmp: change tcm address translation method

2023-09-25 Thread Tanmay Shah
Introduce device address in hardcode TCM table. Device address is used for address translation. Also, previous method(hack) to mask few bits from address to achieve address translation is removed Signed-off-by: Tanmay Shah --- drivers/remoteproc/xlnx_r5_remoteproc.c | 58

Re: [PATCH v5 16/18] x86/sgx: Limit process EPC usage with misc cgroup controller

2023-09-25 Thread Jarkko Sakkinen
On Sat Sep 23, 2023 at 6:06 AM EEST, Haitao Huang wrote: > From: Kristen Carlson Accardi > > Implement support for cgroup control of SGX Enclave Page Cache (EPC) > memory using the misc cgroup controller. EPC memory is independent > from normal system memory, e.g. must be reserved at boot from

Re: [PATCH v5 07/18] x86/sgx: Introduce RECLAIM_IN_PROGRESS state

2023-09-25 Thread Jarkko Sakkinen
On Sat Sep 23, 2023 at 6:06 AM EEST, Haitao Huang wrote: > From: Sean Christopherson > > Add RECLAIM_IN_PROGRESS state to not rely on list_empty(_page->list) > to determine if an EPC page is selected as a reclaiming candidate. > > When a page is being reclaimed from the page pool

Re: [PATCH v5 06/18] x86/sgx: Introduce EPC page states

2023-09-25 Thread Jarkko Sakkinen
On Sat Sep 23, 2023 at 6:06 AM EEST, Haitao Huang wrote: > Use the lower 3 bits in the flags field of sgx_epc_page struct to > track EPC states in its life cycle and define an enum for possible > states. More state(s) will be added later. > > Signed-off-by: Haitao Huang > --- > V4: > - No changes

Re: [PATCH v5 01/18] cgroup/misc: Add per resource callbacks for CSS events

2023-09-25 Thread Jarkko Sakkinen
On Sat Sep 23, 2023 at 6:06 AM EEST, Haitao Huang wrote: > From: Kristen Carlson Accardi > > The misc cgroup controller (subsystem) currently does not perform > resource type specific action for Cgroups Subsystem State (CSS) events: > the 'css_alloc' event when a cgroup is created and the

Re: [PATCH v4 01/18] cgroup/misc: Add per resource callbacks for CSS events

2023-09-25 Thread Jarkko Sakkinen
On Sat Sep 16, 2023 at 7:11 AM EEST, Haitao Huang wrote: > Hi Jarkko > > On Wed, 13 Sep 2023 04:39:06 -0500, Jarkko Sakkinen > wrote: > > > On Wed Sep 13, 2023 at 7:06 AM EEST, Haitao Huang wrote: > >> From: Kristen Carlson Accardi > >> > >> Consumers of the misc cgroup controller might need

Re: [PATCH v6 06/13] selftests/sgx: Remove redundant enclave base address save/restore

2023-09-25 Thread Jarkko Sakkinen
On Thu Sep 21, 2023 at 5:35 PM EEST, Jo Van Bulck wrote: > Remove redundant push/pop pair that stores and restores the enclave base > address in the test enclave, as it is never used after the pop and can > anyway be easily retrieved via the __encl_base symbol. > > Signed-off-by: Jo Van Bulck >

Re: [PATCH v4 3/3] remoteproc: zynqmp: get TCM from device-tree

2023-09-25 Thread Tanmay Shah
On 9/7/23 1:08 PM, Mathieu Poirier wrote: > On Wed, Sep 06, 2023 at 05:02:40PM -0500, Tanmay Shah wrote: > > HI Mathieu, > > > > Thanks for reviews. Please find my comments below. > > > > I took another look after reading your comment and found more problems... > > > > > On 9/6/23 2:47 PM,

Re: [PATCH v2] nd_btt: Make BTT lanes preemptible

2023-09-25 Thread Ira Weiny
Tomas Glozar wrote: > nd_region_acquire_lane uses get_cpu, which disables preemption. This is > an issue on PREEMPT_RT kernels, since btt_write_pg and also > nd_region_acquire_lane itself take a spin lock, resulting in BUG: > sleeping function called from invalid context. > > Fix the issue by

Re: [PATCH v1 9/9] ACPI: NFIT: Don't use KBUILD_MODNAME for driver name

2023-09-25 Thread Dan Williams
Andy Shevchenko wrote: > On Mon, Sep 25, 2023 at 05:48:42PM +0300, Michal Wilczynski wrote: > > Driver name is part of the ABI, so it should be hard-coded, as ABI > > should be always kept backward compatible. Prevent ABI from changing > > accidentally in case KBUILD_MODNAME change. > > This is

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-25 Thread Beau Belgrave
On Mon, Sep 25, 2023 at 09:53:16AM +0200, Clément Léger wrote: > > > On 22/09/2023 21:22, Beau Belgrave wrote: > > On Tue, Sep 19, 2023 at 02:59:12PM +0200, Clément Léger wrote: > >> > >> > >> On 14/09/2023 19:29, Steven Rostedt wrote: > >>> On Thu, 14 Sep 2023 13:17:00 -0400 > >>> Steven

Re: [PATCH v1 9/9] ACPI: NFIT: Don't use KBUILD_MODNAME for driver name

2023-09-25 Thread Andy Shevchenko
On Mon, Sep 25, 2023 at 05:48:42PM +0300, Michal Wilczynski wrote: > Driver name is part of the ABI, so it should be hard-coded, as ABI > should be always kept backward compatible. Prevent ABI from changing > accidentally in case KBUILD_MODNAME change. This is up to maintainers, probably we won't

[PATCH v1 9/9] ACPI: NFIT: Don't use KBUILD_MODNAME for driver name

2023-09-25 Thread Michal Wilczynski
Driver name is part of the ABI, so it should be hard-coded, as ABI should be always kept backward compatible. Prevent ABI from changing accidentally in case KBUILD_MODNAME change. Suggested-by: Andy Shevchenko Signed-off-by: Michal Wilczynski --- drivers/acpi/nfit/core.c | 2 +- 1 file

[PATCH v1 8/9] ACPI: NFIT: Remove redundant call to to_acpi_dev()

2023-09-25 Thread Michal Wilczynski
In acpi_nfit_ctl() ACPI handle is extracted using to_acpi_dev() function and accessing handle field in ACPI device. After transformation from ACPI driver to platform driver this is not optimal anymore. To get a handle it's enough to just use ACPI_HANDLE() macro to extract the handle.

[PATCH v1 7/9] ACPI: NFIT: Replace acpi_driver with platform_driver

2023-09-25 Thread Michal Wilczynski
NFIT driver uses struct acpi_driver incorrectly to register itself. This is wrong as the instances of the ACPI devices are not meant to be literal devices, they're supposed to describe ACPI entry of a particular device. Use platform_driver instead of acpi_driver. In relevant places call platform

[PATCH v1 6/9] ACPI: AC: Rename ACPI device from device to adev

2023-09-25 Thread Michal Wilczynski
Since transformation from ACPI driver to platform driver there are two devices on which the driver operates - ACPI device and platform device. For the sake of reader this calls for the distinction in their naming, to avoid confusion. Rename device to adev, as corresponding platform device is

[PATCH v1 5/9] ACPI: AC: Replace acpi_driver with platform_driver

2023-09-25 Thread Michal Wilczynski
AC driver uses struct acpi_driver incorrectly to register itself. This is wrong as the instances of the ACPI devices are not meant to be literal devices, they're supposed to describe ACPI entry of a particular device. Use platform_driver instead of acpi_driver. In relevant places call platform

[PATCH v1 4/9] ACPI: AC: Use string_choices API instead of ternary operator

2023-09-25 Thread Michal Wilczynski
Use modern string_choices API instead of manually determining the output using ternary operator. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Michal Wilczynski --- drivers/acpi/ac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v1 1/9] ACPI: bus: Make notify wrappers more generic

2023-09-25 Thread Michal Wilczynski
acpi_dev_install_notify_handler() and acpi_dev_remove_notify_handler() are wrappers around ACPICA installers. They are meant to save some duplicated code from drivers. However as we're moving towards drivers operating on platform_device they become a bit inconvenient to use as inside the driver

[PATCH v1 3/9] ACPI: AC: Remove unnecessary checks

2023-09-25 Thread Michal Wilczynski
Remove unnecessary checks for NULL for variables that can't be NULL at the point they're checked for it. Defensive programming is discouraged in the kernel. Signed-off-by: Michal Wilczynski --- drivers/acpi/ac.c | 27 --- 1 file changed, 4 insertions(+), 23 deletions(-)

[PATCH v1 2/9] docs: firmware-guide: ACPI: Clarify ACPI bus concepts

2023-09-25 Thread Michal Wilczynski
Some devices implement ACPI driver as a way to manage devices enumerated by the ACPI. This might be confusing as a preferred way to implement a driver for devices not connected to any bus is a platform driver, as stated in the documentation. Clarify relationships between ACPI device, platform

[PATCH v1 0/9] Replace acpi_driver with platform_driver

2023-09-25 Thread Michal Wilczynski
Currently there is a number of drivers that somewhat incorrectly register themselves as acpi_driver, while they should be registering as platform_drivers. acpi_device was never meant to represent actual device, it only represents an entry in the ACPI table and ACPI driver should be treated as a

droid4 -- weird behaviour when attempting to use usb host

2023-09-25 Thread Pavel Machek
Hi! I'm having some fun with usb host. Good news is it works with externally powered hub... after a while. I get some error messages about inability to go host mode, but with enough patience it eventually does enter host mode and I see my keyboard/mouse. And usually in that process, one of my

Re: [PATCH 2/2] arm64: dts: qcom: msm8939-huawei-kiwi: Add initial device tree

2023-09-25 Thread Konrad Dybcio
On 25.09.2023 16:28, lukas walter wrote: > Date: Wed, 20 Sep 2023 16:47:30 +0200 > >>> + >>> + reserved-memory { >>> + reserved@84a0 { >>> + reg = <0x0 0x84a0 0x0 0x160>; >>> + no-map; >>> + }; >> Do we know what this is for? >

Re: [PATCH 2/2] arm64: dts: qcom: msm8939-huawei-kiwi: Add initial device tree

2023-09-25 Thread lukas walter
Date: Wed, 20 Sep 2023 16:47:30 +0200 >> + >> +reserved-memory { >> +reserved@84a0 { >> +reg = <0x0 0x84a0 0x0 0x160>; >> +no-map; >> +}; >Do we know what this is for? This seems to be some QSEE/TrustZone memory

Re: [PATCH v5 04/12] fprobe: Use ftrace_regs in fprobe entry handler

2023-09-25 Thread Google
Hi Jiri, On Mon, 25 Sep 2023 12:41:59 +0200 Jiri Olsa wrote: > On Sun, Sep 24, 2023 at 10:36:36PM +0900, Masami Hiramatsu (Google) wrote: > > From: Masami Hiramatsu (Google) > > > > This allows fprobes to be available with CONFIG_DYNAMIC_FTRACE_WITH_ARGS > > instead of

Re: (subset) [PATCH v2 0/7] Initial support for the Fairphone 5 smartphone

2023-09-25 Thread Srinivas Kandagatla
On Tue, 19 Sep 2023 14:45:54 +0200, Luca Weiss wrote: > Add support to boot up mainline kernel on the QCM6490-based Fairphone 5 > smartphone. > > These patches only cover a part of the functionality brought up on > mainline so far, with the rest needing larger dts and driver changes or > depend

Re: [PATCH v5 04/12] fprobe: Use ftrace_regs in fprobe entry handler

2023-09-25 Thread Jiri Olsa
On Sun, Sep 24, 2023 at 10:36:36PM +0900, Masami Hiramatsu (Google) wrote: > From: Masami Hiramatsu (Google) > > This allows fprobes to be available with CONFIG_DYNAMIC_FTRACE_WITH_ARGS > instead of CONFIG_DYNAMIC_FTRACE_WITH_REGS, then we can enable fprobe > on arm64. > > Signed-off-by: Masami

Re: [PATCH v9 1/5] lib: objpool added: ring-array based lockless MPMC

2023-09-25 Thread Google
Hi Wuqiang, On Tue, 5 Sep 2023 09:52:51 +0800 "wuqiang.matt" wrote: > The object pool is a scalable implementaion of high performance queue > for object allocation and reclamation, such as kretprobe instances. > > With leveraging percpu ring-array to mitigate the hot spot of memory >

Re: [PATCH] ieee802154: ca8210: Fix a potential UAF in ca8210_probe

2023-09-25 Thread dinghao . liu
Hi Miquèl, > > index aebb19f1b3a4..1d545879c000 100644 > > --- a/drivers/net/ieee802154/ca8210.c > > +++ b/drivers/net/ieee802154/ca8210.c > > @@ -2760,6 +2760,7 @@ static int ca8210_register_ext_clock(struct > > spi_device *spi) > > ret = of_clk_add_provider(np, of_clk_src_simple_get,

Re: [PATCH] ieee802154: ca8210: Fix a potential UAF in ca8210_probe

2023-09-25 Thread Miquel Raynal
Hi Dinghao, dinghao@zju.edu.cn wrote on Mon, 25 Sep 2023 15:24:22 +0800: > If of_clk_add_provider() fails in ca8210_register_ext_clock(), > it calls clk_unregister() to release priv->clk and returns an > error. However, the caller ca8210_probe() then calls ca8210_remove(), > where priv->clk

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-25 Thread Clément Léger
On 22/09/2023 22:00, Beau Belgrave wrote: > On Tue, Sep 19, 2023 at 02:59:12PM +0200, Clément Léger wrote: >> >> >> On 14/09/2023 19:29, Steven Rostedt wrote: >>> On Thu, 14 Sep 2023 13:17:00 -0400 >>> Steven Rostedt wrote: >>> Now lets look at big endian layout: uaddr =

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-25 Thread Clément Léger
On 22/09/2023 21:22, Beau Belgrave wrote: > On Tue, Sep 19, 2023 at 02:59:12PM +0200, Clément Léger wrote: >> >> >> On 14/09/2023 19:29, Steven Rostedt wrote: >>> On Thu, 14 Sep 2023 13:17:00 -0400 >>> Steven Rostedt wrote: >>> Now lets look at big endian layout: uaddr =

[PATCH] ieee802154: ca8210: Fix a potential UAF in ca8210_probe

2023-09-25 Thread Dinghao Liu
If of_clk_add_provider() fails in ca8210_register_ext_clock(), it calls clk_unregister() to release priv->clk and returns an error. However, the caller ca8210_probe() then calls ca8210_remove(), where priv->clk is freed again in ca8210_unregister_ext_clock(). In this case, a use-after-free may

[PATCH RT 0/1] Linux v4.19.295-rt129-rc1

2023-09-25 Thread Daniel Wagner
Dear RT Folks, This is the RT stable review cycle of patch 4.19.295-rt129-rc1. Please scream at me if I messed something up. Please test the patches too. The -rc release is also available on kernel.org https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git on the

[PATCH RT 1/1] Linux 4.19.295-rt129

2023-09-25 Thread Daniel Wagner
v4.19.295-rt129-rc1 stable review patch. If anyone has any objections, please let me know. --- Signed-off-by: Daniel Wagner --- localversion-rt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localversion-rt b/localversion-rt index 6d2a676e2033..90303f5aabcf 100644