Re: [PATCH v3 2/3] arm64: dts: qcom: sc7280: Move video-firmware to chrome-common

2023-12-11 Thread Vikash Garodia
On 12/1/2023 3:03 PM, Luca Weiss wrote: > If the video-firmware node is present, the venus driver assumes we're on > a system that doesn't use TZ for starting venus, like on ChromeOS > devices. > > Move the video-firmware node to chrome-common.dtsi so we can use venus > on a non-ChromeOS devices.

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

2023-12-11 Thread Krishna Chaitanya Chundru
Hi Steven, Can you review it once. Thanks & Regards, Krishna Chaitanya. On 12/7/2023 10:00 AM, Krishna chaitanya chundru wrote: This change adds ftrace support for following functions which helps in debugging the issues when there is Channel state & MHI state change and also when we receive

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

2023-12-11 Thread joakim . zhang
From: Joakim Zhang Recovery remote processor failed when wdg irq received: [0.842574] remoteproc remoteproc0: crash detected in cix-dsp-rproc: type watchdog [0.842750] remoteproc remoteproc0: handling crash #1 in cix-dsp-rproc [0.842824] remoteproc remoteproc0: recovering

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

2023-12-11 Thread Steven Rostedt
On Mon, 11 Dec 2023 22:51:04 -0500 Mathieu Desnoyers wrote: > On 2023-12-11 17:59, Steven Rostedt wrote: > > On Mon, 11 Dec 2023 15:13:24 -0500 > > Mathieu Desnoyers wrote: > > > >> Going through a review of the ring buffer rb_time functions for 32-bit > >> architectures, I updated the

Re: [PATCH net-next 6/6] tools: virtio: introduce vhost_net_test

2023-12-11 Thread Jason Wang
On Thu, Dec 7, 2023 at 7:28 PM Yunsheng Lin wrote: > > On 2023/12/7 14:00, Jason Wang wrote: > > On Tue, Dec 5, 2023 at 7:35 PM Yunsheng Lin wrote: > ... > > >> + > >> +static int tun_alloc(void) > >> +{ > >> + struct ifreq ifr; > >> + int fd, e; > >> + > >> + fd =

Re: [PATCH v6 09/12] x86/sgx: Restructure top-level EPC reclaim function

2023-12-11 Thread Haitao Huang
Hi Kai On Mon, 27 Nov 2023 03:57:03 -0600, Huang, Kai wrote: On Mon, 2023-11-27 at 00:27 +0800, Haitao Huang wrote: On Mon, 20 Nov 2023 11:45:46 +0800, Huang, Kai wrote: > On Mon, 2023-10-30 at 11:20 -0700, Haitao Huang wrote: > > From: Sean Christopherson > > > > To prepare for

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

2023-12-11 Thread Mathieu Desnoyers
On 2023-12-11 17:59, Steven Rostedt wrote: On Mon, 11 Dec 2023 15:13:24 -0500 Mathieu Desnoyers wrote: Going through a review of the ring buffer rb_time functions for 32-bit architectures, I updated the comments to match the code, and identified the following issues: Thanks Mathieu! -

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

2023-12-11 Thread Bixuan Cui
From: cuibixuan Add a new event to calculate the shrink_inactive_list()/shrink_active_list() execution time. Example of output: kswapd0-103 [007] . 1098.353020: mm_vmscan_lru_shrink_active_start: nid=0 kswapd0-103 [007] . 1098.353040:

[PATCH -next 1/2] mm: shrinker: add new event to trace shrink count

2023-12-11 Thread Bixuan Cui
From: cuibixuan do_shrink_slab() calculates the freeable memory through shrinker->count_objects(), and then reclaims the memory through shrinker->scan_objects(). When reclaiming memory, shrinker->count_objects() takes a certain amount of time: Fun spend(us)

[PATCH -next 0/2] Make memory reclamation measurable

2023-12-11 Thread Bixuan Cui
From: cuibixuan When the system memory is low, kswapd reclaims the memory. The key steps of memory reclamation include 1.shrink_lruvec * shrink_active_list, moves folios from the active LRU to the inactive LRU * shrink_inactive_list, shrink lru from inactive LRU list 2.shrink_slab *

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

2023-12-11 Thread Jason Wang
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 set, then skip resetting and reinitializing the device > > when

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

2023-12-11 Thread Jason Wang
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 a dirty hack like cond_resched() in translate_desc(). > > what do you

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

2023-12-11 Thread Ilya Leoshkevich
On Fri, 2023-12-08 at 09:31 -0500, Steven Rostedt wrote: > 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 > > >

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

2023-12-11 Thread Steven Rostedt
On Tue, 12 Dec 2023 09:31:31 +0900 Masami Hiramatsu (Google) wrote: > On Mon, 11 Dec 2023 11:59:49 -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] nvdimm: Remove usage of the deprecated ida_simple_xx() API

2023-12-11 Thread Dave Jiang
On 12/10/23 10:13, Christophe JAILLET wrote: > ida_alloc() and ida_free() should be preferred to the deprecated > ida_simple_get() and ida_simple_remove(). > > This is less verbose. > > Signed-off-by: Christophe JAILLET Reviewed-by: Dave Jiang > --- > drivers/nvdimm/btt_devs.c | 6

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

2023-12-11 Thread Verma, Vishal L
On Tue, 2023-12-12 at 08:56 +0800, Huang, Ying wrote: > "Verma, Vishal L" writes: > > > On Tue, 2023-12-12 at 08:30 +0800, Huang, Ying wrote: > > > > > > > + > > > > +static ssize_t memmap_on_memory_store(struct device *dev, > > > > + struct device_attribute

Re: [syzbot] [bpf?] [trace?] possible deadlock in task_fork_fair

2023-12-11 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:2ebe81c81435 net, xdp: Allow metadata > 32 git tree: bpf-next console+strace: https://syzkaller.appspot.com/x/log.txt?x=16687bdee8 kernel config: https://syzkaller.appspot.com/x/.config?x=f8715b6ede5c4b90

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

2023-12-11 Thread Dan Williams
Verma, Vishal L wrote: > On Tue, 2023-12-12 at 08:30 +0800, Huang, Ying wrote: > > 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

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

2023-12-11 Thread Huang, Ying
"Verma, Vishal L" writes: > On Tue, 2023-12-12 at 08:30 +0800, Huang, Ying wrote: >> 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

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

2023-12-11 Thread Verma, Vishal L
On Tue, 2023-12-12 at 08:30 +0800, Huang, Ying wrote: > 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

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

2023-12-11 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] ring-buffer: Never use absolute timestamp for start event

2023-12-11 Thread Google
On Mon, 11 Dec 2023 11:59:49 -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,

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

2023-12-11 Thread Andrey Konovalov
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 > CONFIG_FTRACE=y > CONFIG_KASAN=y >

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

2023-12-11 Thread Paul Heidekrüger
On 11.12.2023 23:56, Marco Elver wrote: > On Mon, 11 Dec 2023 at 23:48, Paul Heidekrüger > wrote: > > > > On 11.12.2023 21:51, Andrey Konovalov wrote: > > > On Mon, Dec 11, 2023 at 7:59 PM Paul Heidekrüger > > > wrote: > > > > > > > > > Hi Paul, > > > > > > > > > > I've been successfully

Re: [PATCH] tracing: Update snapshot buffer on resize if it is allocated

2023-12-11 Thread Google
On Mon, 11 Dec 2023 12:51:52 -0500 Steven Rostedt wrote: > On Mon, 11 Dec 2023 21:31:34 +0900 > Masami Hiramatsu (Google) wrote: > > > On Sun, 10 Dec 2023 22:54:47 -0500 > > Steven Rostedt wrote: > > > > > From: "Steven Rostedt (Google)" > > > > > > The snapshot buffer is to mimic the main

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

2023-12-11 Thread Steven Rostedt
On Mon, 11 Dec 2023 17:59:04 -0500 Steven Rostedt wrote: > > > > - A cmpxchg interrupted by 4 writes or cmpxchg overflows the counter > > and produces corrupted time stamps. This is _not_ fixed by this patch. > > Except that it's not 4 bits that is compared, but 32 bits. That should be

Re: [PATCH] trace_seq: Increase the buffer size to almost two pages

2023-12-11 Thread Google
On Mon, 11 Dec 2023 13:28:37 -0500 Steven Rostedt wrote: > On Mon, 11 Dec 2023 21:46:27 +0900 > Masami Hiramatsu (Google) wrote: > > > > > > > By increasing the trace_seq buffer to almost two pages, it can now print > > > out the first line. > > > > > > This also subtracts the rest of the

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

2023-12-11 Thread Steven Rostedt
On Mon, 11 Dec 2023 15:13:24 -0500 Mathieu Desnoyers wrote: > Going through a review of the ring buffer rb_time functions for 32-bit > architectures, I updated the comments to match the code, and identified > the following issues: Thanks Mathieu! > > - rb_time_cmpxchg() needs to update the

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

2023-12-11 Thread Marco Elver
On Mon, 11 Dec 2023 at 23:48, Paul Heidekrüger wrote: > > On 11.12.2023 21:51, Andrey Konovalov wrote: > > On Mon, Dec 11, 2023 at 7:59 PM Paul Heidekrüger > > wrote: > > > > > > > Hi Paul, > > > > > > > > I've been successfully running KASAN tests with CONFIG_TRACEPOINTS > > > > enabled on

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

2023-12-11 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 v3 1/2] Documentatiion/ABI: Add ABI documentation for sys-bus-dax

2023-12-11 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 v3 0/2] Add DAX ABI for memmap_on_memory

2023-12-11 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. Add a new ABI for toggling memmap_on_memory semantics in patch 2. The missing ABI was spotted in [1], this series is a split of the new ABI

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

2023-12-11 Thread Paul Heidekrüger
On 11.12.2023 21:51, Andrey Konovalov wrote: > On Mon, Dec 11, 2023 at 7:59 PM Paul Heidekrüger > wrote: > > > > > Hi Paul, > > > > > > I've been successfully running KASAN tests with CONFIG_TRACEPOINTS > > > enabled on arm64 since this patch landed. > > > > Interesting ... > > > > > What happens

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

2023-12-11 Thread Arseniy Krasnov
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 1) - idea is to "kick" peer to continue data transmission, because

[PATCH net-next v8 4/4] vsock/test: two tests to check credit update logic

2023-12-11 Thread Arseniy Krasnov
Both tests are almost same, only differs in two 'if' conditions, so implemented in a single function. Tests check, that credit update message is sent: 1) During setting SO_RCVLOWAT value of the socket. 2) When number of 'rx_bytes' become smaller than SO_RCVLOWAT value. Signed-off-by: Arseniy

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

2023-12-11 Thread Arseniy Krasnov
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 virtio/vsock. Link to previous old patchset:

[PATCH net-next v8 2/4] virtio/vsock: send credit update during setting SO_RCVLOWAT

2023-12-11 Thread Arseniy Krasnov
Send credit update message when SO_RCVLOWAT is updated and it is bigger than number of bytes in rx queue. It is needed, because 'poll()' will wait until number of bytes in rx queue will be not smaller than SO_RCVLOWAT, so kick sender to send more data. Otherwise mutual hungup for tx/rx is

[PATCH net-next v8 1/4] vsock: update SO_RCVLOWAT setting callback

2023-12-11 Thread Arseniy Krasnov
Do not return if transport callback for SO_RCVLOWAT is set (only in error case). In this case we don't need to set 'sk_rcvlowat' field in each transport - only in 'vsock_set_rcvlowat()'. Also, if 'sk_rcvlowat' is now set only in af_vsock.c, change callback name from 'set_rcvlowat' to

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

2023-12-11 Thread Andrey Konovalov
On Mon, Dec 11, 2023 at 7:59 PM Paul Heidekrüger wrote: > > > Hi Paul, > > > > I've been successfully running KASAN tests with CONFIG_TRACEPOINTS > > enabled on arm64 since this patch landed. > > Interesting ... > > > What happens when you try running the tests with .kunitconfig? Does > >

Re: [PATCH] dt-bindings: arm: qcom: Fix up htc-memul compatible

2023-12-11 Thread Krzysztof Kozlowski
On 11/12/2023 20:28, Luca Weiss wrote: > While applying the original patch, some things got messed up and it > didn't apply to the correct section. Move the compatible to the correct > location to fix that. > > Fixes: bfccc195192e ("dt-bindings: arm: qcom: Add HTC One Mini 2") > Signed-off-by:

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

2023-12-11 Thread Mathieu Desnoyers
Going through a review of the ring buffer rb_time functions for 32-bit architectures, I updated the comments to match the code, and identified the following issues: - rb_time_cmpxchg() needs to update the msb last, so it matches the validation of top and msb by __rb_time_read(). This is fixed

[PATCH] dt-bindings: arm: qcom: Fix up htc-memul compatible

2023-12-11 Thread Luca Weiss
om,msm8916-v1-qrd/9-v1 - const: qcom,msm8916 - - items: - - enum: - - htc,memul - - const: qcom,msm8926 - - items: - enum: - motorola,potter --- base-commit: fc538f5c65c2c1ac9a1fbea90393bf8e145676f2 change-id: 20231211

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

2023-12-11 Thread Paul Heidekrüger
Hi Andrey! On 11.12.2023 18:50, Andrey Konovalov wrote: > On Mon, Dec 11, 2023 at 5:37 PM Paul Heidekrüger > wrote: > > > > Hi all! > > > > On 05.05.2023 09:58, Steven Rostedt wrote: > > > On Mon, 1 May 2023 15:02:37 -0700 > > > Peter Collingbourne wrote: > > > > > > > > > "ftrace" is really

Re: [PATCH] rpmsg: glink: Fix buffer overflow

2023-12-11 Thread Bjorn Andersson
On Mon, Dec 11, 2023 at 09:32:20PM +0530, Hardevsinh Palaniya wrote: > In qcom_glink_send_open_req() remove error: strcpy() 'channel->name' > too large for 'req.name' (1010102 vs 32) > As far as I can tell, channel->name comes from the struct rpmsg_channel_info->name, which is a 32-byte array,

Re: [PATCH] trace_seq: Increase the buffer size to almost two pages

2023-12-11 Thread Steven Rostedt
On Mon, 11 Dec 2023 21:46:27 +0900 Masami Hiramatsu (Google) wrote: > > > > By increasing the trace_seq buffer to almost two pages, it can now print > > out the first line. > > > > This also subtracts the rest of the trace_seq fields from the buffer, so > > that the entire trace_seq is now

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

2023-12-11 Thread Dave Jiang
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 > 1 file

Re: Building signed debs

2023-12-11 Thread Masahiro Yamada
On Mon, Dec 11, 2023 at 7:19 PM Tom Cook wrote: > > On Sat, Dec 9, 2023 at 6:18 PM Masahiro Yamada wrote: > > On Fri, Dec 8, 2023 at 8:14 PM Tom Cook wrote: > > > > > > I'm trying to build a signed .deb kernel package of > > > https://github.com/torvalds/linux/tree/v6.6. I've copied > > >

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

2023-12-11 Thread Steven Rostedt
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. It shows each event and their timestamp as well as the delta in the

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

2023-12-11 Thread Steven Rostedt
On Mon, 11 Dec 2023 13:06:14 -0500 Steven Rostedt wrote: > > case RINGBUF_TYPE_DATA: > ts += event->time_delta; > - pr_warn(" [%lld] delta:%d\n", ts, event->time_delta); > + pr_warn(" 0x%x: [%lld] delta:%d\n", > +

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

2023-12-11 Thread Steven Rostedt
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. It shows each event and their timestamp as well as the delta in the

Re: [PATCH] tracing: Update snapshot buffer on resize if it is allocated

2023-12-11 Thread Steven Rostedt
On Mon, 11 Dec 2023 21:31:34 +0900 Masami Hiramatsu (Google) wrote: > On Sun, 10 Dec 2023 22:54:47 -0500 > Steven Rostedt wrote: > > > From: "Steven Rostedt (Google)" > > > > The snapshot buffer is to mimic the main buffer so that when a snapshot is > > needed, the snapshot and main buffer

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

2023-12-11 Thread Andrey Konovalov
On Mon, Dec 11, 2023 at 5:37 PM Paul Heidekrüger wrote: > > Hi all! > > On 05.05.2023 09:58, Steven Rostedt wrote: > > On Mon, 1 May 2023 15:02:37 -0700 > > Peter Collingbourne wrote: > > > > > > > "ftrace" is really for just the function tracing, but CONFIG_FTRACE > > > > > really should just

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

2023-12-11 Thread Rob Herring
On Sun, Nov 19, 2023 at 10:59 AM Alexandru Elisei wrote: > > Allow the kernel to get the size and location of the MTE tag storage > regions from the DTB. This memory is marked as reserved for now. > > The DTB node for the tag storage region is defined as: > > tags0: tag-storage@8f800

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

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

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

2023-12-11 Thread Michael S. Tsirkin
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 a dirty hack like cond_resched() in translate_desc(). what do you mean, exactly? -- MST

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

2023-12-11 Thread Paul Heidekrüger
Hi all! On 05.05.2023 09:58, Steven Rostedt wrote: > On Mon, 1 May 2023 15:02:37 -0700 > Peter Collingbourne wrote: > > > > > "ftrace" is really for just the function tracing, but CONFIG_FTRACE > > > > really should just be for the function tracing infrastructure, and > > > > perhaps not even

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

2023-12-11 Thread Steven Rostedt
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 comments. These two stamps are key to knowing how to handle nested

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

2023-12-11 Thread Michael S. Tsirkin
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 set, then skip resetting and reinitializing the device > when suspending and restoring the device. This allows system-wide low > power states

Re: [PATCH v2] vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space()

2023-12-11 Thread Stefano Garzarella
On Mon, Dec 11, 2023 at 07:23:17PM +0300, Nikolay Kuratov wrote: We need to do signed arithmetic if we expect condition `if (bytes < 0)` to be possible Found by Linux Verification Center (linuxtesting.org) with SVACE Fixes: 06a8fc78367d ("VSOCK: Introduce virtio_vsock_common.ko")

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

2023-12-11 Thread Kris Van Hees
On Sat, Dec 09, 2023 at 07:59:17AM +0900, Masami Hiramatsu wrote: > 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. > > > >

[PATCH v2] vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space()

2023-12-11 Thread Nikolay Kuratov
We need to do signed arithmetic if we expect condition `if (bytes < 0)` to be possible Found by Linux Verification Center (linuxtesting.org) with SVACE Fixes: 06a8fc78367d ("VSOCK: Introduce virtio_vsock_common.ko") Signed-off-by: Nikolay Kuratov --- V1 -> V2: Added Fixes section

[PATCH] rpmsg: glink: Fix buffer overflow

2023-12-11 Thread Hardevsinh Palaniya
In qcom_glink_send_open_req() remove error: strcpy() 'channel->name' too large for 'req.name' (1010102 vs 32) Signed-off-by: Hardevsinh Palaniya diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 82d460ff4777..2d6a592e1c72 100644 ---

Re: [PATCH] vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space()

2023-12-11 Thread Stefano Garzarella
On Mon, Dec 11, 2023 at 05:25:05PM +0300, Nikolay Kuratov wrote: We need to do signed arithmetic if we expect condition `if (bytes < 0)` to be possible Found by Linux Verification Center (linuxtesting.org) with SVACE We should add: Fixes: 06a8fc78367d ("VSOCK: Introduce

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

2023-12-11 Thread Alexandru Elisei
Hi, On Fri, Dec 08, 2023 at 02:03:44PM +0900, Hyesoo Yu wrote: > Hi, > > I'm sorry for the late response, I was on vacation. > > On Sun, Dec 03, 2023 at 12:14:30PM +, Alexandru Elisei wrote: > > Hi, > > > > On Wed, Nov 29, 2023 at 05:44:24PM +0900, Hyesoo Yu wrote: > > > Hello. > > > > >

Re: WARNING: kmalloc bug in bpf_uprobe_multi_link_attach

2023-12-11 Thread Jiri Olsa
On Mon, Dec 11, 2023 at 02:01:43PM +0100, Jiri Olsa wrote: > On Mon, Dec 11, 2023 at 07:29:40PM +0800, Hou Tao wrote: > > SNIP > > > > > It seems a big attr->link_create.uprobe_multi.cnt is passed to > > bpf_uprobe_multi_link_attach(). Could you please try the first patch in > > the following

[PATCH] vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space()

2023-12-11 Thread Nikolay Kuratov
We need to do signed arithmetic if we expect condition `if (bytes < 0)` to be possible Found by Linux Verification Center (linuxtesting.org) with SVACE Signed-off-by: Nikolay Kuratov --- net/vmw_vsock/virtio_transport_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH RFC v2 15/27] arm64: mte: Check that tag storage blocks are in the same zone

2023-12-11 Thread Alexandru Elisei
Hi, On Fri, Dec 08, 2023 at 02:27:39PM +0900, Hyesoo Yu wrote: > Hi~ > > On Thu, Nov 30, 2023 at 12:00:11PM +, Alexandru Elisei wrote: > > Hi, > > > > On Wed, Nov 29, 2023 at 05:57:44PM +0900, Hyesoo Yu wrote: > > > On Sun, Nov 19, 2023 at 04:57:09PM +, Alexandru Elisei wrote: > > > >

[PATCH AUTOSEL 6.6 26/47] pds_vdpa: set features order

2023-12-11 Thread Sasha Levin
From: Shannon Nelson [ Upstream commit cefc9ba6aed48a3aa085888e3262ac2aa975714b ] Fix up the order that the device and negotiated features are checked to get a more reliable difference when things get changed. Signed-off-by: Shannon Nelson Message-Id:

[PATCH AUTOSEL 6.6 24/47] pds_vdpa: fix up format-truncation complaint

2023-12-11 Thread Sasha Levin
From: Shannon Nelson [ Upstream commit 4f317d6529d7fc3ab7769ef89645d43fc7eec61b ] Our friendly kernel test robot has recently been pointing out some format-truncation issues. Here's a fix for one of them. Reported-by: kernel test robot Closes:

[PATCH AUTOSEL 6.6 25/47] pds_vdpa: clear config callback when status goes to 0

2023-12-11 Thread Sasha Levin
From: Shannon Nelson [ Upstream commit dd3b8de16e90c5594eddd29aeeb99e97c6f863be ] If the client driver is setting status to 0, something is getting shutdown and possibly removed. Make sure we clear the config_cb so that it doesn't end up crashing when trying to call a bogus callback.

Re: WARNING: kmalloc bug in bpf_uprobe_multi_link_attach

2023-12-11 Thread Jiri Olsa
On Mon, Dec 11, 2023 at 07:29:40PM +0800, Hou Tao wrote: SNIP > > It seems a big attr->link_create.uprobe_multi.cnt is passed to > bpf_uprobe_multi_link_attach(). Could you please try the first patch in > the following patch set ? > >

Re: [PATCH] trace_seq: Increase the buffer size to almost two pages

2023-12-11 Thread Google
On Sat, 9 Dec 2023 17:52:20 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Now that trace_marker can hold more than 1KB string, and can write as much > as the ring buffer can hold, the trace_seq is not big enough to hold > writes: > > ~# a="1234567890" > ~# cnt=4080 > ~#

Re: [PATCH] tracing: Update snapshot buffer on resize if it is allocated

2023-12-11 Thread Google
On Sun, 10 Dec 2023 22:54:47 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The snapshot buffer is to mimic the main buffer so that when a snapshot is > needed, the snapshot and main buffer are swapped. When the snapshot buffer > is allocated, it is set to the minimal size

Re: [PATCH] ring-buffer: Fix memory leak of free page

2023-12-11 Thread Google
On Sun, 10 Dec 2023 22:12:50 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Reading the ring buffer does a swap of a sub-buffer within the ring buffer > with a empty sub-buffer. This allows the reader to have full access to the > content of the sub-buffer that was swapped

Re: [PATCH] tracing: Increase size of trace_marker_raw to max ring buffer entry

2023-12-11 Thread Google
On Sat, 9 Dec 2023 17:57:16 -0500 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > There's no reason to give an arbitrary limit to the size of a raw trace > marker. Just let it be as big as the size that is allowed by the ring > buffer itself. > > And there's also no reason to

Re: [PATCH net-next v7 2/4] virtio/vsock: send credit update during setting SO_RCVLOWAT

2023-12-11 Thread Stefano Garzarella
On Thu, Dec 07, 2023 at 12:18:47AM +0300, Arseniy Krasnov wrote: Send credit update message when SO_RCVLOWAT is updated and it is bigger than number of bytes in rx queue. It is needed, because 'poll()' will wait until number of bytes in rx queue will be not smaller than SO_RCVLOWAT, so kick

Re: [PATCH] tracing: Have large events show up as '[LINE TOO BIG]' instead of nothing

2023-12-11 Thread Google
On Sun, 10 Dec 2023 10:34:15 -0500 Steven Rostedt wrote: > On Sun, 10 Dec 2023 09:11:40 -0500 > Mathieu Desnoyers wrote: > > > On 2023-12-09 17:10, Steven Rostedt wrote: > > [...] > > > <...>-852 [001] . 121.550551: > > > tracing_mark_write[LINE TOO BIG] > > >

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

2023-12-11 Thread Arseniy Krasnov
On 11.12.2023 15:01, Stefano Garzarella wrote: > On Thu, Dec 07, 2023 at 01:50:05AM +0300, Arseniy Krasnov wrote: >> >> >> On 07.12.2023 01:08, Michael S. Tsirkin wrote: >>> On Thu, Dec 07, 2023 at 12:52:51AM +0300, Arseniy Krasnov wrote: On 07.12.2023 00:53, Michael S. Tsirkin

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

2023-12-11 Thread Stefano Garzarella
On Thu, Dec 07, 2023 at 01:50:05AM +0300, Arseniy Krasnov wrote: On 07.12.2023 01:08, Michael S. Tsirkin wrote: On Thu, Dec 07, 2023 at 12:52:51AM +0300, Arseniy Krasnov wrote: On 07.12.2023 00:53, Michael S. Tsirkin wrote: On Thu, Dec 07, 2023 at 12:18:48AM +0300, Arseniy Krasnov wrote:

Re: [PATCH v2 12/33] kmsan: Allow disabling KMSAN checks for the current task

2023-12-11 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:06 PM Ilya Leoshkevich wrote: > > Like for KASAN, it's useful to temporarily disable KMSAN checks around, > e.g., redzone accesses. Introduce kmsan_disable_current() and > kmsan_enable_current(), which are similar to their KASAN counterparts. Initially we used to have

[PATCH] virtio_balloon: stay awake while adjusting balloon

2023-12-11 Thread David Stevens
From: David Stevens Add a wakeup event for when the balloon is inflating or deflating. Userspace can enable this wakeup event to prevent the system from suspending while the balloon is being adjusted. This allows /sys/power/wakeup_count to be used without breaking virtio_balloon's cooperative

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

2023-12-11 Thread Google
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 maximum size of data that can be > > recorded on the ring buffer. Events must be smaller

Re: WARNING: kmalloc bug in bpf_uprobe_multi_link_attach

2023-12-11 Thread Hou Tao
Hi, On 12/11/2023 4:12 PM, xingwei lee wrote: > Sorry for containing HTML part, repeat the mail > Hello I found a bug in net/bpf in the lastest upstream linux and > lastest net tree. > WARNING: kmalloc bug in bpf_uprobe_multi_link_attach > > kernel: net 28a7cb045ab700de5554193a1642917602787784 >

Re: WARNING: kmalloc bug in bpf_uprobe_multi_link_attach

2023-12-11 Thread Google
On Mon, 11 Dec 2023 16:10:32 +0800 xingwei lee wrote: > Hello I found a bug in net/bpf in the lastest upstream linux and lastest > net tree. > WARNING: kmalloc bug in bpf_uprobe_multi_link_attach Hmm, uprobe_multi is recently introduced and it seems a normal uprobes unlike kprobe_multi (which

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

2023-12-11 Thread neil . armstrong
On 11/12/2023 10:54, Konrad Dybcio wrote: On 11.12.2023 10:37, Neil Armstrong wrote: On 09/12/2023 19:06, Konrad Dybcio wrote: On 8.12.2023 16:04, Neil Armstrong wrote: The current memory region assign only supports a single memory region. But new platforms introduces more regions to make

Re: [PATCH v2 28/33] s390/string: Add KMSAN support

2023-12-11 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:03 PM Ilya Leoshkevich wrote: > > Add KMSAN support for the s390 implementations of the string functions. > Do this similar to how it's already done for KASAN, except that the > optimized memset{16,32,64}() functions need to be disabled: it's > important for KMSAN to

Re: [PATCH v2 30/33] s390/uaccess: Add KMSAN support to put_user() and get_user()

2023-12-11 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:03 PM Ilya Leoshkevich wrote: > > put_user() uses inline assembly with precise constraints, so Clang is > in principle capable of instrumenting it automatically. Unfortunately, > one of the constraints contains a dereferenced user pointer, and Clang > does not currently

Re: [PATCH v2 32/33] s390: Implement the architecture-specific kmsan functions

2023-12-11 Thread Alexander Potapenko
> > Is there a possibility for infinite recursion here? E.g. can > > `lowcore_ptr[raw_smp_processor_id()]` point somewhere in between > > `(void *)_lowcore` and `(void *)(_lowcore + 1))`? > > No, it's allocated with __get_free_pages() or memblock_alloc_low(). > But since this question came up, I

Re: [PATCH v2 32/33] s390: Implement the architecture-specific kmsan functions

2023-12-11 Thread Ilya Leoshkevich
On Mon, 2023-12-11 at 11:26 +0100, Alexander Potapenko wrote: > > +static inline void *arch_kmsan_get_meta_or_null(void *addr, bool > > is_origin) > > +{ > > +   if (addr >= (void *)_lowcore && > > +   addr < (void *)(_lowcore + 1)) { > > +   /* > > +    *

Re: [PATCH v2 25/33] s390/cpacf: Unpoison the results of cpacf_trng()

2023-12-11 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich wrote: > > Prevent KMSAN from complaining about buffers filled by cpacf_trng() > being uninitialized. > > Tested-by: Alexander Gordeev > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v2 32/33] s390: Implement the architecture-specific kmsan functions

2023-12-11 Thread Alexander Potapenko
> +static inline void *arch_kmsan_get_meta_or_null(void *addr, bool is_origin) > +{ > + if (addr >= (void *)_lowcore && > + addr < (void *)(_lowcore + 1)) { > + /* > +* Different lowcores accessed via S390_lowcore are described > +* by

Re: Building signed debs

2023-12-11 Thread Tom Cook
On Sat, Dec 9, 2023 at 6:18 PM Masahiro Yamada wrote: > On Fri, Dec 8, 2023 at 8:14 PM Tom Cook wrote: > > > > I'm trying to build a signed .deb kernel package of > > https://github.com/torvalds/linux/tree/v6.6. I've copied > > certs/default_x509.genkey to certs/x509.genkey. The .config is the

Re: [PATCH v2 27/33] s390/mm: Define KMSAN metadata for vmalloc and modules

2023-12-11 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:07 PM Ilya Leoshkevich wrote: > > The pages for the KMSAN metadata associated with most kernel mappings > are taken from memblock by the common code. However, vmalloc and module > metadata needs to be defined by the architectures. > > Be a little bit more careful than

Re: [PATCH v2 10/33] kmsan: Expose kmsan_get_metadata()

2023-12-11 Thread Alexander Potapenko
> +static inline void *kmsan_get_metadata(void *addr, bool is_origin) > +{ > + return NULL; > +} > + > #endif We shouldn't need this part, as kmsan_get_metadata() should never be called in non-KMSAN builds.

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

2023-12-11 Thread Konrad Dybcio
On 11.12.2023 10:37, Neil Armstrong wrote: > On 09/12/2023 19:06, Konrad Dybcio wrote: >> On 8.12.2023 16:04, Neil Armstrong wrote: >>> The current memory region assign only supports a single >>> memory region. >>> >>> But new platforms introduces more regions to make the >>> memory requirements

Re: [PATCH v2 05/33] kmsan: Fix is_bad_asm_addr() on arches with overlapping address spaces

2023-12-11 Thread Alexander Potapenko
On Tue, Nov 21, 2023 at 11:02 PM Ilya Leoshkevich wrote: > > Comparing pointers with TASK_SIZE does not make sense when kernel and > userspace overlap. Skip the comparison when this is the case. > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

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

2023-12-11 Thread Neil Armstrong
On 09/12/2023 19:06, Konrad Dybcio wrote: On 8.12.2023 16:04, Neil Armstrong wrote: 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

Re: [v5.15] WARNING in kvm_arch_vcpu_ioctl_run

2023-12-11 Thread syzbot
This bug is marked as fixed by commit: KVM: x86: Remove WARN sanity check on hypervisor timer vs. UNINITIALIZED vCPU But I can't find it in the tested trees[1] for more than 90 days. Is it a correct commit? Please update it by replying: #syz fix: exact-commit-title Until then the bug is still

Re: [PATCH v3 1/3] media: venus: core: Set up secure memory ranges for SC7280

2023-12-11 Thread Luca Weiss
On Fri Dec 1, 2023 at 10:33 AM CET, Luca Weiss wrote: > Not all SC7280 devices ship with ChromeOS firmware. Other devices need > PAS for image authentication. That requires the predefined virtual > address ranges to be passed via scm calls. Define them to enable Venus > on non-CrOS SC7280 devices.

WARNING: kmalloc bug in bpf_uprobe_multi_link_attach

2023-12-11 Thread xingwei lee
Sorry for containing HTML part, repeat the mail Hello I found a bug in net/bpf in the lastest upstream linux and lastest net tree. WARNING: kmalloc bug in bpf_uprobe_multi_link_attach kernel: net 28a7cb045ab700de5554193a1642917602787784 Kernel config:

  1   2   >