Re: [PATCH 1/4] cpufreq: Add a cpufreq pressure feedback for the scheduler

2023-12-12 Thread Viresh Kumar
On 12-12-23, 15:27, Vincent Guittot wrote: > Provide to the scheduler a feedback about the temporary max available > capacity. Unlike arch_update_thermal_pressure, this doesn't need to be > filtered as the pressure will happen for dozens ms or more. > > Signed-off-by: Vincent Guittot > --- >

Re: [PATCH -next 2/2] mm: vmscan: add new event to trace shrink lru

2023-12-12 Thread Bixuan Cui
在 2023/12/13 11:03, Andrew Morton 写道: -TRACE_EVENT(mm_vmscan_lru_shrink_inactive, +TRACE_EVENT(mm_vmscan_lru_shrink_inactive_start, Current kernels have a call to trace_mm_vmscan_lru_shrink_inactive() in evict_folios(), so this renaming broke the build. Sorry, I did not enable

Re: [PATCH 1/1] hwspinlock: qcom: fix tcsr data for ipq6018

2023-12-12 Thread Vignesh Viswanathan
On 12/12/2023 7:55 PM, Chukun Pan wrote: > The tcsr_mutex hwlock register of the ipq6018 SoC is 0x2[1], which > should not use the max_register configuration of older SoCs. This will > cause smem to be unable to probe, further causing devices that use > smem-part to parse partitions to fail

Re: [PATCH v5 2/4] vduse: Temporarily disable control queue features

2023-12-12 Thread Jason Wang
On Tue, Dec 12, 2023 at 9:17 PM Maxime Coquelin wrote: > > Virtio-net driver control queue implementation is not safe > when used with VDUSE. If the VDUSE application does not > reply to control queue messages, it currently ends up > hanging the kernel thread sending this command. > > Some work

Re: [PATCH] nvdimm-btt: simplify code with the scope based resource management

2023-12-12 Thread dinghao . liu
> > On 12/10/23 03:27, Dinghao Liu wrote: > > Use the scope based resource management (defined in > > linux/cleanup.h) to automate resource lifetime > > control on struct btt_sb *super in discover_arenas(). > > > > Signed-off-by: Dinghao Liu > > --- > > drivers/nvdimm/btt.c | 12 >

[PATCH v2] tracing: Add size check when printing trace_marker output

2023-12-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" If for some reason the trace_marker write does not have a nul byte for the string, it will overflow the print: trace_seq_printf(s, ": %s", field->buf); The field->buf could be missing the nul byte. To prevent overflow, add the max size that the buf can be by

Re: [PATCH] tracing: Add size check when printing trace_marker output

2023-12-12 Thread Steven Rostedt
On Tue, 12 Dec 2023 08:44:44 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > If for some reason the trace_marker write does not have a nul byte for the > string, it will overflow the print: > > trace_seq_printf(s, ": %s", field->buf); > > The field->buf could be missing

Re: [PATCH -next 2/2] mm: vmscan: add new event to trace shrink lru

2023-12-12 Thread Andrew Morton
On Mon, 11 Dec 2023 19:26:40 -0800 Bixuan Cui wrote: > -TRACE_EVENT(mm_vmscan_lru_shrink_inactive, > +TRACE_EVENT(mm_vmscan_lru_shrink_inactive_start, Current kernels have a call to trace_mm_vmscan_lru_shrink_inactive() in evict_folios(), so this renaming broke the build.

[PATCH v2] tracing: Fix uaf issue when open the hist or hist_debug file

2023-12-12 Thread Zheng Yejian
KASAN report following issue. The root cause is when opening 'hist' file of an instance and accessing 'trace_event_file' in hist_show(), but 'trace_event_file' has been freed due to the instance being removed. 'hist_debug' file has the same problem. To fix it, call tracing_{open,release}_file_tr()

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

2023-12-12 Thread Ilya Leoshkevich
On Fri, 2023-12-08 at 16:25 +0100, Alexander Potapenko wrote: > > 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

Re: [PATCH v4 3/3] dax: add a sysfs knob to control memmap_on_memory behavior

2023-12-12 Thread Huang, Ying
Vishal Verma writes: > 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 memmap_on_memory

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

2023-12-12 Thread Ilya Leoshkevich
On Fri, 2023-12-08 at 17:50 +0100, Alexander Potapenko wrote: > 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

Re: [PATCH] ring-buffer: Do not update before stamp when switching sub-buffers

2023-12-12 Thread Google
On Mon, 11 Dec 2023 11:44:20 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The ring buffer timestamps are synchronized by two timestamp placeholders. > One is the "before_stamp" and the other is the "write_stamp" (sometimes > referred to as the "after stamp" but only in the

Re: [PATCH] tracing: Have trace_marker break up by lines by size of trace_seq

2023-12-12 Thread Steven Rostedt
On Wed, 13 Dec 2023 09:19:33 +0900 Masami Hiramatsu (Google) wrote: > On Tue, 12 Dec 2023 19:04:22 -0500 > Steven Rostedt wrote: > > > From: "Steven Rostedt (Google)" > > > > If a trace_marker write is bigger than what trace_seq can hold, then it > > will print "LINE TOO BIG" message and not

Re: [PATCH] tracing: Have trace_marker break up by lines by size of trace_seq

2023-12-12 Thread Google
On Tue, 12 Dec 2023 19:04:22 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > If a trace_marker write is bigger than what trace_seq can hold, then it > will print "LINE TOO BIG" message and not what was written. > > Instead, if check if the write is bigger than the trace_seq

Re: [PATCH v4] tracing: Allow for max buffer data size trace_marker writes

2023-12-12 Thread Google
On Tue, 12 Dec 2023 13:19:01 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Allow a trace write to be as big as the ring buffer tracing data will > allow. Currently, it only allows writes of 1KB in size, but there's no > reason that it cannot allow what the ring buffer can

[PATCH] tracing: Have trace_marker break up by lines by size of trace_seq

2023-12-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" If a trace_marker write is bigger than what trace_seq can hold, then it will print "LINE TOO BIG" message and not what was written. Instead, if check if the write is bigger than the trace_seq and break it up by that size. Ideally, we could make the trace_seq

Re: [PATCH v3] ring-buffer: Fix writing to the buffer with max_data_size

2023-12-12 Thread Google
On Tue, 12 Dec 2023 11:16:17 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The maximum ring buffer data size is the maximum size of data that can be > recorded on the ring buffer. Events must be smaller than the sub buffer > data size minus any meta data. This size is

Re: [PATCH vhost v2 4/8] vdpa/mlx5: Mark vq addrs for modification in hw vq

2023-12-12 Thread Si-Wei Liu
On 12/12/2023 11:21 AM, Eugenio Perez Martin wrote: On Tue, Dec 5, 2023 at 11:46 AM Dragos Tatulea wrote: Addresses get set by .set_vq_address. hw vq addresses will be updated on next modify_virtqueue. Signed-off-by: Dragos Tatulea Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez I'm

Re: [PATCH v5 4/4] vduse: Add LSM hook to check Virtio device type

2023-12-12 Thread Casey Schaufler
On 12/12/2023 9:59 AM, Michael S. Tsirkin wrote: > On Tue, Dec 12, 2023 at 08:33:39AM -0800, Casey Schaufler wrote: >> On 12/12/2023 5:17 AM, Maxime Coquelin wrote: >>> This patch introduces a LSM hook for devices creation, >>> destruction (ioctl()) and opening (open()) operations, >>> checking

Re: [PATCH] tracing: Add size check when printing trace_marker output

2023-12-12 Thread Google
On Tue, 12 Dec 2023 08:44:44 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > If for some reason the trace_marker write does not have a nul byte for the > string, it will overflow the print: > > trace_seq_printf(s, ": %s", field->buf); > > The field->buf could be missing

Re: [PATCH] kmod: Add FIPS 202 SHA-3 support

2023-12-12 Thread Dimitri John Ledkov
On Wed, 6 Dec 2023 at 15:26, Lucas De Marchi wrote: > > On Sun, Oct 22, 2023 at 07:09:28PM +0100, Dimitri John Ledkov wrote: > >Add support for parsing FIPS 202 SHA-3 signature hashes. Separately, > >it is not clear why explicit hashes are re-encoded here, instead of > >trying to generically show

Re: [PATCH vhost v2 4/8] vdpa/mlx5: Mark vq addrs for modification in hw vq

2023-12-12 Thread Dragos Tatulea
On Tue, 2023-12-12 at 20:21 +0100, Eugenio Perez Martin wrote: > On Tue, Dec 5, 2023 at 11:46 AM Dragos Tatulea wrote: > > > > Addresses get set by .set_vq_address. hw vq addresses will be updated on > > next modify_virtqueue. > > > > Signed-off-by: Dragos Tatulea > > Reviewed-by: Gal Pressman

Re: [PATCH v4 2/3] dax/bus: Introduce guard(device) for device_{lock,unlock} flows

2023-12-12 Thread Ira Weiny
Vishal Verma wrote: > Introduce a guard(device) macro to lock a 'struct device', and unlock it > automatically when going out of scope using Scope Based Resource > Management semantics. A lot of the sysfs attribute writes in > drivers/dax/bus.c benefit from a cleanup using these, so change these >

Re: [PATCH] ring-buffer: Fix a race in rb_time_cmpxchg() for 32 bit archs

2023-12-12 Thread Mathieu Desnoyers
On 2023-12-12 11:53, Steven Rostedt wrote: From: "Steven Rostedt (Google)" Mathieu Desnoyers pointed out an issue in the rb_time_cmpxchg() for 32 bit architectures. That is: static bool rb_time_cmpxchg(rb_time_t *t, u64 expect, u64 set) { unsigned long cnt, top, bottom, msb;

[PATCH] ring-buffer: Fix 32-bit rb_time_read() race with rb_time_cmpxchg()

2023-12-12 Thread Mathieu Desnoyers
The following race can cause rb_time_read() to observe a corrupted time stamp: rb_time_cmpxchg() [...] if (!rb_time_read_cmpxchg(>msb, msb, msb2)) return false; if (!rb_time_read_cmpxchg(>top, top, top2)) return false; __rb_time_read() [...]

Re: [PATCH vhost v2 6/8] vdpa/mlx5: Use vq suspend/resume during .set_map

2023-12-12 Thread Eugenio Perez Martin
On Tue, Dec 5, 2023 at 11:47 AM Dragos Tatulea wrote: > > Instead of tearing down and setting up vq resources, use vq > suspend/resume during .set_map to speed things up a bit. > > The vq mr is updated with the new mapping while the vqs are suspended. > > If the device doesn't support resumable

Re: [PATCH vhost v2 4/8] vdpa/mlx5: Mark vq addrs for modification in hw vq

2023-12-12 Thread Eugenio Perez Martin
On Tue, Dec 5, 2023 at 11:46 AM Dragos Tatulea wrote: > > Addresses get set by .set_vq_address. hw vq addresses will be updated on > next modify_virtqueue. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Gal Pressman > Acked-by: Eugenio Pérez I'm kind of ok with this patch and the next one

[PATCH v4 3/3] dax: add a sysfs knob to control memmap_on_memory behavior

2023-12-12 Thread Vishal Verma
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 memmap_on_memory semantics, to preserve legacy behavior.

[PATCH v4 2/3] dax/bus: Introduce guard(device) for device_{lock,unlock} flows

2023-12-12 Thread Vishal Verma
Introduce a guard(device) macro to lock a 'struct device', and unlock it automatically when going out of scope using Scope Based Resource Management semantics. A lot of the sysfs attribute writes in drivers/dax/bus.c benefit from a cleanup using these, so change these where applicable. Cc: Joao

[PATCH v4 1/3] Documentatiion/ABI: Add ABI documentation for sys-bus-dax

2023-12-12 Thread Vishal Verma
Add the missing sysfs ABI documentation for the device DAX subsystem. Various ABI attributes under this have been present since v5.1, and more have been added over time. In preparation for adding a new attribute, add this file with the historical details. Cc: Dan Williams Signed-off-by: Vishal

[PATCH v4 0/3] Add DAX ABI for memmap_on_memory

2023-12-12 Thread Vishal Verma
The DAX drivers were missing sysfs ABI documentation entirely. Add this missing documentation for the sysfs ABI for DAX regions and Dax devices in patch 1. Define guard(device) semantics for Scope Based Resource Management for device_lock, and convert device_{lock,unlock} flows in

Re: [PATCH RFC v2 11/27] arm64: mte: Reserve tag storage memory

2023-12-12 Thread Rob Herring
On Tue, Dec 12, 2023 at 10:38 AM Alexandru Elisei wrote: > > Hi Rob, > > Thank you so much for the feedback, I'm not very familiar with device tree, > and any comments are very useful. > > On Mon, Dec 11, 2023 at 11:29:40AM -0600, Rob Herring wrote: > > On Sun, Nov 19, 2023 at 10:59 AM Alexandru

Re: [PATCH vhost v2 8/8] vdpa/mlx5: Add mkey leak detection

2023-12-12 Thread Eugenio Perez Martin
On Tue, Dec 5, 2023 at 11:47 AM Dragos Tatulea wrote: > > Track allocated mrs in a list and show warning when leaks are detected > on device free or reset. > > Signed-off-by: Dragos Tatulea > Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/core/mlx5_vdpa.h | 2

Re: [PATCH vhost v2 7/8] vdpa/mlx5: Introduce reference counting to mrs

2023-12-12 Thread Eugenio Perez Martin
On Tue, Dec 5, 2023 at 11:47 AM Dragos Tatulea wrote: > > Deleting the old mr during mr update (.set_map) and then modifying the > vqs with the new mr is not a good flow for firmware. The firmware > expects that mkeys are deleted after there are no more vqs referencing > them. > > Introduce

[PATCH v4] tracing: Allow for max buffer data size trace_marker writes

2023-12-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Allow a trace write to be as big as the ring buffer tracing data will allow. Currently, it only allows writes of 1KB in size, but there's no reason that it cannot allow what the ring buffer can hold. Signed-off-by: Steven Rostedt (Google) --- Changes since v3:

Re: [PATCH v5 4/4] vduse: Add LSM hook to check Virtio device type

2023-12-12 Thread Michael S. Tsirkin
On Tue, Dec 12, 2023 at 08:33:39AM -0800, Casey Schaufler wrote: > On 12/12/2023 5:17 AM, Maxime Coquelin wrote: > > This patch introduces a LSM hook for devices creation, > > destruction (ioctl()) and opening (open()) operations, > > checking the application is allowed to perform these > >

Re: [PATCH net-next v8 0/4] send credit update during setting SO_RCVLOWAT

2023-12-12 Thread Arseniy Krasnov
On 12.12.2023 19:12, Michael S. Tsirkin wrote: > On Tue, Dec 12, 2023 at 06:59:03PM +0300, Arseniy Krasnov wrote: >> >> >> On 12.12.2023 18:54, Michael S. Tsirkin wrote: >>> On Tue, Dec 12, 2023 at 12:16:54AM +0300, Arseniy Krasnov wrote: Hello,

Re: [PATCH net-next v8 3/4] virtio/vsock: fix logic which reduces credit update messages

2023-12-12 Thread Arseniy Krasnov
On 12.12.2023 19:11, Michael S. Tsirkin wrote: > On Tue, Dec 12, 2023 at 06:50:39PM +0300, Arseniy Krasnov wrote: >> >> >> On 12.12.2023 18:54, Michael S. Tsirkin wrote: >>> On Tue, Dec 12, 2023 at 12:16:57AM +0300, Arseniy Krasnov wrote: Add one more condition for sending credit update

Re: [RFC PATCH] ring-buffer: Fix and comment ring buffer rb_time functions on 32-bit

2023-12-12 Thread Steven Rostedt
On Tue, 12 Dec 2023 11:49:20 -0500 Mathieu Desnoyers wrote: > >> So the old "bottom" value is returned, which is wrong. > > > > Ah, OK that makes more sense. Yeah, if I had the three words from the > > beginning, I would have tested to make sure they all match an not just the > > two :-p >

Re: [PATCH] iommu/qcom: restore IOMMU state if needed

2023-12-12 Thread Will Deacon
On Wed, 11 Oct 2023 19:57:26 +0200, Luca Weiss wrote: > From: Vladimir Lypak > > If the IOMMU has a power domain then some state will be lost in > qcom_iommu_suspend and TZ will reset device if we don't call > qcom_scm_restore_sec_cfg before accessing it again. > > > [...] Applied to will

[PATCH] ring-buffer: Fix a race in rb_time_cmpxchg() for 32 bit archs

2023-12-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Mathieu Desnoyers pointed out an issue in the rb_time_cmpxchg() for 32 bit architectures. That is: static bool rb_time_cmpxchg(rb_time_t *t, u64 expect, u64 set) { unsigned long cnt, top, bottom, msb; unsigned long cnt2, top2, bottom2, msb2;

Re: [RFC PATCH] ring-buffer: Fix and comment ring buffer rb_time functions on 32-bit

2023-12-12 Thread Mathieu Desnoyers
On 2023-12-11 23:38, Steven Rostedt wrote: On Mon, 11 Dec 2023 22:51:04 -0500 Mathieu Desnoyers wrote: [...] For this first issue, here is the race: rb_time_cmpxchg() [...] if (!rb_time_read_cmpxchg(>msb, msb, msb2)) return false; if

Re: [PATCH v3] tracing: Allow for max buffer data size trace_marker writes

2023-12-12 Thread Steven Rostedt
On Tue, 12 Dec 2023 11:03:32 -0500 Steven Rostedt wrote: > @@ -7300,9 +7301,25 @@ tracing_mark_write(struct file *filp, const char > __user *ubuf, > buffer = tr->array_buffer.buffer; > event = __trace_buffer_lock_reserve(buffer, TRACE_PRINT, size, >

Re: [PATCH RFC v2 11/27] arm64: mte: Reserve tag storage memory

2023-12-12 Thread Alexandru Elisei
Hi Rob, Thank you so much for the feedback, I'm not very familiar with device tree, and any comments are very useful. On Mon, Dec 11, 2023 at 11:29:40AM -0600, Rob Herring wrote: > On Sun, Nov 19, 2023 at 10:59 AM Alexandru Elisei > wrote: > > > > Allow the kernel to get the size and location

Re: [PATCH] tracing: Fix uaf issue when open the hist or hist_debug file

2023-12-12 Thread Steven Rostedt
On Tue, 12 Dec 2023 19:33:17 +0800 Zheng Yejian wrote: > diff --git a/kernel/trace/trace_events_hist.c > b/kernel/trace/trace_events_hist.c > index 1abc07fba1b9..00447ea7dabd 100644 > --- a/kernel/trace/trace_events_hist.c > +++ b/kernel/trace/trace_events_hist.c > @@ -5623,10 +5623,12 @@

Re: [PATCH v5 4/4] vduse: Add LSM hook to check Virtio device type

2023-12-12 Thread Casey Schaufler
On 12/12/2023 5:17 AM, Maxime Coquelin wrote: > This patch introduces a LSM hook for devices creation, > destruction (ioctl()) and opening (open()) operations, > checking the application is allowed to perform these > operations for the Virtio device type. My earlier comments on a vduse specific

[PATCH v3] ring-buffer: Fix writing to the buffer with max_data_size

2023-12-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The maximum ring buffer data size is the maximum size of data that can be recorded on the ring buffer. Events must be smaller than the sub buffer data size minus any meta data. This size is checked before trying to allocate from the ring buffer because the

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

2023-12-12 Thread Michael S. Tsirkin
On Tue, Dec 12, 2023 at 11:00:12AM +0800, Jason Wang wrote: > On Tue, Dec 12, 2023 at 12:54 AM Michael S. Tsirkin wrote: > > > > On Mon, Dec 11, 2023 at 03:26:46PM +0800, Jason Wang wrote: > > > > Try reducing the VHOST_NET_WEIGHT limit and see if that improves things > > > > any? > > > > > > Or

Re: [PATCH v2] virtio: Add support for no-reset virtio PCI PM

2023-12-12 Thread Michael S. Tsirkin
On Tue, Dec 12, 2023 at 11:01:53AM +0800, Jason Wang wrote: > On Tue, Dec 12, 2023 at 12:37 AM Michael S. Tsirkin wrote: > > > > On Fri, Dec 08, 2023 at 04:07:54PM +0900, David Stevens wrote: > > > If a virtio_pci_device supports native PCI power management and has the > > > No_Soft_Reset bit

Re: [PATCH net-next v8 0/4] send credit update during setting SO_RCVLOWAT

2023-12-12 Thread Michael S. Tsirkin
On Tue, Dec 12, 2023 at 06:59:03PM +0300, Arseniy Krasnov wrote: > > > On 12.12.2023 18:54, Michael S. Tsirkin wrote: > > On Tue, Dec 12, 2023 at 12:16:54AM +0300, Arseniy Krasnov wrote: > >> Hello, > >> > >>DESCRIPTION > >> > >> This patchset fixes old problem

Re: [PATCH net-next v8 3/4] virtio/vsock: fix logic which reduces credit update messages

2023-12-12 Thread Michael S. Tsirkin
On Tue, Dec 12, 2023 at 06:50:39PM +0300, Arseniy Krasnov wrote: > > > On 12.12.2023 18:54, Michael S. Tsirkin wrote: > > On Tue, Dec 12, 2023 at 12:16:57AM +0300, Arseniy Krasnov wrote: > >> Add one more condition for sending credit update during dequeue from > >> stream socket: when number of

Re: [PATCH net-next v8 0/4] send credit update during setting SO_RCVLOWAT

2023-12-12 Thread Arseniy Krasnov
On 12.12.2023 18:54, Michael S. Tsirkin wrote: > On Tue, Dec 12, 2023 at 12:16:54AM +0300, Arseniy Krasnov wrote: >> Hello, >> >>DESCRIPTION >> >> This patchset fixes old problem with hungup of both rx/tx sides and adds >> test for it. This happens due to

[PATCH v3] tracing: Allow for max buffer data size trace_marker writes

2023-12-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Allow a trace write to be as big as the ring buffer tracing data will allow. Currently, it only allows writes of 1KB in size, but there's no reason that it cannot allow what the ring buffer can hold. Signed-off-by: Steven Rostedt (Google) --- Changes since v2:

Re: [PATCH net-next v8 3/4] virtio/vsock: fix logic which reduces credit update messages

2023-12-12 Thread Arseniy Krasnov
On 12.12.2023 18:54, Michael S. Tsirkin wrote: > On Tue, Dec 12, 2023 at 12:16:57AM +0300, Arseniy Krasnov wrote: >> Add one more condition for sending credit update during dequeue from >> stream socket: when number of bytes in the rx queue is smaller than >> SO_RCVLOWAT value of the socket.

Re: [PATCH net-next v8 0/4] send credit update during setting SO_RCVLOWAT

2023-12-12 Thread Michael S. Tsirkin
On Tue, Dec 12, 2023 at 12:16:54AM +0300, Arseniy Krasnov wrote: > Hello, > >DESCRIPTION > > This patchset fixes old problem with hungup of both rx/tx sides and adds > test for it. This happens due to non-default SO_RCVLOWAT value and > deferred credit update in

Re: [PATCH net-next v8 3/4] virtio/vsock: fix logic which reduces credit update messages

2023-12-12 Thread Michael S. Tsirkin
On Tue, Dec 12, 2023 at 12:16:57AM +0300, Arseniy Krasnov wrote: > Add one more condition for sending credit update during dequeue from > stream socket: when number of bytes in the rx queue is smaller than > SO_RCVLOWAT value of the socket. This is actual for non-default value > of SO_RCVLOWAT

Re: [PATCH v2] tracing: Allow for max buffer data size trace_marker writes

2023-12-12 Thread Steven Rostedt
On Tue, 12 Dec 2023 09:33:11 -0500 Mathieu Desnoyers wrote: > On 2023-12-12 09:00, Steven Rostedt wrote: > [...] > > --- a/kernel/trace/trace.c > > +++ b/kernel/trace/trace.c > > @@ -7272,6 +7272,7 @@ tracing_mark_write(struct file *filp, const char > > __user *ubuf, > > enum

Re: [PATCH v2] ring-buffer: Never use absolute timestamp for first event

2023-12-12 Thread Steven Rostedt
On Tue, 12 Dec 2023 23:20:08 +0900 Masami Hiramatsu (Google) wrote: > On Tue, 12 Dec 2023 07:18:37 -0500 > Steven Rostedt wrote: > > > From: "Steven Rostedt (Google)" > > > > On 32bit machines, the 64 bit timestamps are broken up into 32 bit words > > to keep from using local64_cmpxchg(), as

Re: [PATCH] tracing: Add size check when printing trace_marker output

2023-12-12 Thread Steven Rostedt
On Tue, 12 Dec 2023 09:23:54 -0500 Mathieu Desnoyers wrote: > On 2023-12-12 08:44, Steven Rostedt wrote: > > From: "Steven Rostedt (Google)" > > > > If for some reason the trace_marker write does not have a nul byte for the > > string, it will overflow the print: > > Does this result in

Re: [PATCH v2] tracing: Allow for max buffer data size trace_marker writes

2023-12-12 Thread Mathieu Desnoyers
On 2023-12-12 09:00, Steven Rostedt wrote: [...] --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -7272,6 +7272,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, enum event_trigger_type tt = ETT_NONE; struct trace_buffer *buffer; struct

[PATCH 1/1] hwspinlock: qcom: fix tcsr data for ipq6018

2023-12-12 Thread Chukun Pan
The tcsr_mutex hwlock register of the ipq6018 SoC is 0x2[1], which should not use the max_register configuration of older SoCs. This will cause smem to be unable to probe, further causing devices that use smem-part to parse partitions to fail to boot. [2.118227] qcom-smem: probe of

[PATCH 4/4] sched: Rename arch_update_thermal_pressure into arch_update_hw_pressure

2023-12-12 Thread Vincent Guittot
Now that cpufreq provides a pressure value to the scheduler, rename arch_update_thermal_pressure into hw pressure to reflect that it returns a pressure applied by HW with a high frequency and which needs filtering. This pressure is not always related to thermal mitigation but can also be generated

[PATCH 1/4] cpufreq: Add a cpufreq pressure feedback for the scheduler

2023-12-12 Thread Vincent Guittot
Provide to the scheduler a feedback about the temporary max available capacity. Unlike arch_update_thermal_pressure, this doesn't need to be filtered as the pressure will happen for dozens ms or more. Signed-off-by: Vincent Guittot --- drivers/cpufreq/cpufreq.c | 48

[PATCH 3/4] thermal/cpufreq: Remove arch_update_thermal_pressure()

2023-12-12 Thread Vincent Guittot
arch_update_thermal_pressure() aims to update fast changing signal which should be averaged using PELT filtering before being provided to the scheduler which can't make smart use of fast changing signal. cpufreq now provides the maximum freq_qos pressure on the capacity to the scheduler, which

[PATCH 2/4] sched: Take cpufreq feedback into account

2023-12-12 Thread Vincent Guittot
Aggregate the different pressures applied on the capacity of CPUs and create a new function that returns the actual capacity of the CPU: get_actual_cpu_capacity() Signed-off-by: Vincent Guittot --- kernel/sched/fair.c | 43 +++ 1 file changed, 23

[PATCH 0/5] Rework system pressure interface to the scheduler

2023-12-12 Thread Vincent Guittot
Following the consolidation and cleanup of CPU capacity in [1], this serie reworks how the scheduler gets the pressures on CPUs. We need to take into account all pressures applied by cpufreq on the compute capacity of a CPU for dozens of ms or more and not only cpufreq cooling device or HW

Re: [PATCH] tracing: Add size check when printing trace_marker output

2023-12-12 Thread Mathieu Desnoyers
On 2023-12-12 08:44, Steven Rostedt wrote: From: "Steven Rostedt (Google)" If for some reason the trace_marker write does not have a nul byte for the string, it will overflow the print: Does this result in leaking kernel memory to userspace ? If so, it should state "Fixes..." and CC stable.

Re: [PATCH v2] ring-buffer: Never use absolute timestamp for first event

2023-12-12 Thread Google
On Tue, 12 Dec 2023 07:18:37 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > On 32bit machines, the 64 bit timestamps are broken up into 32 bit words > to keep from using local64_cmpxchg(), as that is very expensive on 32 bit > architectures. > > On 32 bit architectures,

回复: [PATCH V1] remoteproc: virtio: Fix wdg cannot recovery remote processor

2023-12-12 Thread Joakim Zhang
Hello maintainers, This patch may not fix it in a correct way, after applying this patch, in rproc_add_virtio_dev(): 1) If the allocate path is dma_declare_coherent_memory(), it will be freed from dma_release_coherent_memory(), which is expected 2) If the allocate path is

[PATCH v2] tracing: Allow for max buffer data size trace_marker writes

2023-12-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Allow a trace write to be as big as the ring buffer tracing data will allow. Currently, it only allows writes of 1KB in size, but there's no reason that it cannot allow what the ring buffer can hold. Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers

[linus:master] [ring] f458a14534: WARNING:at_kernel/trace/ring_buffer_benchmark.c:#ring_buffer_consumer

2023-12-12 Thread kernel test robot
26991][ T45] ---[ end trace ]--- The kernel config and materials to reproduce are available at: https://download.01.org/0day-ci/archive/20231212/202312121655.f8f36552-oliver.s...@intel.com -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki

[PATCH] tracing: Add size check when printing trace_marker output

2023-12-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" If for some reason the trace_marker write does not have a nul byte for the string, it will overflow the print: trace_seq_printf(s, ": %s", field->buf); The field->buf could be missing the nul byte. To prevent overflow, add the max size that the buf can be by

[PATCH v5 4/4] vduse: Add LSM hook to check Virtio device type

2023-12-12 Thread Maxime Coquelin
This patch introduces a LSM hook for devices creation, destruction (ioctl()) and opening (open()) operations, checking the application is allowed to perform these operations for the Virtio device type. Signed-off-by: Maxime Coquelin --- MAINTAINERS | 1 +

[PATCH v5 2/4] vduse: Temporarily disable control queue features

2023-12-12 Thread Maxime Coquelin
Virtio-net driver control queue implementation is not safe when used with VDUSE. If the VDUSE application does not reply to control queue messages, it currently ends up hanging the kernel thread sending this command. Some work is on-going to make the control queue implementation robust with

[PATCH v5 3/4] vduse: enable Virtio-net device type

2023-12-12 Thread Maxime Coquelin
This patch adds Virtio-net device type to the supported devices types. Initialization fails if the device does not support VIRTIO_F_VERSION_1 feature, in order to guarantee the configuration space is read-only. Acked-by: Jason Wang Reviewed-by: Xie Yongji Signed-off-by: Maxime Coquelin ---

[PATCH v5 1/4] vduse: validate block features only with block devices

2023-12-12 Thread Maxime Coquelin
This patch is preliminary work to enable network device type support to VDUSE. As VIRTIO_BLK_F_CONFIG_WCE shares the same value as VIRTIO_NET_F_HOST_TSO4, we need to restrict its check to Virtio-blk device type. Acked-by: Jason Wang Reviewed-by: Xie Yongji Signed-off-by: Maxime Coquelin ---

[PATCH v5 0/4] vduse: add support for networking devices

2023-12-12 Thread Maxime Coquelin
This small series enables virtio-net device type in VDUSE. With it, basic operation have been tested, both with virtio-vdpa and vhost-vdpa using DPDK Vhost library series adding VDUSE support using split rings layout (merged in DPDK v23.07-rc1). Control queue support (and so multiqueue) has also

Re: [PATCH v6 2/2] kbuild: rpm-pkg: Fix build with non-default MODLIB

2023-12-12 Thread Michal Suchánek
On Mon, Dec 11, 2023 at 01:33:23PM +0900, Masahiro Yamada wrote: > On Mon, Dec 11, 2023 at 6:09 AM Michal Suchánek wrote: > > > > On Mon, Dec 11, 2023 at 03:44:35AM +0900, Masahiro Yamada wrote: > > > On Thu, Dec 7, 2023 at 4:48 AM Michal Suchanek wrote: > > > > > > > > The default MODLIB value

Re: [PATCH v6 1/2] depmod: Handle installing modules under a different directory

2023-12-12 Thread Michal Suchánek
On Mon, Dec 11, 2023 at 01:29:15PM +0900, Masahiro Yamada wrote: > On Mon, Dec 11, 2023 at 6:07 AM Michal Suchánek wrote: > > > > Hello! > > > > On Mon, Dec 11, 2023 at 03:43:44AM +0900, Masahiro Yamada wrote: > > > On Thu, Dec 7, 2023 at 4:48 AM Michal Suchanek wrote: > > > > > > > > Some

[PATCH] ring-buffer: Have saved event hold the entire event

2023-12-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" For the ring buffer iterator (non-consuming read), the event needs to be copied into the iterator buffer to make sure that a writer does not overwrite it while the user is reading it. If a write happens during the copy, the buffer is simply discarded. But the

[PATCH v2] ring-buffer: Never use absolute timestamp for first event

2023-12-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" On 32bit machines, the 64 bit timestamps are broken up into 32 bit words to keep from using local64_cmpxchg(), as that is very expensive on 32 bit architectures. On 32 bit architectures, reading these timestamps can happen in a middle of an update. In this case,

[PATCH v2] ring-buffer: Fix writing to the buffer with max_data_size

2023-12-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The maximum ring buffer data size is the maximum size of data that can be recorded on the ring buffer. Events must be smaller than the sub buffer data size minus any meta data. This size is checked before trying to allocate from the ring buffer because the

[PATCH] tracing: Fix uaf issue when open the hist or hist_debug file

2023-12-12 Thread Zheng Yejian
KASAN report following issue. The root cause is when opening 'hist' file of an instance and accessing 'trace_event_file' in hist_show(), but 'trace_event_file' has been freed due to the instance being removed. 'hist_debug' file has the same problem. To fix it, use tracing_{open, release}_file_tr()

Re: [PATCH] ring-buffer: Fix buffer max_data_size with max_event_size

2023-12-12 Thread Steven Rostedt
On Mon, 11 Dec 2023 20:40:33 +0900 Masami Hiramatsu (Google) wrote: > On Sat, 9 Dec 2023 17:09:25 -0500 > Steven Rostedt wrote: > > > On Sat, 9 Dec 2023 17:01:39 -0500 > > Steven Rostedt wrote: > > > > > From: "Steven Rostedt (Google)" > > > > > > The maximum ring buffer data size is the

[PATCH RESEND 04/11] tracing: tracing_buffers_splice_read: behave as-if non-blocking I/O

2023-12-12 Thread Ahelenia Ziemiańska
Otherwise we risk sleeping with the pipe locked for indeterminate lengths of time. Link: https://lore.kernel.org/linux-fsdevel/qk6hjuam54khlaikf2ssom6custxf5is2ekkaequf4hvode3ls@zgf7j5j4ubvw/t/#u Signed-off-by: Ahelenia Ziemiańska --- kernel/trace/trace.c | 32

[PATCH RESEND 00/11] splice(file<>pipe) I/O on file as-if O_NONBLOCK

2023-12-12 Thread Ahelenia Ziemiańska
(Originally sent on 2023-10-16 as ; received no replies, resending unchanged per Documentation/process/submitting-patches.rst#_resend_reminders). Hi! As it stands, splice(file -> pipe): 1. locks the pipe, 2. does a read from the file, 3. unlocks the pipe. For reading from regular files and

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

2023-12-12 Thread David Hildenbrand
On 11.12.23 23:52, 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 v3 1/3] kasan: switch kunit tests to console tracepoints

2023-12-12 Thread Marco Elver
On Tue, 12 Dec 2023 at 10:19, Paul Heidekrüger wrote: > > On 12.12.2023 00:37, Andrey Konovalov wrote: > > On Tue, Dec 12, 2023 at 12:35 AM Paul Heidekrüger > > wrote: > > > > > > Using CONFIG_FTRACE=y instead of CONFIG_TRACEPOINTS=y produces the same > > > error > > > for me. > > > > > > So >

Re: [PATCH v3 1/3] kasan: switch kunit tests to console tracepoints

2023-12-12 Thread Paul Heidekrüger
On 12.12.2023 00:37, Andrey Konovalov wrote: > On Tue, Dec 12, 2023 at 12:35 AM Paul Heidekrüger > wrote: > > > > Using CONFIG_FTRACE=y instead of CONFIG_TRACEPOINTS=y produces the same > > error > > for me. > > > > So > > > > CONFIG_KUNIT=y > > CONFIG_KUNIT_ALL_TESTS=n > >

Re: [PATCH net-next v8 3/4] virtio/vsock: fix logic which reduces credit update messages

2023-12-12 Thread Stefano Garzarella
On Tue, Dec 12, 2023 at 12:16:57AM +0300, Arseniy Krasnov wrote: Add one more condition for sending credit update during dequeue from stream socket: when number of bytes in the rx queue is smaller than SO_RCVLOWAT value of the socket. This is actual for non-default value of SO_RCVLOWAT (e.g. not

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

2023-12-12 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 v5 2/3] remoteproc: qcom: pas: make region assign more generic

2023-12-12 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 v5 1/3] dt-bindings: remoteproc: qcom,sm8550-pas: document the SM8650 PAS

2023-12-12 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 v5 0/3] remoteproc: qcom: Introduce DSP support for SM8650

2023-12-12 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