Re: [PATCH] nvdimm-btt: fix a potential memleak in btt_freelist_init

2023-12-08 Thread Ira Weiny
dinghao.liu@ wrote: > > Dave Jiang wrote: [snip] > > That said, this patch does not completely fix freelist from leaking in the > > following error path. > > > > discover_arenas() > > btt_freelist_init() -> ok (memory allocated) > > btt_rtt_init() -> fail > >

Re: [PATCH 2/6] module: add CONFIG_BUILTIN_RANGES option

2023-12-08 Thread Google
On Fri, 8 Dec 2023 00:07:48 -0500 Kris Van Hees wrote: > The CONFIG_BUILTIN_RANGES option controls whether offset range data is > generated for kernel modules that are built into the kernel image. > > Signed-off-by: Kris Van Hees > Reviewed-by: Nick Alcock > Reviewed-by: Alan Maguire > ---

Re: [PATCH v3 5/5] input/touchscreen: imagis: add support for IST3032C

2023-12-08 Thread Karel Balej
Markuss, thank you for the review. > > diff --git a/drivers/input/touchscreen/imagis.c > > b/drivers/input/touchscreen/imagis.c > > index 84a02672ac47..41f28e6e9cb1 100644 > > --- a/drivers/input/touchscreen/imagis.c > > +++ b/drivers/input/touchscreen/imagis.c > > @@ -35,6 +35,8 @@ > >

Re: [PATCH v2 2/2] dax: add a sysfs knob to control memmap_on_memory behavior

2023-12-08 Thread Verma, Vishal L
On Fri, 2023-12-08 at 12:36 +0100, David Hildenbrand wrote: > On 07.12.23 05:36, Vishal Verma wrote: [..] > > > > + > > +What:  /sys/bus/dax/devices/daxX.Y/memmap_on_memory > > +Date:  October, 2023 > > +KernelVersion: v6.8 > > +Contact:   nvd...@lists.linux.dev > >

Re: [PATCH v2 2/2] dax: add a sysfs knob to control memmap_on_memory behavior

2023-12-08 Thread Verma, Vishal L
On Fri, 2023-12-08 at 11:13 +0800, Huang, Ying wrote: > Vishal Verma writes: > [..] > > > > + > > +static ssize_t memmap_on_memory_store(struct device *dev, > > + struct device_attribute *attr, > > + const char *buf, size_t

Re: [PATCH v2 2/2] dax: add a sysfs knob to control memmap_on_memory behavior

2023-12-08 Thread Verma, Vishal L
On Fri, 2023-12-08 at 09:20 +, Zhijian Li (Fujitsu) wrote: > > > On 08/12/2023 03:25, Verma, Vishal L wrote: > > On Thu, 2023-12-07 at 08:29 +, Zhijian Li (Fujitsu) wrote: > > > Hi Vishal, > > > > > > > > > On 07/12/2023 12:36, Vishal Verma wrote: > > > > + > > > > +What:  

trace_event names with more than NAME_MAX chars

2023-12-08 Thread Beau Belgrave
While developing some unrelated features I happened to create a trace_event that was more than NAME_MAX (255) characters. When this happened the creation worked, but tracefs would hang any task that tried to list the directory of the trace_event or remove it. I followed the code down to the

Re: EEVDF/vhost regression (bisected to 86bfbb7ce4f6 sched/fair: Add lag based placement)

2023-12-08 Thread Mike Christie
On 12/8/23 3:24 AM, Tobias Huschle wrote: > On Thu, Dec 07, 2023 at 01:48:40AM -0500, Michael S. Tsirkin wrote: >> On Thu, Dec 07, 2023 at 07:22:12AM +0100, Tobias Huschle wrote: >>> 3. vhost looping endlessly, waiting for kworker to be scheduled >>> >>> I dug a little deeper on what the vhost is

Re: [PATCH v2 23/33] s390/boot: Add the KMSAN runtime stub

2023-12-08 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich wrote: > > It should be possible to have inline functions in the s390 header > files, which call kmsan_unpoison_memory(). The problem is that these > header files might be included by the decompressor, which does not > contain KMSAN runtime,

Re: [PATCH v2 09/33] kmsan: Introduce kmsan_memmove_metadata()

2023-12-08 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:07 PM Ilya Leoshkevich wrote: > > It is useful to manually copy metadata in order to describe the effects > of memmove()-like logic in uninstrumented code or inline asm. Introduce > kmsan_memmove_metadata() for this purpose. > > Signed-off-by: Ilya Leoshkevich > --- >

Re: [PATCH v2 18/33] lib/string: Add KMSAN support to strlcpy() and strlcat()

2023-12-08 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich wrote: > > Currently KMSAN does not fully propagate metadata in strlcpy() and > strlcat(), because they are built with -ffreestanding and call > memcpy(). In this combination memcpy() calls are not instrumented. Is this something specific to

Re: [PATCH v2 04/33] kmsan: Increase the maximum store size to 4096

2023-12-08 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:07 PM Ilya Leoshkevich wrote: > > The inline assembly block in s390's chsc() stores that much. > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v7 3/4] remoteproc: zynqmp: add pm domains support

2023-12-08 Thread Tanmay Shah
On 12/8/23 9:51 AM, Mathieu Poirier wrote: > On Wed, Dec 06, 2023 at 12:06:45PM -0600, Tanmay Shah wrote: > > > > On 12/6/23 9:43 AM, Mathieu Poirier wrote: > > > On Fri, 1 Dec 2023 at 11:10, Tanmay Shah wrote: > > > > > > > > > > > > On 11/29/23 11:10 AM, Mathieu Poirier wrote: > > > > > On

Re: [PATCH v7 3/4] remoteproc: zynqmp: add pm domains support

2023-12-08 Thread Mathieu Poirier
On Wed, Dec 06, 2023 at 12:06:45PM -0600, Tanmay Shah wrote: > > On 12/6/23 9:43 AM, Mathieu Poirier wrote: > > On Fri, 1 Dec 2023 at 11:10, Tanmay Shah wrote: > > > > > > > > > On 11/29/23 11:10 AM, Mathieu Poirier wrote: > > > > On Mon, Nov 27, 2023 at 10:33:05AM -0600, Tanmay Shah wrote: > >

Re: [PATCH v2 13/33] kmsan: Introduce memset_no_sanitize_memory()

2023-12-08 Thread Alexander Potapenko
> A problem with __memset() is that, at least for me, it always ends > up being a call. There is a use case where we need to write only 1 > byte, so I thought that introducing a call there (when compiling > without KMSAN) would be unacceptable. Wonder what happens with that use case if we e.g.

Re: [PATCH v5 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-12-08 Thread Juergen Gross
On 08.12.23 13:57, Borislav Petkov wrote: On Fri, Dec 08, 2023 at 12:53:47PM +0100, Juergen Gross wrote: Took me a while to find it. Patch 5 was repairing the issue again Can't have that. Any patch in any set must build and boot successfully for bisection reasons. Of course. The problem

[PATCH v3 11/11] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable WiFi

2023-12-08 Thread Luca Weiss
Now that the WPSS remoteproc is enabled, enable wifi so we can use it. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss --- Depends on (just to resolve merge conflicts, could also rebase without that):

[PATCH v3 10/11] arm64: dts: qcom: qcm6490-fairphone-fp5: Enable various remoteprocs

2023-12-08 Thread Luca Weiss
Enable the ADSP, CDSP, MPSS and WPSS that are found on the SoC. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 20 1 file changed, 20 insertions(+) diff --git

[PATCH v3 08/11] arm64: dts: qcom: sc7280: Add ADSP node

2023-12-08 Thread Luca Weiss
Add the node for the ADSP found on the SC7280 SoC, using standard Qualcomm firmware. Acked-by: Konrad Dybcio Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 5 -- arch/arm64/boot/dts/qcom/sc7280-chrome-common.dtsi | 5 --

[PATCH v3 09/11] arm64: dts: qcom: sc7280: Add CDSP node

2023-12-08 Thread Luca Weiss
Add the node for the ADSP found on the SC7280 SoC, using standard Qualcomm firmware. Remove the reserved-memory node from sc7280-chrome-common since CDSP is currently not used there. Acked-by: Konrad Dybcio Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 5

[PATCH v3 07/11] arm64: dts: qcom: sc7280: Use WPSS PAS instead of PIL

2023-12-08 Thread Luca Weiss
The wpss-pil driver wants to manage too many resources that cannot be touched with standard Qualcomm firmware. Use the compatible from the PAS driver and move the ChromeOS-specific bits to sc7280-chrome-common.dtsi. Signed-off-by: Luca Weiss ---

[PATCH v3 03/11] arm64: dts: qcom: sc7280: Rename reserved-memory nodes

2023-12-08 Thread Luca Weiss
It was clarified a while ago that reserved-memory nodes shouldn't be called memory@ but should have a descriptive name. Update sc7280.dtsi to follow that. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/sc7280.dtsi | 26 +- 1 file

[PATCH v3 06/11] remoteproc: qcom_q6v5_pas: Add SC7280 ADSP, CDSP & WPSS

2023-12-08 Thread Luca Weiss
Add support for the ADSP, CDSP and WPSS remoteprocs found on the SC7280 SoC using the q6v5-pas driver. This driver can be used on regular LA ("Linux Android") based releases, however the SC7280 ChromeOS devices need different driver support due to firmware differences. Reviewed-by: Konrad Dybcio

[PATCH v3 05/11] dt-bindings: remoteproc: qcom: sc7180-pas: Add SC7280 compatibles

2023-12-08 Thread Luca Weiss
Add the compatibles and constraints for the ADSP, CDSP and WPSS found on the SC7280 SoC. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss --- .../bindings/remoteproc/qcom,sc7180-pas.yaml| 21 + 1 file changed, 21 insertions(+) diff --git

[PATCH v3 04/11] arm64: dts: qcom: sc7280*: move MPSS and WPSS memory to dtsi

2023-12-08 Thread Luca Weiss
It appears that all SC7280-based devices so far have mpss_mem and wpss_mem on the same reg with the same size. Also these memory regions are referenced already in sc7280.dtsi so that's where they should also be defined. Signed-off-by: Luca Weiss ---

[PATCH v3 02/11] arm64: dts: qcom: sc7280: Remove unused second MPSS reg

2023-12-08 Thread Luca Weiss
The bindings for sc7280-mpss-pas neither expects a second reg nor a reg-names property, which is only required by the sc7280-mss-pil bindings. Move it to sc7280-herobrine-lte-sku.dtsi, the only place where that other compatible is used. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss

[PATCH v3 01/11] dt-bindings: remoteproc: qcom: sc7180-pas: Fix SC7280 MPSS PD-names

2023-12-08 Thread Luca Weiss
The power domains for MPSS on SC7280 are actually named CX and MSS, and not CX and MX. Adjust the name which also aligns the bindings with the dts and fixes validation. Fixes: 8bb92d6fd0b3 ("dt-bindings: remoteproc: qcom,sc7180-pas: split into separate file") Acked-by: Krzysztof Kozlowski

[PATCH v3 00/11] Remoteprocs (ADSP, CDSP, WPSS) for SC7280

2023-12-08 Thread Luca Weiss
This series adds support for the ADSP, CDSP and WPSS remoteprocs found on SC7280. And finally enable them and WiFi on the QCM6490-based Fairphone 5 smartphone. The first two patches are fixes for the MPSS to fix some dt validation issues. They're included in this series to avoid conflicts with

[PATCH v4 3/3] remoteproc: qcom: pas: Add SM8650 remoteproc support

2023-12-08 Thread Neil Armstrong
Add DSP Peripheral Authentication Service support for the SM8650 platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong --- drivers/remoteproc/qcom_q6v5_pas.c | 50 ++ 1 file changed, 50 insertions(+) diff --git

[PATCH v4 2/3] remoteproc: qcom: pas: make region assign more generic

2023-12-08 Thread Neil Armstrong
The current memory region assign only supports a single memory region. But new platforms introduces more regions to make the memory requirements more flexible for various use cases. Those new platforms also shares the memory region between the DSP and HLOS. To handle this, make the region assign

[PATCH v4 1/3] dt-bindings: remoteproc: qcom,sm8550-pas: document the SM8650 PAS

2023-12-08 Thread Neil Armstrong
Document the DSP Peripheral Authentication Service on the SM8650 Platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong --- .../bindings/remoteproc/qcom,sm8550-pas.yaml | 44 +- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git

[PATCH v4 0/3] remoteproc: qcom: Introduce DSP support for SM8650

2023-12-08 Thread Neil Armstrong
Add the bindings and driver changes for DSP support on the SM8650 platform in order to enable the aDSP, cDSP and MPSS subsystems to boot. Compared to SM8550, where SM8650 uses the same dual firmware files, (dtb file and main firmware) the memory zones requirement has changed: - cDSP: now requires

Re: [PATCH v2 01/33] ftrace: Unpoison ftrace_regs in ftrace_ops_list_func()

2023-12-08 Thread Steven Rostedt
On Fri, 8 Dec 2023 15:16:10 +0100 Alexander Potapenko wrote: > On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich wrote: > > > > Architectures use assembly code to initialize ftrace_regs and call > > ftrace_ops_list_func(). Therefore, from the KMSAN's point of view, > > ftrace_regs is poisoned

Re: [PATCH v2 19/33] lib/zlib: Unpoison DFLTCC output buffers

2023-12-08 Thread Alexander Potapenko
On Fri, Dec 8, 2023 at 3:14 PM Ilya Leoshkevich wrote: > > On Fri, 2023-12-08 at 14:32 +0100, Alexander Potapenko wrote: > > On Tue, Nov 21, 2023 at 11:07 PM Ilya Leoshkevich > > wrote: > > > > > > The constraints of the DFLTCC inline assembly are not precise: they > > > do not communicate the

Re: [PATCH v2 26/33] s390/ftrace: Unpoison ftrace_regs in kprobe_ftrace_handler()

2023-12-08 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich wrote: > > s390 uses assembly code to initialize ftrace_regs and call > kprobe_ftrace_handler(). Therefore, from the KMSAN's point of view, > ftrace_regs is poisoned on kprobe_ftrace_handler() entry. This causes > KMSAN warnings when running the

Re: [PATCH v2 01/33] ftrace: Unpoison ftrace_regs in ftrace_ops_list_func()

2023-12-08 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich wrote: > > Architectures use assembly code to initialize ftrace_regs and call > ftrace_ops_list_func(). Therefore, from the KMSAN's point of view, > ftrace_regs is poisoned on ftrace_ops_list_func entry(). This causes > KMSAN warnings when running

Re: [PATCH v2 19/33] lib/zlib: Unpoison DFLTCC output buffers

2023-12-08 Thread Ilya Leoshkevich
On Fri, 2023-12-08 at 14:32 +0100, Alexander Potapenko wrote: > On Tue, Nov 21, 2023 at 11:07 PM Ilya Leoshkevich > wrote: > > > > The constraints of the DFLTCC inline assembly are not precise: they > > do not communicate the size of the output buffers to the compiler, > > so > > it cannot

Re: [PATCH v2 13/33] kmsan: Introduce memset_no_sanitize_memory()

2023-12-08 Thread Ilya Leoshkevich
On Fri, 2023-12-08 at 14:48 +0100, Alexander Potapenko wrote: > On Tue, Nov 21, 2023 at 11:06 PM Ilya Leoshkevich > wrote: > > > > Add a wrapper for memset() that prevents unpoisoning. > > We have __memset() already, won't it work for this case? A problem with __memset() is that, at least for

Re: [PATCH v2 17/33] mm: kfence: Disable KMSAN when checking the canary

2023-12-08 Thread Alexander Potapenko
On Fri, Dec 8, 2023 at 1:53 PM Alexander Potapenko wrote: > > On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich wrote: > > > > KMSAN warns about check_canary() accessing the canary. > > > > The reason is that, even though set_canary() is properly instrumented > > and sets shadow, slub explicitly

Re: [PATCH v2 14/33] kmsan: Support SLAB_POISON

2023-12-08 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich wrote: > > Avoid false KMSAN negatives with SLUB_DEBUG by allowing > kmsan_slab_free() to poison the freed memory, and by preventing > init_object() from unpoisoning new allocations. The usage of > memset_no_sanitize_memory() does not degrade the

Re: [PATCH v2 13/33] kmsan: Introduce memset_no_sanitize_memory()

2023-12-08 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:06 PM Ilya Leoshkevich wrote: > > Add a wrapper for memset() that prevents unpoisoning. We have __memset() already, won't it work for this case? On the other hand, I am not sure you want to preserve the redzone in its previous state (unless it's known to be poisoned).

Re: [PATCH v2 24/33] s390/checksum: Add a KMSAN check

2023-12-08 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich wrote: > > Add a KMSAN check to the CKSM inline assembly, similar to how it was > done for ASAN in commit e42ac7789df6 ("s390/checksum: always use cksm > instruction"). > > Acked-by: Alexander Gordeev > Signed-off-by: Ilya Leoshkevich

Re: [PATCH v2 19/33] lib/zlib: Unpoison DFLTCC output buffers

2023-12-08 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:07 PM Ilya Leoshkevich wrote: > > The constraints of the DFLTCC inline assembly are not precise: they > do not communicate the size of the output buffers to the compiler, so > it cannot automatically instrument it. KMSAN usually does a poor job instrumenting inline

Re: [PATCH v4 4/4] vduse: Add LSM hooks to check Virtio device type

2023-12-08 Thread Maxime Coquelin
On 12/8/23 13:26, Michael S. Tsirkin wrote: On Fri, Dec 08, 2023 at 01:23:00PM +0100, Maxime Coquelin wrote: On 12/8/23 12:05, Michael S. Tsirkin wrote: On Fri, Dec 08, 2023 at 12:01:15PM +0100, Maxime Coquelin wrote: Hello Paul, On 11/8/23 03:31, Paul Moore wrote: On Oct 20, 2023

Re: [PATCH v5 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-12-08 Thread Borislav Petkov
On Fri, Dec 08, 2023 at 12:53:47PM +0100, Juergen Gross wrote: > Took me a while to find it. Patch 5 was repairing the issue again Can't have that. Any patch in any set must build and boot successfully for bisection reasons. -- Regards/Gruss, Boris.

Re: [PATCH v2 17/33] mm: kfence: Disable KMSAN when checking the canary

2023-12-08 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich wrote: > > KMSAN warns about check_canary() accessing the canary. > > The reason is that, even though set_canary() is properly instrumented > and sets shadow, slub explicitly poisons the canary's address range > afterwards. > > Unpoisoning the

Re: [PATCH v4 4/4] vduse: Add LSM hooks to check Virtio device type

2023-12-08 Thread Michael S. Tsirkin
On Fri, Dec 08, 2023 at 01:23:00PM +0100, Maxime Coquelin wrote: > > > On 12/8/23 12:05, Michael S. Tsirkin wrote: > > On Fri, Dec 08, 2023 at 12:01:15PM +0100, Maxime Coquelin wrote: > > > Hello Paul, > > > > > > On 11/8/23 03:31, Paul Moore wrote: > > > > On Oct 20, 2023 "Michael S. Tsirkin"

Re: [PATCH v4 4/4] vduse: Add LSM hooks to check Virtio device type

2023-12-08 Thread Maxime Coquelin
On 12/8/23 12:05, Michael S. Tsirkin wrote: On Fri, Dec 08, 2023 at 12:01:15PM +0100, Maxime Coquelin wrote: Hello Paul, On 11/8/23 03:31, Paul Moore wrote: On Oct 20, 2023 "Michael S. Tsirkin" wrote: This patch introduces LSM hooks for devices creation, destruction and opening

Re: [PATCH v5 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-12-08 Thread Juergen Gross
On 06.12.23 12:08, Borislav Petkov wrote: On Wed, Nov 29, 2023 at 02:33:31PM +0100, Juergen Gross wrote: Instead of stacking alternative and paravirt patching, use the new ALT_FLAG_CALL flag to switch those mixed calls to pure alternative handling. This eliminates the need to be careful

Re: Re: Re: EEVDF/vhost regression (bisected to 86bfbb7ce4f6 sched/fair: Add lag based placement)

2023-12-08 Thread Tobias Huschle
On Fri, Dec 08, 2023 at 05:31:18AM -0500, Michael S. Tsirkin wrote: > On Fri, Dec 08, 2023 at 10:24:16AM +0100, Tobias Huschle wrote: > > On Thu, Dec 07, 2023 at 01:48:40AM -0500, Michael S. Tsirkin wrote: > > > On Thu, Dec 07, 2023 at 07:22:12AM +0100, Tobias Huschle wrote: > > > > 3. vhost

Re: [PATCH v2 2/2] dax: add a sysfs knob to control memmap_on_memory behavior

2023-12-08 Thread David Hildenbrand
On 07.12.23 05:36, Vishal Verma wrote: Add a sysfs knob for dax devices to control the memmap_on_memory setting if the dax device were to be hotplugged as system memory. The default memmap_on_memory setting for dax devices originating via pmem or hmem is set to 'false' - i.e. no

Re: [PATCH] vdpa: Fix an error handling path in eni_vdpa_probe()

2023-12-08 Thread Michael S. Tsirkin
On Thu, Dec 07, 2023 at 10:13:51PM +0100, Christophe JAILLET wrote: > Le 20/10/2022 à 21:21, Christophe JAILLET a écrit : > > After a successful vp_legacy_probe() call, vp_legacy_remove() should be > > called in the error handling path, as already done in the remove function. > > > > Add the

Re: [PATCH v3 3/5] remoteproc: k3-r5: Add support for IPC-only mode for all R5Fs

2023-12-08 Thread Hari Nagalla
On 11/2/23 11:43, Jan Kiszka wrote: RTI1 watchdog also powers up R5F core 1. And this could happen either in When writing "... also powers up...", other than R5F core 1, what else is being powered? Would be a question for the SoC vendor - I assumed that only mcu_rti1 [1] goes on when enabling

Re: [PATCH v2] ring-buffer: Add offset of events in dump on mismatch

2023-12-08 Thread Google
On Thu, 7 Dec 2023 17:31:08 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > On bugs that have the ring buffer timestamp get out of sync, the config > CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS, that checks for it and if it is > detected it causes a dump of the bad sub buffer. >

Re: [PATCH v4 4/4] vduse: Add LSM hooks to check Virtio device type

2023-12-08 Thread Michael S. Tsirkin
On Fri, Dec 08, 2023 at 12:01:15PM +0100, Maxime Coquelin wrote: > Hello Paul, > > On 11/8/23 03:31, Paul Moore wrote: > > On Oct 20, 2023 "Michael S. Tsirkin" wrote: > > > > > > This patch introduces LSM hooks for devices creation, > > > destruction and opening operations, checking the > > >

Re: [PATCH v4 4/4] vduse: Add LSM hooks to check Virtio device type

2023-12-08 Thread Maxime Coquelin
Hello Paul, On 11/8/23 03:31, Paul Moore wrote: On Oct 20, 2023 "Michael S. Tsirkin" wrote: This patch introduces LSM hooks for devices creation, destruction and opening operations, checking the application is allowed to perform these operations for the Virtio device type. Signed-off-by:

Re: Re: Re: EEVDF/vhost regression (bisected to 86bfbb7ce4f6 sched/fair: Add lag based placement)

2023-12-08 Thread Michael S. Tsirkin
On Fri, Dec 08, 2023 at 10:24:16AM +0100, Tobias Huschle wrote: > On Thu, Dec 07, 2023 at 01:48:40AM -0500, Michael S. Tsirkin wrote: > > On Thu, Dec 07, 2023 at 07:22:12AM +0100, Tobias Huschle wrote: > > > 3. vhost looping endlessly, waiting for kworker to be scheduled > > > > > > I dug a

[PATCH v4 33/33] Documentation: probes: Update fprobe on function-graph tracer

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Update fprobe documentation for the new fprobe on function-graph tracer. This includes some bahvior changes and pt_regs to ftrace_regs interface change. Signed-off-by: Masami Hiramatsu (Google) --- Changes in v2: - Update @fregs parameter explanation. ---

[PATCH v4 32/33] selftests: ftrace: Remove obsolate maxactive syntax check

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Since the fprobe event does not support maxactive anymore, stop testing the maxactive syntax error checking. Signed-off-by: Masami Hiramatsu (Google) --- .../ftrace/test.d/dynevent/fprobe_syntax_errors.tc |4 +--- 1 file changed, 1 insertion(+), 3

[PATCH v4 31/33] bpf: Enable kprobe_multi feature if CONFIG_FPROBE is enabled

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Enable kprobe_multi feature if CONFIG_FPROBE is enabled. The pt_regs is converted from ftrace_regs by ftrace_partial_regs(), thus some registers may always returns 0. But it should be enough for function entry (access arguments) and exit (access return value).

[PATCH v4 30/33] tracing/fprobe: Enable fprobe events with CONFIG_DYNAMIC_FTRACE_WITH_ARGS

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Allow fprobe events to be enabled with CONFIG_DYNAMIC_FTRACE_WITH_ARGS. With this change, fprobe events mostly use ftrace_regs instead of pt_regs. Note that if the arch doesn't enable HAVE_PT_REGS_COMPAT_FTRACE_REGS, fprobe events will not be able to be used from

[PATCH v4 29/33] tracing/fprobe: Remove nr_maxactive from fprobe

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Remove depercated fprobe::nr_maxactive. This involves fprobe events to rejects the maxactive number. Signed-off-by: Masami Hiramatsu (Google) --- Changes in v2: - Newly added. --- include/linux/fprobe.h |2 -- kernel/trace/trace_fprobe.c | 44

[PATCH v4 28/33] fprobe: Rewrite fprobe on function-graph tracer

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Rewrite fprobe implementation on function-graph tracer. Major API changes are: - 'nr_maxactive' field is deprecated. - This depends on CONFIG_DYNAMIC_FTRACE_WITH_ARGS or !CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS, and CONFIG_HAVE_FUNCTION_GRAPH_FREGS. So

[PATCH v4 27/33] tracing: Add ftrace_fill_perf_regs() for perf event

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Add ftrace_fill_perf_regs() which should be compatible with the perf_fetch_caller_regs(). In other words, the pt_regs returned from the ftrace_fill_perf_regs() must satisfy 'user_mode(regs) == false' and can be used for stack tracing. Signed-off-by: Masami

[PATCH v4 26/33] tracing: Add ftrace_partial_regs() for converting ftrace_regs to pt_regs

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Add ftrace_partial_regs() which converts the ftrace_regs to pt_regs. If the architecture defines its own ftrace_regs, this copies partial registers to pt_regs and returns it. If not, ftrace_regs is the same as pt_regs and ftrace_partial_regs() will return

[PATCH v4 25/33] fprobe: Use ftrace_regs in fprobe exit handler

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Change the fprobe exit handler to use ftrace_regs structure instead of pt_regs. This also introduce HAVE_PT_REGS_TO_FTRACE_REGS_CAST which means the ftrace_regs's memory layout is equal to the pt_regs so that those are able to cast. Fprobe introduces a new

[PATCH v4 23/33] arm64: ftrace: Enable HAVE_FUNCTION_GRAPH_FREGS

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Enable CONFIG_HAVE_FUNCTION_GRAPH_FREGS on arm64. Note that this depends on HAVE_DYNAMIC_FTRACE_WITH_ARGS which is enabled if the compiler supports "-fpatchable-function-entry=2". If not, it continue to use ftrace_ret_regs. Signed-off-by: Masami Hiramatsu

[PATCH v4 24/33] fprobe: Use ftrace_regs in fprobe entry handler

2023-12-08 Thread Masami Hiramatsu (Google)
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 Hiramatsu (Google) Acked-by: Florent Revest --- Changes from previous series:

[PATCH v4 22/33] tracing: Rename ftrace_regs_return_value to ftrace_regs_get_return_value

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Rename ftrace_regs_return_value to ftrace_regs_get_return_value as same as other ftrace_regs_get/set_* APIs. Signed-off-by: Masami Hiramatsu (Google) --- Changes in v3: - Newly added. --- arch/loongarch/include/asm/ftrace.h |2 +-

[PATCH v4 21/33] x86/ftrace: Enable HAVE_FUNCTION_GRAPH_FREGS

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Support HAVE_FUNCTION_GRAPH_FREGS on x86-64, which saves ftrace_regs on the stack in ftrace_graph return trampoline so that the callbacks can access registers via ftrace_regs APIs. Note that this only recovers 'rax' and 'rdx' registers because other registers are

[PATCH v4 20/33] function_graph: Add a new exit handler with parent_ip and ftrace_regs

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Add a new return handler to fgraph_ops as 'retregfunc' which takes parent_ip and ftrace_regs instead of ftrace_graph_ret. This handler is available only if the arch support CONFIG_HAVE_FUNCTION_GRAPH_FREGS. Note that the 'retfunc' and 'reregfunc' are mutual

[PATCH v4 19/33] function_graph: Add a new entry handler with parent_ip and ftrace_regs

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Add a new entry handler to fgraph_ops as 'entryregfunc' which takes parent_ip and ftrace_regs. Note that the 'entryfunc' and 'entryregfunc' are mutual exclusive. You can set only one of them. Signed-off-by: Masami Hiramatsu (Google) --- Changes in v3: -

[PATCH v4 18/33] function_graph: Add selftest for passing local variables

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) Add boot up selftest that passes variables from a function entry to a function exit, and make sure that they do get passed around. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) --- Changes in v2: - Add reserved size test. -

[PATCH v4 17/33] function_graph: Implement fgraph_reserve_data() and fgraph_retrieve_data()

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) Added functions that can be called by a fgraph_ops entryfunc and retfunc to store state between the entry of the function being traced to the exit of the same function. The fgraph_ops entryfunc() may call fgraph_reserve_data() to store up to 32 words onto the task's

[PATCH v4 16/33] function_graph: Move graph notrace bit to shadow stack global var

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) The use of the task->trace_recursion for the logic used for the function graph no-trace was a bit of an abuse of that variable. Now that there exists global vars that are per stack for registered graph traces, use that instead. Signed-off-by: Steven Rostedt

[PATCH v4 15/33] function_graph: Move graph depth stored data to shadow stack global var

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) The use of the task->trace_recursion for the logic used for the function graph depth was a bit of an abuse of that variable. Now that there exists global vars that are per stack for registered graph traces, use that instead. Signed-off-by: Steven Rostedt (VMware)

[PATCH v4 14/33] function_graph: Move set_graph_function tests to shadow stack global var

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) The use of the task->trace_recursion for the logic used for the set_graph_funnction was a bit of an abuse of that variable. Now that there exists global vars that are per stack for registered graph traces, use that instead. Signed-off-by: Steven Rostedt (VMware)

[PATCH v4 13/33] function_graph: Add "task variables" per task for fgraph_ops

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) Add a "task variables" array on the tasks shadow ret_stack that is the size of longs for each possible registered fgraph_ops. That's a total of 16, taking up 8 * 16 = 128 bytes (out of a page size 4k). This will allow for fgraph_ops to do specific features on a per

[PATCH v4 12/33] function_graph: Use a simple LRU for fgraph_array index number

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Since the fgraph_array index is used for the bitmap on the shadow stack, it may leave some entries after a function_graph instance is removed. Thus if another instance reuses the fgraph_array index soon after releasing it, the fgraph may confuse to call the newer

[PATCH v4 11/33] function_graph: Have the instances use their own ftrace_ops for filtering

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) Allow for instances to have their own ftrace_ops part of the fgraph_ops that makes the funtion_graph tracer filter on the set_ftrace_filter file of the instance and not the top instance. This also change how the function_graph handles multiple instances on the

[PATCH v4 10/33] ftrace: Allow ftrace startup flags exist without dynamic ftrace

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) Some of the flags for ftrace_startup() may be exposed even when CONFIG_DYNAMIC_FTRACE is not configured in. This is fine as the difference between dynamic ftrace and static ftrace is done within the internals of ftrace itself. No need to have use cases fail to

[PATCH v4 09/33] ftrace: Allow function_graph tracer to be enabled in instances

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) Now that function graph tracing can handle more than one user, allow it to be enabled in the ftrace instances. Note, the filtering of the functions is still joined by the top level set_ftrace_filter and friends, as well as the graph and nograph files.

[PATCH v4 08/33] ftrace/function_graph: Pass fgraph_ops to function graph callbacks

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) Pass the fgraph_ops structure to the function graph callbacks. This will allow callbacks to add a descriptor to a fgraph_ops private field that wil be added in the future and use it for the callbacks. This will be useful when more than one callback can be registered

[PATCH v4 07/33] function_graph: Remove logic around ftrace_graph_entry and return

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) The function pointers ftrace_graph_entry and ftrace_graph_return are no longer called via the function_graph tracer. Instead, an array structure is now used that will allow for multiple users of the function_graph infrastructure. The variables are still used by the

[PATCH v4 06/33] function_graph: Allow multiple users to attach to function graph

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) Allow for multiple users to attach to function graph tracer at the same time. Only 16 simultaneous users can attach to the tracer. This is because there's an array that stores the pointers to the attached fgraph_ops. When a function being traced is entered, each of

[PATCH v4 05/33] function_graph: Add an array structure that will allow multiple callbacks

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) Add an array structure that will eventually allow the function graph tracer to have up to 16 simultaneous callbacks attached. It's an array of 16 fgraph_ops pointers, that is assigned when one is registered. On entry of a function the entry of the first item in the

[PATCH v4 04/33] fgraph: Use BUILD_BUG_ON() to make sure we have structures divisible by long

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) Instead of using "ALIGN()", use BUILD_BUG_ON() as the structures should always be divisible by sizeof(long). Link: http://lkml.kernel.org/r/2019052444.gi2...@hirez.programming.kicks-ass.net Suggested-by: Peter Zijlstra Signed-off-by: Steven Rostedt (VMware)

[PATCH v4 03/33] function_graph: Convert ret_stack to a series of longs

2023-12-08 Thread Masami Hiramatsu (Google)
From: Steven Rostedt (VMware) In order to make it possible to have multiple callbacks registered with the function_graph tracer, the retstack needs to be converted from an array of ftrace_ret_stack structures to an array of longs. This will allow to store the list of callbacks on the stack for

[PATCH v4 02/33] x86: tracing: Add ftrace_regs definition in the header

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Add ftrace_regs definition for x86_64 in the ftrace header to clarify what register will be accessible from ftrace_regs. Signed-off-by: Masami Hiramatsu (Google) --- Changes in v3: - Add rip to be saved. Changes in v2: - Newly added. ---

[PATCH v4 01/33] tracing: Add a comment about ftrace_regs definition

2023-12-08 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) To clarify what will be expected on ftrace_regs, add a comment to the architecture independent definition of the ftrace_regs. Signed-off-by: Masami Hiramatsu (Google) --- Changes in v3: - Add instruction pointer Changes in v2: - newly added. ---

[PATCH v4 00/33] tracing: fprobe: function_graph: Multi-function graph and fprobe on fgraph

2023-12-08 Thread Masami Hiramatsu (Google)
Hi, Here is the 4th version of the series to re-implement the fprobe on function-graph tracer. The previous version is; https://lore.kernel.org/all/170109317214.343914.4784420430328654397.stgit@devnote2/ This version is rebased on "trace-v6.7-rc4" tag on linux-trace tree and fix some issues on

Re: Re: Re: EEVDF/vhost regression (bisected to 86bfbb7ce4f6 sched/fair: Add lag based placement)

2023-12-08 Thread Tobias Huschle
On Thu, Dec 07, 2023 at 01:48:40AM -0500, Michael S. Tsirkin wrote: > On Thu, Dec 07, 2023 at 07:22:12AM +0100, Tobias Huschle wrote: > > 3. vhost looping endlessly, waiting for kworker to be scheduled > > > > I dug a little deeper on what the vhost is doing. I'm not an expert on > > virtio

Re: [PATCH v2 2/2] dax: add a sysfs knob to control memmap_on_memory behavior

2023-12-08 Thread Zhijian Li (Fujitsu)
On 08/12/2023 03:25, Verma, Vishal L wrote: > On Thu, 2023-12-07 at 08:29 +, Zhijian Li (Fujitsu) wrote: >> Hi Vishal, >> >> >> On 07/12/2023 12:36, Vishal Verma wrote: >>> + >>> +What:  /sys/bus/dax/devices/daxX.Y/memmap_on_memory >>> +Date:  October, 2023 >>>

Re: [PATCH v10 3/3] dax/kmem: allow kmem to add memory with memmap_on_memory

2023-12-08 Thread Zhijian Li (Fujitsu)
On 07/11/2023 15:22, Vishal Verma wrote: > Large amounts of memory managed by the kmem driver may come in via CXL, > and it is often desirable to have the memmap for this memory on the new > memory itself. > > Enroll kmem-managed memory for memmap_on_memory semantics if the dax > region