Re: [PATCH 5/5] modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules

2023-10-17 Thread Christoph Hellwig
On Wed, Oct 18, 2023 at 01:30:18AM +0100, David Woodhouse wrote: > > But if we're going to tolerate the core kernel still exporting some > stuff with EXPORT_SYMBOL, why isn't OK for a GPL-licensed module do to > the same? Even an *in-tree* GPL-licensed module now can't export > functionality with

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-17 Thread Haitao Huang
On Tue, 17 Oct 2023 14:13:22 -0500, Michal Koutný wrote: On Tue, Oct 17, 2023 at 08:54:48PM +0200, Michal Koutný wrote: Is this distinction between preemptability of EPC pages mandated by the HW implementation? (host/"process" enclaves vs VM enclaves) Or do have users an option to lock

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-17 Thread Haitao Huang
Hi Michal, On Tue, 17 Oct 2023 13:54:46 -0500, Michal Koutný wrote: Hello Haitao. On Tue, Oct 17, 2023 at 07:58:02AM -0500, Haitao Huang wrote: AFAIK, before we introducing max_write() callback in this series, no misc controller would possibly enforce the limit when misc.max is reduced.

Re: [PATCH v3] ACPI: NFIT: Use cleanup.h helpers instead of devm_*()

2023-10-17 Thread Dan Williams
Michal Wilczynski wrote: > The new cleanup.h facilities that arrived in v6.5-rc1 can replace the > the usage of devm semantics in acpi_nfit_init_interleave_set(). That > routine appears to only be using devm to avoid goto statements. The > new __free() annotation at variable declaration time can

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

2023-10-17 Thread wuqiang.matt
On 2023/10/18 10:18, Chengming Zhou wrote: On 2023/10/17 21:56, wuqiang.matt wrote: objpool is a scalable implementation of high performance queue for object allocation and reclamation, such as kretprobe instances. With leveraging percpu ring-array to mitigate hot spots of memory contention,

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

2023-10-17 Thread Chengming Zhou
On 2023/10/17 21:56, wuqiang.matt wrote: > objpool is a scalable implementation of high performance queue for > object allocation and reclamation, such as kretprobe instances. > > With leveraging percpu ring-array to mitigate hot spots of memory > contention, it delivers near-linear scalability

Re: [PATCH kmod v5 5/5] libkmod, depmod, modprobe: Make directory for kernel modules configurable

2023-10-17 Thread Jan Engelhardt
On Tuesday 2023-10-17 19:50, Lucas De Marchi wrote: >> +AC_ARG_WITH([module_directory], >> +AS_HELP_STRING([--with-module-directory=DIR], [directory in which to >> look for kernel modules - typically '/lib/modules' or >> '${prefix}/lib/modules']), >> +[],

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-17 Thread Jan Engelhardt
On Tuesday 2023-10-17 17:10, Michal Suchánek wrote: > >> In my system (Ubuntu), I see the directory paths >> >> /usr/aarch64-linux-gnu/lib/ >> /usr/i686-linux-gnu/lib/ >> /usr/x86_64-linux-gnu/lib/ >> >> If there were such a crazy distro that supports multiple kernel arches >> within a single

Re: [PATCH 5/5] modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules

2023-10-17 Thread David Woodhouse
On Tue, 2023-08-01 at 19:35 +0200, Christoph Hellwig wrote: > It has recently come to my attention that nvidia is circumventing the > protection added in 262e6ae7081d ("modules: inherit > TAINT_PROPRIETARY_MODULE") by importing exports from their proprietary > modules into an allegedly GPL

Re: [PATCH] arm64: dts: qcom: msm8939-longcheer-l9100: Add proximity-near-level

2023-10-17 Thread André Apitzsch
Am Dienstag, dem 17.10.2023 um 18:25 +0200 schrieb Konrad Dybcio: > > > On 10/16/23 22:18, André Apitzsch wrote: > > Consider an object near to the sensor when their distance is about > > 4 cm > > or below. > > > > Signed-off-by: André Apitzsch > > --- > Reviewed-by: Konrad Dybcio > > Out of

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-17 Thread Michal Koutný
On Tue, Oct 17, 2023 at 08:54:48PM +0200, Michal Koutný wrote: > Is this distinction between preemptability of EPC pages mandated by the > HW implementation? (host/"process" enclaves vs VM enclaves) Or do have > users an option to lock certain pages in memory that yields this > difference?

Re: [PATCH 1/3] dt-bindings: usb: fsa4480: Add data-lanes property to endpoint

2023-10-17 Thread Rob Herring
On Mon, Oct 16, 2023 at 04:32:55PM +0200, Neil Armstrong wrote: > On 16/10/2023 16:22, Rob Herring wrote: > > On Fri, Oct 13, 2023 at 01:38:05PM +0200, Luca Weiss wrote: > > > Allow specifying data-lanes to reverse the SBU muxing orientation where > > > necessary by the hardware design. > > > >

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

2023-10-17 Thread Michal Koutný
On Fri, Sep 22, 2023 at 08:06:40PM -0700, Haitao Huang wrote: > @@ -276,10 +276,13 @@ static ssize_t misc_cg_max_write(struct > kernfs_open_file *of, char *buf, > > cg = css_misc(of_css(of)); > > - if (READ_ONCE(misc_res_capacity[type])) > + if

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

2023-10-17 Thread Michal Koutný
On Fri, Sep 22, 2023 at 08:06:55PM -0700, Haitao Huang wrote: > +static void sgx_epc_cgroup_free(struct misc_cg *cg) > +{ > + struct sgx_epc_cgroup *epc_cg; > + > + epc_cg = sgx_epc_cgroup_from_misc_cg(cg); It should check for !epc_cg since the misc controller implementation in

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-17 Thread Michal Koutný
Hello Haitao. On Tue, Oct 17, 2023 at 07:58:02AM -0500, Haitao Huang wrote: > AFAIK, before we introducing max_write() callback in this series, no misc > controller would possibly enforce the limit when misc.max is reduced. e.g. I > don't think CVMs be killed when ASID limit is reduced and the

RE: [PATCH v2 5/6] ACPI: NFIT: Replace acpi_driver with platform_driver

2023-10-17 Thread Dan Williams
Michal Wilczynski wrote: > 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

Re: [PATCH kmod v5 5/5] libkmod, depmod, modprobe: Make directory for kernel modules configurable

2023-10-17 Thread Lucas De Marchi
On Tue, Jul 18, 2023 at 02:01:56PM +0200, Michal Suchanek wrote: Now that modprobe.d is searched under ${prefix}/lib, allow a complete transition to files only under ${prefix} by adding a ${module_directory} configuration. This specifies the directory where to search for kernel modules and

Re: [PATCH kmod v5 0/5] kmod /usr support

2023-10-17 Thread Michal Suchánek
On Tue, Oct 17, 2023 at 11:18:23AM -0500, Lucas De Marchi wrote: > On Tue, Oct 17, 2023 at 05:45:39PM +0200, Michal Suchánek wrote: > > Hello, > > > > it has been a few months since these kmod patches have been posted, and > > a new kmod versio has been released since. > > > > Is there any

Re: [PATCH 1/2] arm64: dts: qcom: msm8953: Set initial address for memory

2023-10-17 Thread Konrad Dybcio
On 10/16/23 09:37, Stephan Gerhold wrote: On Sun, Oct 15, 2023 at 10:26:01PM +0200, Luca Weiss wrote: The dtbs_check really doesn't like having memory without reg set. Address this by setting it to 0x1000 which seems to be the value filled in by the bootloader. Looks like MSM8953 has

Re: [PATCH] arm64: dts: qcom: msm8939-longcheer-l9100: Add proximity-near-level

2023-10-17 Thread Konrad Dybcio
On 10/16/23 22:18, André Apitzsch wrote: Consider an object near to the sensor when their distance is about 4 cm or below. Signed-off-by: André Apitzsch --- Reviewed-by: Konrad Dybcio Out of interest, what is it set to by default? Konrad

Re: [PATCH kmod v5 0/5] kmod /usr support

2023-10-17 Thread Lucas De Marchi
On Tue, Oct 17, 2023 at 05:45:39PM +0200, Michal Suchánek wrote: Hello, it has been a few months since these kmod patches have been posted, and a new kmod versio has been released since. Is there any interest in adding this to kmod? yes, but I think the main drag is deciding with the kernel

Re: [PATCH kmod v5 0/5] kmod /usr support

2023-10-17 Thread Michal Suchánek
Hello, it has been a few months since these kmod patches have been posted, and a new kmod versio has been released since. Is there any interest in adding this to kmod? Thanks Michal On Tue, Jul 18, 2023 at 02:01:51PM +0200, Michal Suchanek wrote: > Hello, > > with these patches it is

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-17 Thread Sean Christopherson
On Mon, Oct 16, 2023, Haitao Huang wrote: > Hi Sean > > On Mon, 16 Oct 2023 16:32:31 -0500, Sean Christopherson > wrote: > > > On Mon, Oct 16, 2023, Haitao Huang wrote: > > > From this perspective, I think the current implementation is > > > "well-defined": > > > EPC cgroup limits for VMs are

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-17 Thread Michal Suchánek
On Tue, Oct 17, 2023 at 11:46:45PM +0900, Masahiro Yamada wrote: > On Tue, Oct 17, 2023 at 9:27 PM Michal Suchánek wrote: > > > > On Tue, Oct 17, 2023 at 09:05:29PM +0900, Masahiro Yamada wrote: > > > On Tue, Oct 17, 2023 at 7:44 PM Michal Suchánek wrote: > > > > > > > > On Tue, Oct 17, 2023 at

Re: [PATCH] neighbor: tracing: Move pin6 inside CONFIG_IPV6=y section

2023-10-17 Thread David Ahern
On 10/16/23 6:49 AM, Geert Uytterhoeven wrote: > When CONFIG_IPV6=n, and building with W=1: > > In file included from include/trace/define_trace.h:102, >from include/trace/events/neigh.h:255, >from net/core/net-traces.c:51: >

Re: [PATCH v6 2/3] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-10-17 Thread David Hildenbrand
On 17.10.23 07:44, Vishal Verma wrote: The MHP_MEMMAP_ON_MEMORY flag for hotplugged memory is restricted to 'memblock_size' chunks of memory being added. Adding a larger span of memory precludes memmap_on_memory semantics. For users of hotplug such as kmem, large amounts of memory might get

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-17 Thread Masahiro Yamada
On Tue, Oct 17, 2023 at 9:27 PM Michal Suchánek wrote: > > On Tue, Oct 17, 2023 at 09:05:29PM +0900, Masahiro Yamada wrote: > > On Tue, Oct 17, 2023 at 7:44 PM Michal Suchánek wrote: > > > > > > On Tue, Oct 17, 2023 at 07:15:50PM +0900, Masahiro Yamada wrote: > > > > > > > > > > > > Let me add

Re: [PATCH v6 1/3] mm/memory_hotplug: replace an open-coded kmemdup() in add_memory_resource()

2023-10-17 Thread David Hildenbrand
On 17.10.23 07:44, Vishal Verma wrote: A review of the memmap_on_memory modifications to add_memory_resource() revealed an instance of an open-coded kmemdup(). Replace it with kmemdup(). Cc: Andrew Morton Cc: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Dan Williams

Re: [PATCH v2 5/6] ACPI: NFIT: Replace acpi_driver with platform_driver

2023-10-17 Thread Rafael J. Wysocki
On Fri, Oct 6, 2023 at 8:33 PM Michal Wilczynski wrote: > > 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

[PATCH v11 4/5] kprobes: freelist.h removed

2023-10-17 Thread wuqiang.matt
This patch will remove freelist.h from kernel source tree, since the only use cases (kretprobe and rethook) are converted to objpool. Signed-off-by: wuqiang.matt --- include/linux/freelist.h | 129 --- 1 file changed, 129 deletions(-) delete mode 100644

[PATCH v11 5/5] MAINTAINERS: objpool added

2023-10-17 Thread wuqiang.matt
objpool, a scalable and lockless ring-array based object pool, was introduced to replace the original freelist (a LIFO queue based on singly linked list) to improve kretprobe scalability. Signed-off-by: wuqiang.matt --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH v11 3/5] kprobes: kretprobe scalability improvement

2023-10-17 Thread wuqiang.matt
kretprobe is using freelist to manage return-instances, but freelist, as LIFO queue based on singly linked list, scales badly and reduces the overall throughput of kretprobed routines, especially for high contention scenarios. Here's a typical throughput test of sys_prctl (counts in 10 seconds,

[PATCH v11 2/5] lib: objpool test module added

2023-10-17 Thread wuqiang.matt
The test_objpool module (test_objpool) will run several testcases for objpool stress and performance evaluation. Each testcase will have all available cpu cores involved to create a situation of high parallel and high contention. As of now there are 5 groups and 5 * 2 testcases in total: 1)

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

2023-10-17 Thread wuqiang.matt
objpool is a scalable implementation of high performance queue for object allocation and reclamation, such as kretprobe instances. With leveraging percpu ring-array to mitigate hot spots of memory contention, it delivers near-linear scalability for high parallel scenarios. The objpool is best

[PATCH v11 0/5] lib,kprobes: kretprobe scalability improvement

2023-10-17 Thread wuqiang.matt
This patch series introduces a scalable and lockless ring-array based object pool to improve scalability of kretprobed routines. v11: *) patchset rebased to branch probes/core of linux-trace.git *) objpool: objpool_fini optimized for better code readability *) test_objpool: asynchronous

Re: [PATCH v3 4/6] ACPI: AC: Rename ACPI device from device to adev

2023-10-17 Thread Rafael J. Wysocki
On Wed, Oct 11, 2023 at 10:34 AM Michal Wilczynski wrote: > > 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

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-17 Thread Haitao Huang
On Mon, 16 Oct 2023 20:34:57 -0500, Huang, Kai wrote: On Mon, 2023-10-16 at 19:10 -0500, Haitao Huang wrote: On Mon, 16 Oct 2023 16:09:52 -0500, Huang, Kai wrote: [...] > still need to fix the bug mentioned above here. > > I really think you should just go this simple way: > > When you

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-17 Thread Michal Suchánek
On Tue, Oct 17, 2023 at 09:05:29PM +0900, Masahiro Yamada wrote: > On Tue, Oct 17, 2023 at 7:44 PM Michal Suchánek wrote: > > > > On Tue, Oct 17, 2023 at 07:15:50PM +0900, Masahiro Yamada wrote: > > > > > > > > > > Let me add more context to my question. > > > > > > > > > > > > > > > I am

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-17 Thread Masahiro Yamada
On Tue, Oct 17, 2023 at 7:44 PM Michal Suchánek wrote: > > On Tue, Oct 17, 2023 at 07:15:50PM +0900, Masahiro Yamada wrote: > > > > > > > > Let me add more context to my question. > > > > > > > > > > > > I am interested in the timing when > > > > 'pkg-config --print-variables kmod | grep

Re: [PATCH v2 2/2] kbuild: unify no-compiler-targets and no-sync-config-targets

2023-10-17 Thread Nicolas Schier
On Sat, Oct 14, 2023 at 07:54:36PM +0900, Masahiro Yamada wrote: > Now that vdso_install does not depend on any in-tree build artifact, > it no longer needs a compiler, making no-compiler-targets the same > as no-sync-config-targets. > > Signed-off-by: Masahiro Yamada > --- > > Changes in v2: >

Re: [PATCH v5 12/18] x86/sgx: Add EPC OOM path to forcefully reclaim EPC

2023-10-17 Thread Mikko Ylinen
On Mon, Oct 16, 2023 at 02:32:31PM -0700, Sean Christopherson wrote: > Genuinely curious, who is asking for EPC cgroup support that *isn't* running > VMs? People who work with containers: [1], [2]. > AFAIK, these days, SGX is primarily targeted at cloud. I assume virtual EPC > is > the

Re: [PATCH v2 5/6] ACPI: NFIT: Replace acpi_driver with platform_driver

2023-10-17 Thread Rafael J. Wysocki
On Tue, Oct 17, 2023 at 12:45 PM Wilczynski, Michal wrote: > > > On 10/6/2023 7:30 PM, Michal Wilczynski wrote: > > 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

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-17 Thread Michal Suchánek
On Tue, Oct 17, 2023 at 07:15:50PM +0900, Masahiro Yamada wrote: > > > > > > Let me add more context to my question. > > > > > > > > > I am interested in the timing when > > > 'pkg-config --print-variables kmod | grep module_directory' > > > is executed. > > > > > > > > > > > > 1. Build a SRPM on

Re: [PATCH RFC 06/37] mm: page_alloc: Allocate from movable pcp lists only if ALLOC_FROM_METADATA

2023-10-17 Thread Catalin Marinas
On Mon, Oct 16, 2023 at 01:41:15PM +0100, Alexandru Elisei wrote: > On Thu, Oct 12, 2023 at 10:25:11AM +0900, Hyesoo Yu wrote: > > I don't think it would be effcient when the majority of movable pages > > do not use GFP_TAGGED. > > > > Metadata pages have a low probability of being in the pcp

Re: [PATCH 2/3] usb: typec: fsa4480: Add support to swap SBU orientation

2023-10-17 Thread Luca Weiss
On Tue Oct 17, 2023 at 11:01 AM CEST, Heikki Krogerus wrote: > Hi Luca, > > On Fri, Oct 13, 2023 at 01:38:06PM +0200, Luca Weiss wrote: > > On some hardware designs the AUX+/- lanes are connected reversed to > > SBU1/2 compared to the expected design by FSA4480. > > > > Made more complicated, the

Re: [PATCH rebased] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-10-17 Thread Masahiro Yamada
> > > > Let me add more context to my question. > > > > > > I am interested in the timing when > > 'pkg-config --print-variables kmod | grep module_directory' > > is executed. > > > > > > > > 1. Build a SRPM on machine A > > > > 2. Copy the SRPM from machine A to machine B > > > > 3. Run

Re: [PATCH] neighbor: tracing: Move pin6 inside CONFIG_IPV6=y section

2023-10-17 Thread Simon Horman
On Mon, Oct 16, 2023 at 02:49:04PM +0200, Geert Uytterhoeven wrote: > When CONFIG_IPV6=n, and building with W=1: > > In file included from include/trace/define_trace.h:102, >from include/trace/events/neigh.h:255, >from net/core/net-traces.c:51: >

Re: [PATCH v2] bus: mhi: host: Add tracing support

2023-10-17 Thread Krishna Chaitanya Chundru
On 10/16/2023 8:43 PM, Steven Rostedt wrote: On Fri, 13 Oct 2023 15:22:19 +0530 Krishna chaitanya chundru wrote: +++ b/include/trace/events/mhi_host.h @@ -0,0 +1,287 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights

Re: [PATCH 2/3] usb: typec: fsa4480: Add support to swap SBU orientation

2023-10-17 Thread Heikki Krogerus
Hi Luca, On Fri, Oct 13, 2023 at 01:38:06PM +0200, Luca Weiss wrote: > On some hardware designs the AUX+/- lanes are connected reversed to > SBU1/2 compared to the expected design by FSA4480. > > Made more complicated, the otherwise compatible Orient-Chip OCP96011 > expects the lanes to be

Re: [PATCH v2 5/6] ACPI: NFIT: Replace acpi_driver with platform_driver

2023-10-17 Thread Wilczynski, Michal
On 10/6/2023 7:30 PM, Michal Wilczynski wrote: > 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

Re: [PATCH 2/2] usb: typec: add support for PTN36502 redriver

2023-10-17 Thread Heikki Krogerus
Hi, On Fri, Oct 13, 2023 at 04:24:48PM +0200, Luca Weiss wrote: > Add a driver for the NXP PTN36502 Type-C USB 3.1 Gen 1 and DisplayPort > v1.2 combo redriver. > > Signed-off-by: Luca Weiss Looks OK to me, but couple of nitpicks below. With those fixed: Reviewed-by: Heikki Krogerus > --- >

[PATCH v3] ACPI: NFIT: Use cleanup.h helpers instead of devm_*()

2023-10-17 Thread Michal Wilczynski
The new cleanup.h facilities that arrived in v6.5-rc1 can replace the the usage of devm semantics in acpi_nfit_init_interleave_set(). That routine appears to only be using devm to avoid goto statements. The new __free() annotation at variable declaration time can achieve the same effect more

Re: [PATCH v2] bus: mhi: host: Add tracing support

2023-10-17 Thread kernel test robot
Hi Krishna, kernel test robot noticed the following build warnings: [auto build test WARNING on 3006adf3be79cde4d14b1800b963b82b6e5572e0] url: https://github.com/intel-lab-lkp/linux/commits/Krishna-chaitanya-chundru/bus-mhi-host-Add-tracing-support/20231017-120241 base

[PATCH v2] soc: qcom: pmic_glink_altmode: Print return value on error

2023-10-17 Thread Luca Weiss
It can be useful to know with which return value for example the typec_retimer_set call failed, so include this info in the dev_err prints. Signed-off-by: Luca Weiss --- Changes in v2: - Add ret to print in more prints, not just typec_retimer_set (Bjorn) - Link to v1:

Re: [PATCH v6 2/3] mm/memory_hotplug: split memmap_on_memory requests across memblocks

2023-10-17 Thread Huang, Ying
Vishal Verma writes: > The MHP_MEMMAP_ON_MEMORY flag for hotplugged memory is restricted to > 'memblock_size' chunks of memory being added. Adding a larger span of > memory precludes memmap_on_memory semantics. > > For users of hotplug such as kmem, large amounts of memory might get > added from