Re: [PATCH v2] vsock/virtio: Remove queued_replies pushback logic

2025-04-04 Thread Alexander Graf
On 03.04.25 14:21, Michael S. Tsirkin wrote: On Wed, Apr 02, 2025 at 12:14:24PM -0400, Stefan Hajnoczi wrote: On Tue, Apr 01, 2025 at 08:13:49PM +, Alexander Graf wrote: Ever since the introduction of the virtio vsock driver, it included pushback logic that blocks it from taking any new

[PATCH v3] vsock/virtio: Remove queued_replies pushback logic

2025-04-02 Thread Alexander Graf
t the pushback logic is gone, let's deliberately reschedule RX and TX work after a fixed threshold (256) of packets to process. Fixes: 0ea9e1d3a9e3 ("VSOCK: Introduce virtio_transport.ko") Signed-off-by: Alexander Graf --- v1 -> v2: - Rework to use fixed threshold v

[PATCH v2] vsock/virtio: Remove queued_replies pushback logic

2025-04-01 Thread Alexander Graf
t the pushback logic is gone, let's deliberately reschedule RX and TX work after a fixed threshold (256) of packets to process. Fixes: 0ea9e1d3a9e3 ("VSOCK: Introduce virtio_transport.ko") Signed-off-by: Alexander Graf --- net/vmw_vsock/virtio_transport.c | 70 +

Re: [PATCH v6 2/5] arm64: dts: imx8mp: Add mu2 root clock

2025-03-27 Thread Alexander Stein
ot;; > + clocks = <&audio_blk_ctrl > IMX8MP_CLK_AUDIOMIX_MU2_ROOT>; Please keep status as the last property. Best regards Alexander > }; > > i2c5: i2c@30ad { > -- TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider http://www.tq-group.com/

Re: [PATCH v5 2/5] arm64: dts: imx8mp: Add mu2 root clock

2025-03-17 Thread Alexander Stein
status = "disabled"; There is no need to enable MU2 if the DSP is disabled by default, no? Best regards Alexander > + clocks = <&audio_blk_ctrl > IMX8MP_CLK_AUDIOMIX_MU2_ROOT>; > }; > >

[PATCH net-next 4/4] tools/testing/selftests/cgroup: add test for SO_PEERCGROUPID

2025-03-09 Thread Alexander Mikhalitsyn
rauner Cc: Kuniyuki Iwashima Cc: Lennart Poettering Cc: Luca Boccassi Cc: Tejun Heo Cc: Johannes Weiner Cc: "Michal Koutný" Cc: Shuah Khan Signed-off-by: Alexander Mikhalitsyn --- tools/testing/selftests/cgroup/Makefile | 2 + .../selftests/cgroup/test_so_peercgroupid.c | 308 +

[PATCH net-next 3/4] tools/testing/selftests/cgroup/cgroup_util: add cg_get_id helper

2025-03-09 Thread Alexander Mikhalitsyn
rauner Cc: Kuniyuki Iwashima Cc: Lennart Poettering Cc: Luca Boccassi Cc: Tejun Heo Cc: Johannes Weiner Cc: "Michal Koutný" Cc: Shuah Khan Signed-off-by: Alexander Mikhalitsyn --- tools/testing/selftests/cgroup/cgroup_util.c | 15 +++ tools/testing/selftests/cgroup/cgroup_uti

Re: [PATCH] bpf: Fix mix-up of 4096 and page size.

2025-02-04 Thread Alexander Lobakin
From: Saket Kumar Bhaskar Date: Tue, 4 Feb 2025 12:27:52 +0530 > On Tue, Jan 28, 2025 at 04:03:11PM +0100, Alexander Lobakin wrote: >> From: Alexei Starovoitov >> Date: Thu, 23 Jan 2025 21:14:04 -0800 >> >>> On Wed, Jan 22, 2025 at 10:38 AM Saket Kumar Bha

Re: [PATCH] bpf: Fix mix-up of 4096 and page size.

2025-01-28 Thread Alexander Lobakin
From: Alexei Starovoitov Date: Thu, 23 Jan 2025 21:14:04 -0800 > On Wed, Jan 22, 2025 at 10:38 AM Saket Kumar Bhaskar > wrote: >> >> For platforms on powerpc architecture with a default page size greater >> than 4096, there was an inconsistency in fragment size calculation. >> This caused the BP

Re: Kernel Bug: "KASAN: slab-out-of-bounds Read in jfs_readdir"

2024-12-20 Thread Alexander Potapenko
On Fri, Dec 20, 2024 at 9:07 AM Haichi Wang wrote: > > Dear Linux maintainers and reviewers: > > We are reporting a Linux kernel bug titled **KASAN: slab-out-of-bounds Read > in jfs_readdir**, discovered using a modified version of Syzkaller. > Hello Haichi, Unfortunately right now the bug is n

Re: [PATCH 11/14] selftests/mm: Use sys_pkey helpers consistently

2024-12-15 Thread Alexander Gordeev
On Mon, Dec 09, 2024 at 09:50:16AM +, Kevin Brodsky wrote: Hi Kevin, Andrew, > diff --git a/tools/testing/selftests/mm/Makefile > b/tools/testing/selftests/mm/Makefile > index 814b17a43385..1f0743d9459d 100644 > --- a/tools/testing/selftests/mm/Makefile > +++ b/tools/testing/selftests/mm/Mak

Re: [PATCH net-next v3] af_unix: pass pidfd flags via SCM_PIDFD cmsg

2024-11-21 Thread Alexander Mikhalitsyn
>Currently SCM_PIDFD cmsg cannot be sent via unix socket >(returns -EINVAL) and SO_PASSPIDFD doesn't support flags. >The created pidfd always has flags set to 0. > >This patch implements SCM_PIDFD cmsg in AF_UNIX socket, which >can be used to send flags to SO_PASSPIDFD-enabled recipient. > >Self-te

Re: [PATCH] vsock/virtio: Remove queued_replies pushback logic

2024-11-15 Thread Alexander Graf
Hi Stefano, On 15.11.24 12:59, Stefano Garzarella wrote: On Fri, Nov 15, 2024 at 10:30:16AM +, Alexander Graf wrote: Ever since the introduction of the virtio vsock driver, it included pushback logic that blocks it from taking any new RX packets until the TX queue backlog becomes

[PATCH] vsock/virtio: Remove queued_replies pushback logic

2024-11-15 Thread Alexander Graf
d progress. We're not in a deadlock. To resolve this, let's remove that pushback logic altogether and rely on higher levels (like credits) to ensure we do not consume unbounded memory. Fixes: 0ea9e1d3a9e3 ("VSOCK: Introduce virtio_transport.ko") Signed-off-by: Alexander Graf --- ne

[PATCH v2] vhost/vsock: specify module version

2024-09-29 Thread Alexander Mikhalitsyn
k/ total 0 drwxr-xr-x 2 root root0 Sep 26 15:59 . drwxr-xr-x 100 root root0 Sep 26 15:59 .. --w--- 1 root root 4096 Sep 26 15:59 uevent -r--r--r-- 1 root root 4096 Sep 26 15:59 version Signed-off-by: Alexander Mikhalitsyn --- drivers/vhost/vsock.c | 1 + 1 file changed, 1

[PATCH] vhost/vsock: specify module version

2024-09-26 Thread Alexander Mikhalitsyn
s -la /sys/module/vhost_vsock/ total 0 drwxr-xr-x 2 root root0 Sep 26 15:59 . drwxr-xr-x 100 root root0 Sep 26 15:59 .. --w--- 1 root root 4096 Sep 26 15:59 uevent -r--r--r-- 1 root root 4096 Sep 26 15:59 version Signed-off-by: Alexander Mikhalitsyn --- drivers/vhost/vsock.c | 1

Re: [PATCH net-next v17 02/14] mm: move the page fragment allocator from page_alloc into its own file

2024-09-04 Thread Alexander Duyck
moving 'struct page_frag_cache' to mm_types_task.h as > suggested by Alexander, see [3]. > > 1. https://lore.kernel.org/all/20230411160902.4134381-3-dhowe...@redhat.com/ > 2. https://lore.kernel.org/all/15623dac-9358-4597-b3ee-3694a5956...@gmail.com/ > 3. > https://lore.

Re: [PATCH net-next v17 01/14] mm: page_frag: add a test module for page_frag

2024-09-04 Thread Alexander Duyck
e fragment from the > ptr_ring and free the fragment. > > CC: Alexander Duyck > Signed-off-by: Yunsheng Lin > --- > tools/testing/selftests/mm/Makefile | 3 + > tools/testing/selftests/mm/page_frag/Makefile | 18 ++ > .../selftests/mm/page_frag/page_frag_te

[PATCH v4 15/15] fs/fuse/virtio_fs: allow idmapped mounts

2024-09-03 Thread Alexander Mikhalitsyn
stian Brauner Cc: Seth Forshee Cc: Miklos Szeredi Cc: Vivek Goyal Cc: German Maglione Cc: Amir Goldstein Cc: Bernd Schubert Cc: Signed-off-by: Alexander Mikhalitsyn Reviewed-by: Christian Brauner --- v3: - this commit added --- fs/fuse/virtio_fs.c | 1 + 1 file changed, 1 inse

[PATCH v3 11/11] fs/fuse/virtio_fs: allow idmapped mounts

2024-08-15 Thread Alexander Mikhalitsyn
stian Brauner Cc: Seth Forshee Cc: Miklos Szeredi Cc: Vivek Goyal Cc: German Maglione Cc: Amir Goldstein Cc: Bernd Schubert Cc: Signed-off-by: Alexander Mikhalitsyn --- v3: - this commit added --- fs/fuse/virtio_fs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs

Re: [PATCH net-next v12 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-08-05 Thread Alexander Duyck
On Sun, Aug 4, 2024 at 10:00 AM Yunsheng Lin wrote: > > On 8/3/2024 1:00 AM, Alexander Duyck wrote: > > >> > >>> > >>> As far as your API extension and naming maybe you should look like > >>> something like bio_vec and borrow the naming

Re: [PATCH net-next v12 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-08-02 Thread Alexander Duyck
On Fri, Aug 2, 2024 at 3:05 AM Yunsheng Lin wrote: > > On 2024/8/1 23:21, Alexander Duyck wrote: > > On Thu, Aug 1, 2024 at 6:01 AM Yunsheng Lin wrote: > >> > >> On 2024/8/1 2:13, Alexander Duyck wrote: > >>> On Wed, Jul 31, 2024 at 5:50 AM Yunsheng Lin

Re: [PATCH net-next v12 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-08-01 Thread Alexander Duyck
On Thu, Aug 1, 2024 at 6:01 AM Yunsheng Lin wrote: > > On 2024/8/1 2:13, Alexander Duyck wrote: > > On Wed, Jul 31, 2024 at 5:50 AM Yunsheng Lin wrote: > >> > >> Currently the page_frag API is returning 'virtual address' > >> or 'va' wh

Re: [PATCH net-next v12 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-07-31 Thread Alexander Duyck
ng API mirroring the page_pool_alloc_va() > API of the page_pool. So that callers expecting to deal with > va, page or both va and page may call page_frag_alloc_va*, > page_frag_alloc_pg*, or page_frag_alloc* API accordingly. > > CC: Alexander Duyck > Signed-off-by: Yunsheng Lin &

Re: [RFC v11 05/14] mm: page_frag: avoid caller accessing 'page_frag_cache' directly

2024-07-21 Thread Alexander H Duyck
On Fri, 2024-07-19 at 17:33 +0800, Yunsheng Lin wrote: > Use appropriate frag_page API instead of caller accessing > 'page_frag_cache' directly. > > CC: Alexander Duyck > Signed-off-by: Yunsheng Lin > --- > drivers/vhost/net.c | 2 +- > in

Re: [RFC v11 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-07-21 Thread Alexander Duyck
ng API mirroring the page_pool_alloc_va() > API of the page_pool. So that callers expecting to deal with > va, page or both va and page may call page_frag_alloc_va*, > page_frag_alloc_pg*, or page_frag_alloc* API accordingly. > > CC: Alexander Duyck > Signed-off-by: Yunsheng Lin

Re: [PATCH v6 16/39] kmsan: Expose KMSAN_WARN_ON()

2024-06-21 Thread Alexander Potapenko
eoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v6 32/39] s390/ptdump: Add KMSAN page markers

2024-06-21 Thread Alexander Potapenko
On Fri, Jun 21, 2024 at 2:27 AM Ilya Leoshkevich wrote: > > Add KMSAN vmalloc metadata areas to kernel_page_tables. > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v5 13/37] kmsan: Support SLAB_POISON

2024-06-20 Thread Alexander Potapenko
uninitialized memory and UAF. > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v5 36/37] s390/kmsan: Implement the architecture-specific functions

2024-06-20 Thread Alexander Potapenko
On Thu, Jun 20, 2024 at 4:18 PM Alexander Potapenko wrote: > > On Thu, Jun 20, 2024 at 3:38 PM Ilya Leoshkevich wrote: > > > > On Thu, 2024-06-20 at 11:25 +0200, Alexander Gordeev wrote: > > > On Wed, Jun 19, 2024 at 05:44:11PM +0200, Ilya Leoshkevich

Re: [PATCH v5 36/37] s390/kmsan: Implement the architecture-specific functions

2024-06-20 Thread Alexander Potapenko
On Thu, Jun 20, 2024 at 3:38 PM Ilya Leoshkevich wrote: > > On Thu, 2024-06-20 at 11:25 +0200, Alexander Gordeev wrote: > > On Wed, Jun 19, 2024 at 05:44:11PM +0200, Ilya Leoshkevich wrote: > > > > Hi Ilya, > > > > > +static inline bool is_lowcore_addr(voi

Re: [PATCH v5 36/37] s390/kmsan: Implement the architecture-specific functions

2024-06-20 Thread Alexander Gordeev
: Ilya Leoshkevich > --- > arch/s390/include/asm/kmsan.h | 59 +++ > 1 file changed, 59 insertions(+) > create mode 100644 arch/s390/include/asm/kmsan.h Acked-by: Alexander Gordeev

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

2024-06-20 Thread Alexander Potapenko
On Thu, Jun 20, 2024 at 1:19 PM Ilya Leoshkevich wrote: > > On Thu, 2024-06-20 at 10:36 +0200, Alexander Potapenko wrote: > > On Wed, Jun 19, 2024 at 5:45 PM Ilya Leoshkevich > > wrote: > > > > > > put_user() uses inline assembly with precise constraints,

Re: [PATCH v5 36/37] s390/kmsan: Implement the architecture-specific functions

2024-06-20 Thread Alexander Gordeev
On Wed, Jun 19, 2024 at 05:44:11PM +0200, Ilya Leoshkevich wrote: Hi Ilya, > +static inline bool is_lowcore_addr(void *addr) > +{ > + return addr >= (void *)&S390_lowcore && > +addr < (void *)(&S390_lowcore + 1); > +} > + > +static inline void *arch_kmsan_get_meta_or_null(void *ad

Re: [PATCH v5 17/37] mm: slub: Disable KMSAN when checking the padding bytes

2024-06-20 Thread Alexander Potapenko
ess_enable() is to touch poisoned > metadata without triggering KMSAN, is to unpoison its return value. > However, this approach is too fragile. So simply disable the KMSAN > checks in the respective functions. > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

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

2024-06-20 Thread Alexander Potapenko
size); > break; > case 4: > - rc = __get_user_asm((unsigned int *)x, > + rc = __get_user_int((unsigned int *)x, > (unsigned int __user *)ptr, > size)

Re: [PATCH v5 34/37] s390/uaccess: Add the missing linux/instrumented.h #include

2024-06-20 Thread Alexander Potapenko
gt; it directly. > > Suggested-by: Alexander Potapenko > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v5 12/37] kmsan: Introduce memset_no_sanitize_memory()

2024-06-20 Thread Alexander Potapenko
On Wed, Jun 19, 2024 at 5:45 PM Ilya Leoshkevich wrote: > > Add a wrapper for memset() that prevents unpoisoning. This is useful > for filling memory allocator redzones. > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko > --- > include/linux/kmsan.h |

Re: [PATCH v4 35/35] kmsan: Enable on s390

2024-06-18 Thread Alexander Potapenko
On Thu, Jun 13, 2024 at 5:40 PM Ilya Leoshkevich wrote: > > Now that everything else is in place, enable KMSAN in Kconfig. > > Acked-by: Heiko Carstens > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v4 09/35] kmsan: Expose kmsan_get_metadata()

2024-06-18 Thread Alexander Potapenko
s stored in the lowcore_ptr[] array. > > When lowcore is accessed through virtual address 0, one needs to > resolve metadata for lowcore_ptr[raw_smp_processor_id()]. > > Expose kmsan_get_metadata() to make it possible to do this from the > arch code. > > Signed-off-by: I

Re: [PATCH v4 12/35] kmsan: Support SLAB_POISON

2024-06-18 Thread Alexander Potapenko
eft_pad); > > | ^~~~ > > | memset > > cc1: some warnings being treated as errors > > > > I haven't looked in deep, but reporting first. Do you have any idea? > > > > [1] > >

Re: [PATCH v4 16/35] mm: slub: Unpoison the memchr_inv() return value

2024-06-18 Thread Alexander Potapenko
On Thu, Jun 13, 2024 at 5:39 PM Ilya Leoshkevich wrote: > > Even though the KMSAN warnings generated by memchr_inv() are suppressed > by metadata_access_enable(), its return value may still be poisoned. > > The reason is that the last iteration of memchr_inv() returns > `*start != value ? start :

Re: [PATCH v4 14/35] kmsan: Do not round up pg_data_t size

2024-06-18 Thread Alexander Potapenko
ble memory, in turn > causing virt_to_page_or_null() in kmsan_init_alloc_meta_for_range() to > return NULL, which leads to kernel panic shortly after. > > Since the padding bytes are not used, drop the rounding. Nice catch, thanks! > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v4 15/35] mm: slub: Let KMSAN access metadata

2024-06-18 Thread Alexander Potapenko
isable() functions to KMSAN. > > Acked-by: Vlastimil Babka > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v4 11/35] kmsan: Allow disabling KMSAN checks for the current task

2024-06-18 Thread Alexander Potapenko
n, where possible. > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v6 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-18 Thread Alexander Graf
On 18.06.24 12:21, Ard Biesheuvel wrote: On Mon, 17 Jun 2024 at 23:01, Alexander Graf wrote: On 17.06.24 22:40, Steven Rostedt wrote: On Mon, 17 Jun 2024 09:07:29 +0200 Alexander Graf wrote: Hey Steve, I believe we're talking about 2 different things :). Let me rephrase a bit and m

Re: [PATCH v4 32/35] s390/uaccess: Add KMSAN support to put_user() and get_user()

2024-06-18 Thread Alexander Potapenko
On Tue, Jun 18, 2024 at 11:40 AM Ilya Leoshkevich wrote: > > On Tue, 2024-06-18 at 11:24 +0200, Alexander Potapenko wrote: > > On Thu, Jun 13, 2024 at 5:39 PM Ilya Leoshkevich > > wrote: > > > > > > put_user() uses inline assembly with precise constraints,

Re: [PATCH v4 26/35] s390/diag: Unpoison diag224() output buffer

2024-06-18 Thread Alexander Potapenko
inter. While at it, prettify them too. > > Suggested-by: Heiko Carstens > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v4 32/35] s390/uaccess: Add KMSAN support to put_user() and get_user()

2024-06-18 Thread Alexander Potapenko
On Thu, Jun 13, 2024 at 5:39 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 d

Re: [PATCH v6 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-17 Thread Alexander Graf
[resend because Thunderbird decided to send the previous version as HTML :(] On 17.06.24 22:40, Steven Rostedt wrote: On Mon, 17 Jun 2024 09:07:29 +0200 Alexander Graf wrote: Hey Steve, I believe we're talking about 2 different things :). Let me rephrase a bit and make a concrete ex

Re: [PATCH v6 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-17 Thread Alexander Graf
Hey Steve, On 13.06.24 19:12, Steven Rostedt wrote: On Thu, 13 Jun 2024 18:54:12 +0200 Alexander Graf wrote: Do you have a "real" pstore on these systems that you could store non-volatile variables in, such as persistent UEFI variables? If so, you could create an actually persiste

Re: [PATCH v6 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-13 Thread Alexander Graf
Hey Steve, On 13.06.24 17:55, Steven Rostedt wrote: Reserve unspecified location of physical memory from kernel command line Background: In ChromeOS, we have 1 MB of pstore ramoops reserved so that we can extract dmesg output and some other information when a crash happens in the field. (This

[PATCH v4 2/2] ipvs: allow some sysctls in non-init user namespaces

2024-05-06 Thread Alexander Mikhalitsyn
d8c06f6ae199e1133ae8/osl/namespace_linux.go#L682 [3] Cc: Julian Anastasov Cc: Simon Horman Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Signed-off-by: Alexander Mikhalitsyn --- net/netfilter/ipvs/ip_vs_ctl.c | 19 +++ 1 file changed, 15 insertions(+),

[PATCH v4 1/2] ipvs: add READ_ONCE barrier for ipvs->sysctl_amemthresh

2024-05-06 Thread Alexander Mikhalitsyn
Cc: Julian Anastasov Cc: Simon Horman Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Suggested-by: Julian Anastasov Signed-off-by: Alexander Mikhalitsyn --- net/netfilter/ipvs/ip_vs_ctl.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a

[PATCH net-next v3 2/2] ipvs: allow some sysctls in non-init user namespaces

2024-04-18 Thread Alexander Mikhalitsyn
d8c06f6ae199e1133ae8/osl/namespace_linux.go#L682 [3] Cc: Stéphane Graber Cc: Christian Brauner Cc: Julian Anastasov Cc: Simon Horman Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Signed-off-by: Alexander Mikhalitsyn --- net/netfilter/ipvs/ip_vs_ctl.c | 21 +

[PATCH net-next v3 1/2] ipvs: add READ_ONCE barrier for ipvs->sysctl_amemthresh

2024-04-18 Thread Alexander Mikhalitsyn
Cc: Julian Anastasov Cc: Simon Horman Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Suggested-by: Julian Anastasov Signed-off-by: Alexander Mikhalitsyn --- net/netfilter/ipvs/ip_vs_ctl.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a

[PATCH net-next v2 2/2] ipvs: allow some sysctls in non-init user namespaces

2024-04-18 Thread Alexander Mikhalitsyn
6f6ae199e1133ae8/osl/namespace_linux.go#L682 Cc: Stéphane Graber Cc: Christian Brauner Cc: Julian Anastasov Cc: Simon Horman Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Signed-off-by: Alexander Mikhalitsyn --- net/netfilter/ipvs/ip_vs_ctl.c | 21 +++-- 1 file ch

[PATCH net-next v2 1/2] ipvs: add READ_ONCE barrier for ipvs->sysctl_amemthresh

2024-04-18 Thread Alexander Mikhalitsyn
Cc: Julian Anastasov Cc: Simon Horman Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Suggested-by: Julian Anastasov Signed-off-by: Alexander Mikhalitsyn --- net/netfilter/ipvs/ip_vs_ctl.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/net

Re: [PATCH net-next v2 07/15] mm: page_frag: add '_va' suffix to page_frag API

2024-04-16 Thread Alexander H Duyck
On Mon, 2024-04-15 at 21:19 +0800, Yunsheng Lin wrote: > Currently most of the API for page_frag API is returning > 'virtual address' as output or expecting 'virtual address' > as input, in order to differentiate the API handling between > 'virtual address' and 'struct page', add '_va' suffix to th

[PATCH net-next] ipvs: allow some sysctls in non-init user namespaces

2024-04-16 Thread Alexander Mikhalitsyn
sov Cc: Simon Horman Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Signed-off-by: Alexander Mikhalitsyn --- net/netfilter/ipvs/ip_vs_ctl.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilt

Re: [syzbot] [virtualization?] KMSAN: uninit-value in virtqueue_add (4)

2024-01-24 Thread Alexander Potapenko
/disk-fbafc3e6.raw.xz > > > vmlinux: > > > https://storage.googleapis.com/syzbot-assets/8b490af009d5/vmlinux-fbafc3e6.xz > > > kernel image: > > > https://storage.googleapis.com/syzbot-assets/202ca200f4a4/bzImage-fbafc3e6.xz > > > > > > IMPORTANT: if

Re: [PATCH net-next 2/6] page_frag: unify gfp bits for order 3 page allocation

2024-01-08 Thread Alexander Duyck
On Mon, Jan 8, 2024 at 12:25 AM Yunsheng Lin wrote: > > On 2024/1/5 23:35, Alexander H Duyck wrote: > > On Wed, 2024-01-03 at 17:56 +0800, Yunsheng Lin wrote: > >> Currently there seems to be three page frag implementions > >> which all try to allocate order 3 pag

Re: [PATCH net-next 4/6] vhost/net: remove vhost_net_page_frag_refill()

2024-01-08 Thread Alexander Duyck
On Mon, Jan 8, 2024 at 1:06 AM Yunsheng Lin wrote: > > On 2024/1/6 0:06, Alexander H Duyck wrote: > >> > >> static void handle_tx_copy(struct vhost_net *net, struct socket *sock) > >> @@ -1353,8 +1318,7 @@ static int vhost_net_open(struct i

Re: [PATCH net-next 4/6] vhost/net: remove vhost_net_page_frag_refill()

2024-01-05 Thread Alexander H Duyck
On Wed, 2024-01-03 at 17:56 +0800, Yunsheng Lin wrote: > The page frag in vhost_net_page_frag_refill() uses the > 'struct page_frag' from skb_page_frag_refill(), but it's > implementation is similar to page_frag_alloc_align() now. > > This patch removes vhost_net_page_frag_refill() by using > 'str

Re: [PATCH net-next 5/6] net: introduce page_frag_cache_drain()

2024-01-05 Thread Alexander H Duyck
On Wed, 2024-01-03 at 17:56 +0800, Yunsheng Lin wrote: > When draining a page_frag_cache, most user are doing > the similar steps, so introduce an API to avoid code > duplication. > > Signed-off-by: Yunsheng Lin > Acked-by: Jason Wang Looks good to me. Reviewed-by: Alexander Duyck

Re: [PATCH net-next 2/6] page_frag: unify gfp bits for order 3 page allocation

2024-01-05 Thread Alexander H Duyck
masking off > __GFP_DIRECT_RECLAIM for order 3 page allocation to avoid > possible pressure for mm. > > Signed-off-by: Yunsheng Lin > CC: Alexander Duyck > --- > drivers/vhost/net.c | 2 +- > mm/page_alloc.c | 4 ++-- > net/core/sock.c | 2 +- > 3 files c

Re: [PATCH v3 28/34] s390/mm: Define KMSAN metadata for vmalloc and modules

2024-01-04 Thread Alexander Gordeev
On Tue, Jan 02, 2024 at 04:05:31PM +0100, Heiko Carstens wrote: Hi Heiko, ... > > @@ -253,9 +253,17 @@ static unsigned long setup_kernel_memory_layout(void) > > MODULES_END = round_down(__abs_lowcore, _SEGMENT_SIZE); > > MODULES_VADDR = MODULES_END - MODULES_LEN; > > VMALLOC_END = MODUL

Re: [PATCH v3 17/34] lib/zlib: Unpoison DFLTCC output buffers

2023-12-22 Thread Alexander Potapenko
memory() calls for the output buffers. > The logic is the same as in [1]. > > [1] > https://github.com/zlib-ng/zlib-ng/commit/1f5ddcc009ac3511e99fc88736a9e1a6381168c5 > > Reported-by: Alexander Gordeev > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko >

Re: [PATCH v3 27/34] s390/irqflags: Do not instrument arch_local_irq_*() with KMSAN

2023-12-22 Thread Alexander Potapenko
variable. Disable instrumentation in the respective functions. They are > very small and it's easy to see that no important metadata updates are > lost because of this. > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v3 28/34] s390/mm: Define KMSAN metadata for vmalloc and modules

2023-12-21 Thread Alexander Gordeev
it more careful than x86: allocate exactly MODULES_LEN > for the module shadow and origins, and then take 2/3 of vmalloc for > the vmalloc shadow and origins. This ensures that users passing small > vmalloc= values on the command line do not cause module metadata > collisions. > >

Re: [PATCH] tracing / synthetic: Disable events after testing in synth_event_gen_test_init()

2023-12-21 Thread Alexander Graf
n fine. Cc: sta...@vger.kernel.org Fixes: 9fe41efaca084 ("tracing: Add synth event generation test module") Reported-by: Alexander Graf Signed-off-by: Steven Rostedt (Google) Thanks a bunch for the super quick turnaround time for the fix! I can confirm that I'm no longer seeing the warning

Re: [PATCH v3 33/34] s390: Implement the architecture-specific kmsan functions

2023-12-20 Thread Alexander Potapenko
shkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v3 24/34] s390/cpumf: Unpoison STCCTM output buffer

2023-12-20 Thread Alexander Potapenko
the whole dest manually with kmsan_unpoison_memory(). > > Reported-by: Alexander Gordeev > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH RESEND] mac802154: Fix uninit-value access in ieee802154_hdr_push_sechdr

2023-12-14 Thread Alexander Aring
Hi, On Thu, Dec 14, 2023 at 10:01 PM Alexander Aring wrote: > > Hi, > > On Mon, Dec 4, 2023 at 3:57 AM Miquel Raynal > wrote: > > > > Hi Zhang, > > > > zhang_shur...@foxmail.com wrote on Sat, 2 Dec 2023 22:58:52 +0800: > > > > > The syz

Re: [PATCH RESEND] mac802154: Fix uninit-value access in ieee802154_hdr_push_sechdr

2023-12-14 Thread Alexander Aring
() > > which indicates hdr.fc.security_enabled should be 0. However, it is set to > > be cb->secen before. > > Later, ieee802154_hdr_push_sechdr is invoked, causing KMSAN complains > > uninit-value issue. > > I am not too deeply involved in the security hea

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 t

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

2023-12-11 Thread Alexander Potapenko
64() definitions, depending on whether the code is built with > sanitizers or fortify. This should probably be streamlined, but in the > meantime resolve the issues by introducing the IN_BOOT_STRING_C macro, > similar to the existing IN_ARCH_STRING_C macro. > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

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
lloc_low(). > But since this question came up, I should probably add a check and > a WARN_ON_ONCE() here. Yes, please. -- Alexander Potapenko Software Engineer Google Germany GmbH Erika-Mann-Straße, 33 80636 München Geschäftsführer: Paul Manicle, Liana Sebastian Registergericht und -numme

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 *)&S390_lowcore && > + addr < (void *)(&S390_lowcore + 1)) { > + /* > +* Different lowcores accessed via S390_lowcore are described > +

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

2023-12-11 Thread Alexander Potapenko
> Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko (hope some s390 maintainer acks this as well)

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 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 v2 23/33] s390/boot: Add the KMSAN runtime stub

2023-12-08 Thread Alexander Potapenko
an_unpoison_memory() > definition. This produces some runtime overhead, but only when building > with CONFIG_KMSAN. The benefit is that it does not disturb the existing > KMSAN build logic and call sites don't need to be changed. > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

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 s390?

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 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. bui

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 precis

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

2023-12-08 Thread Alexander Potapenko
ngs when running the ftrace testsuite. > > Fix by trusting the assembly code and always unpoisoning ftrace_regs in > kprobe_ftrace_handler(). > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

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

2023-12-08 Thread Alexander Potapenko
arnings when running the ftrace testsuite. I couldn't reproduce these warnings on x86, hope you really need this change on s390 :) > Fix by trusting the architecture-specific assembly code and always > unpoisoning ftrace_regs in ftrace_ops_list_func. > > Signed-off-by: Ily

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 > &

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 g

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). Y

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

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 asse

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

2023-12-08 Thread Alexander Potapenko
ds. > > Unpoisoning the canary is not the right thing to do: only > check_canary() is supposed to ever touch it. Instead, disable KMSAN > checks around canary read accesses. > > Signed-off-by: Ilya Leoshkevich Reviewed-by: Alexander Potapenko

Re: [PATCH v2 33/33] kmsan: Enable on s390

2023-11-29 Thread Alexander Potapenko
Hi Ilya, Sorry for this taking so long, I'll probably take a closer look next week. Overall, the s390 part looks good to me, but I wanted to check the x86 behavior once again (and perhaps figure out how to avoid introducing another way to disable KMSAN). Do you happen to have a Git repo with your

Re: [PATCH 26/32] s390/mm: Define KMSAN metadata for vmalloc and modules

2023-11-17 Thread Alexander Gordeev
On Thu, Nov 16, 2023 at 04:03:13PM +0100, Alexander Potapenko wrote: Hi Alexander! > > /* allow vmalloc area to occupy up to about 1/2 of the rest virtual > > space left */ > > vmalloc_size = min(vmalloc_size, round_down(VMALLOC_END / 2, > > _REG

  1   2   3   4   5   6   7   8   9   10   >