Hi,
No progress on this bug report, so it is still unpatched in 6.3-rc5 so I am
submitting again.
Please see the relevant data at the bottom:
On 27. 01. 2023. 19:36, Mirsad Goran Todorovac wrote:
> Hi all,
>
> I came across a memory leak with the vanilla mainline Torvalds tree kernel
> with MGLRU and CONFIG_KMEMLEAK enabled:
>
> unreferenced object 0xffff8d7c92ad5180 (size 192):
> comm "ftracetest", pid 2738512, jiffies 4335176273 (age 4842.976s)
> hex dump (first 32 bytes):
> c0 59 ad 92 7c 8d ff ff 60 dd d7 31 7c 8d ff ff .Y..|...`..1|...
> 60 55 df 97 ff ff ff ff 09 00 02 00 00 00 00 00 `U..............
> backtrace:
> [<ffffffff965d9bf0>] __kmem_cache_alloc_node+0x1e0/0x340
> [<ffffffff96556dda>] kmalloc_trace+0x2a/0xa0
> [<ffffffff964382fc>] tracing_log_err+0x16c/0x1b0
> [<ffffffff96451963>] append_filter_err+0x113/0x1d0
> [<ffffffff96453c0a>] create_event_filter+0xba/0xe0
> [<ffffffff96454b18>] set_trigger_filter+0x98/0x160
> [<ffffffff96456554>] event_trigger_parse+0x104/0x180
> [<ffffffff96455823>] trigger_process_regex+0xc3/0x110
> [<ffffffff964558f7>] event_trigger_write+0x77/0xe0
> [<ffffffff96623a41>] vfs_write+0xd1/0x420
> [<ffffffff9662413b>] ksys_write+0x7b/0x100
> [<ffffffff966241e9>] __x64_sys_write+0x19/0x20
> [<ffffffff971c9188>] do_syscall_64+0x58/0x80
> [<ffffffff972000aa>] entry_SYSCALL_64_after_hwframe+0x72/0xdc
> unreferenced object 0xffff8d7b076be000 (size 32):
> comm "ftracetest", pid 2738512, jiffies 4335176273 (age 4842.976s)
> hex dump (first 32 bytes):
> 0a 20 20 43 6f 6d 6d 61 6e 64 3a 20 61 0a 00 00 . Command: a...
> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> backtrace:
> [<ffffffff965d9bf0>] __kmem_cache_alloc_node+0x1e0/0x340
> [<ffffffff96557a8d>] __kmalloc+0x4d/0xd0
> [<ffffffff96438314>] tracing_log_err+0x184/0x1b0
> [<ffffffff96451963>] append_filter_err+0x113/0x1d0
> [<ffffffff96453c0a>] create_event_filter+0xba/0xe0
> [<ffffffff96454b18>] set_trigger_filter+0x98/0x160
> [<ffffffff96456554>] event_trigger_parse+0x104/0x180
> [<ffffffff96455823>] trigger_process_regex+0xc3/0x110
> [<ffffffff964558f7>] event_trigger_write+0x77/0xe0
> [<ffffffff96623a41>] vfs_write+0xd1/0x420
> [<ffffffff9662413b>] ksys_write+0x7b/0x100
> [<ffffffff966241e9>] __x64_sys_write+0x19/0x20
> [<ffffffff971c9188>] do_syscall_64+0x58/0x80
> [<ffffffff972000aa>] entry_SYSCALL_64_after_hwframe+0x72/0xdc
> unreferenced object 0xffff8d7c92ad59c0 (size 192):
> comm "ftracetest", pid 2738512, jiffies 4335176280 (age 4843.088s)
> hex dump (first 32 bytes):
> c0 5c ad 92 7c 8d ff ff 80 51 ad 92 7c 8d ff ff .\..|....Q..|...
> 60 55 df 97 ff ff ff ff 01 00 0b 00 00 00 00 00 `U..............
> backtrace:
> [<ffffffff965d9bf0>] __kmem_cache_alloc_node+0x1e0/0x340
> [<ffffffff96556dda>] kmalloc_trace+0x2a/0xa0
> [<ffffffff964382fc>] tracing_log_err+0x16c/0x1b0
> [<ffffffff96451963>] append_filter_err+0x113/0x1d0
> [<ffffffff96453c0a>] create_event_filter+0xba/0xe0
> [<ffffffff96454b18>] set_trigger_filter+0x98/0x160
> [<ffffffff96456554>] event_trigger_parse+0x104/0x180
> [<ffffffff96455823>] trigger_process_regex+0xc3/0x110
> [<ffffffff964558f7>] event_trigger_write+0x77/0xe0
> [<ffffffff96623a41>] vfs_write+0xd1/0x420
> [<ffffffff9662413b>] ksys_write+0x7b/0x100
> [<ffffffff966241e9>] __x64_sys_write+0x19/0x20
> [<ffffffff971c9188>] do_syscall_64+0x58/0x80
> [<ffffffff972000aa>] entry_SYSCALL_64_after_hwframe+0x72/0xdc
>
> The bug was noticed on Lenovo desktop 10TX000VCR (LENOVO_MT_10TX_BU_Lenovo_FM_V530S-07ICB)
> running AlmaLinux 8.7 (Stone Smilodon), a CentOS clone, with the compiler:
>
> mtodorov@domac:~/linux/kernel/linux_torvalds$ gcc --version
> gcc (Debian 8.3.0-6) 8.3.0
> Copyright (C) 2018 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> mtodorov@domac:~/linux/kernel/linux_torvalds$
>
> Bisecting gave the following culprit commit:
>
> git bisect good a92ce570c81dc0feaeb12a429b4bc65686d17967
> # good: [c6f613e5f35b0e2154d5ca12f0e8e0be0c19be9a] ipmi/watchdog: use strscpy() to instead of strncpy()
> git bisect good c6f613e5f35b0e2154d5ca12f0e8e0be0c19be9a
> # good: [90b12f423d3c8a89424c7bdde18e1923dfd0941e] Merge tag 'for-linus-6.2-1' of https://github.com/cminyard/linux-ipmi
> git bisect good 90b12f423d3c8a89424c7bdde18e1923dfd0941e
> # first bad commit: [71946a25f357a51dcce849367501d7fb04c0465b] Merge tag 'mmc-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
>
> The commit was merged on December 13th 2022.
>
> It is a huge commit.
>
> The selftests/ftrace/ftracetest triggers this leak, sometimes several times in a run.
> ftracetest requires root permission to run, but I haven't yet realised whether a non-superuser
> could devise an automated script to abuse this leak exhausting all kernel's memory.
>
> Non-root user gets a EPERM error when trying to access /proc/sys/kernel internals:
>
> [marvin@pc-mtodorov linux_torvalds]$ tools/testing/selftests/ftrace/ftracetest
> Error: this must be run by root user
> tools/testing/selftests/ftrace/ftracetest: line 46: /proc/sys/kernel/sched_rt_runtime_us: Permission denied
> [marvin@pc-mtodorov linux_torvalds]$
>
> Hope this helps.
>
> According to the Code of Conduct, I have Cc:-ed maintainers from get_maintainers.pl and
> I will add Thorsten because this is sort of a regression :-)
The debug output is like follows:
unreferenced object 0xffff93a3dc2d1e18 (size 192):
comm "ftracetest", pid 12451, jiffies 4295087353 (age 463.476s)
hex dump (first 32 bytes):
20 08 2d dc a3 93 ff ff c0 bd 5d cd a3 93 ff ff .-.......].....
c0 bf 85 b6 ff ff ff ff 09 00 02 00 00 00 00 00 ................
backtrace:
[<ffffffffb4afb23c>] slab_post_alloc_hook+0x8c/0x3e0
[<ffffffffb4b02b19>] __kmem_cache_alloc_node+0x1d9/0x2a0
[<ffffffffb4a7693e>] kmalloc_trace+0x2e/0xc0
[<ffffffffb493a8fb>] tracing_log_err+0x18b/0x1d0
[<ffffffffb4959049>] append_filter_err.isra.13+0x119/0x190
[<ffffffffb495a89f>] create_filter+0xbf/0xe0
[<ffffffffb495ab10>] create_event_filter+0x10/0x20
[<ffffffffb495c040>] set_trigger_filter+0xa0/0x180
[<ffffffffb495d745>] event_trigger_parse+0xf5/0x160
[<ffffffffb495c889>] trigger_process_regex+0xc9/0x120
[<ffffffffb495c976>] event_trigger_write+0x86/0xf0
[<ffffffffb4b52dc2>] vfs_write+0xf2/0x520
[<ffffffffb4b533d8>] ksys_write+0x68/0xe0
[<ffffffffb4b5347e>] __x64_sys_write+0x1e/0x30
[<ffffffffb586619c>] do_syscall_64+0x5c/0x90
[<ffffffffb5a000ae>] entry_SYSCALL_64_after_hwframe+0x72/0xdc
unreferenced object 0xffff93a3873dda20 (size 32):
comm "ftracetest", pid 12451, jiffies 4295087353 (age 463.476s)
hex dump (first 32 bytes):
0a 20 20 43 6f 6d 6d 61 6e 64 3a 20 61 0a 00 00 . Command: a...
00 00 cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................
backtrace:
[<ffffffffb4afb23c>] slab_post_alloc_hook+0x8c/0x3e0
[<ffffffffb4b02b19>] __kmem_cache_alloc_node+0x1d9/0x2a0
[<ffffffffb4a77785>] __kmalloc+0x55/0x160
[<ffffffffb493a913>] tracing_log_err+0x1a3/0x1d0
[<ffffffffb4959049>] append_filter_err.isra.13+0x119/0x190
[<ffffffffb495a89f>] create_filter+0xbf/0xe0
[<ffffffffb495ab10>] create_event_filter+0x10/0x20
[<ffffffffb495c040>] set_trigger_filter+0xa0/0x180
[<ffffffffb495d745>] event_trigger_parse+0xf5/0x160
[<ffffffffb495c889>] trigger_process_regex+0xc9/0x120
[<ffffffffb495c976>] event_trigger_write+0x86/0xf0
[<ffffffffb4b52dc2>] vfs_write+0xf2/0x520
[<ffffffffb4b533d8>] ksys_write+0x68/0xe0
[<ffffffffb4b5347e>] __x64_sys_write+0x1e/0x30
[<ffffffffb586619c>] do_syscall_64+0x5c/0x90
[<ffffffffb5a000ae>] entry_SYSCALL_64_after_hwframe+0x72/0xdc
Please find the complete debug info at the URL:
https://domac.alu.unizg.hr/~mtodorov/linux/bugreports/ftracetest/
Bisect log is [edited]:
> git bisect good a92ce570c81dc0feaeb12a429b4bc65686d17967
> # good: [c6f613e5f35b0e2154d5ca12f0e8e0be0c19be9a] ipmi/watchdog: use strscpy() to instead of strncpy()
> git bisect good c6f613e5f35b0e2154d5ca12f0e8e0be0c19be9a
> # good: [90b12f423d3c8a89424c7bdde18e1923dfd0941e] Merge tag 'for-linus-6.2-1' of https://github.com/cminyard/linux-ipmi
> git bisect good 90b12f423d3c8a89424c7bdde18e1923dfd0941e
> # first bad commit: [71946a25f357a51dcce849367501d7fb04c0465b] Merge tag 'mmc-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
>
> The commit was merged on December 13th 2022.
The amount of applied diffs in the culprit commit 71946a25f357a51dcce849367501d7fb04c0465b
prevents me from bisecting further - I do not know which changes depend of which, and which
can be tested independently.
Hopefully I might come up with a reproducer, but I need some feedback first. Maybe there
are ways to narrow down the lines of code that could have caused the leaks, yet I am
completely new to the kernel/trace subtree.
Apologies for not Cc:ing Ulf nine weeks ago, but it was an omission, not deliberate act.
Best regards,
Mirsad
--
Mirsad Goran Todorovac
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb, Republic of Croatia
The European Union
"I see something approaching fast ... Will it be friends with me?"
o6irnndpcv7 writes via Kernel.org Bugzilla:
Hello and good day!
I think I found a missing dependency.
In case of setting CONFIG_FIPS_SIGNATURE_SELFTEST, CONFIG_CRYPTO_SHA256 also needs to be set. But not as module.
Failing to do so results in an early kernel panic during boot.
Tested on linux-6.1.12-gentoo and linux-6.1.19-gentoo.
Thanks,
sephora
View: https://bugzilla.kernel.org/show_bug.cgi?id=217293#c0
You can reply to this message to join the discussion.
--
Deet-doot-dot, I am a bot.
Kernel.org Bugzilla (peebz 0.1)
Hi All,
In TDX guest, the attestation process is used to verify the TDX guest
trustworthiness to other entities before provisioning secrets to the
guest.
The TDX guest attestation process consists of two steps:
1. TDREPORT generation
2. Quote generation.
The First step (TDREPORT generation) involves getting the TDX guest
measurement data in the format of TDREPORT which is further used to
validate the authenticity of the TDX guest. The second step involves
sending the TDREPORT to a Quoting Enclave (QE) server to generate a
remotely verifiable Quote. TDREPORT by design can only be verified on
the local platform. To support remote verification of the TDREPORT,
TDX leverages Intel SGX Quoting Enclave to verify the TDREPORT
locally and convert it to a remotely verifiable Quote. Although
attestation software can use communication methods like TCP/IP or
vsock to send the TDREPORT to QE, not all platforms support these
communication models. So TDX GHCI specification [1] defines a method
for Quote generation via hypercalls. Please check the discussion from
Google [2] and Alibaba [3] which clarifies the need for hypercall based
Quote generation support. This patch set adds this support.
Support for TDREPORT generation already exists in the TDX guest driver.
This patchset extends the same driver to add the Quote generation
support.
Following are the details of the patch set:
Patch 1/3 -> Adds event notification IRQ support.
Patch 2/3 -> Adds Quote generation support.
Patch 3/3 -> Adds selftest support for Quote generation feature.
[1] https://cdrdv2.intel.com/v1/dl/getContent/726790, section titled "TDG.VP.VMCALL<GetQuote>".
[2] https://lore.kernel.org/lkml/CAAYXXYxxs2zy_978GJDwKfX5Hud503gPc8=1kQ-+JwG_k…
[3] https://lore.kernel.org/lkml/a69faebb-11e8-b386-d591-dbd08330b008@linux.ali…
Kuppuswamy Sathyanarayanan (3):
x86/tdx: Add TDX Guest event notify interrupt support
virt: tdx-guest: Add Quote generation support
selftests/tdx: Test GetQuote TDX attestation feature
Documentation/virt/coco/tdx-guest.rst | 11 +
arch/x86/coco/tdx/tdx.c | 203 +++++++++++++++
arch/x86/include/asm/tdx.h | 8 +
drivers/virt/coco/tdx-guest/tdx-guest.c | 249 ++++++++++++++++++-
include/uapi/linux/tdx-guest.h | 44 ++++
tools/testing/selftests/tdx/tdx_guest_test.c | 68 ++++-
6 files changed, 575 insertions(+), 8 deletions(-)
--
2.34.1
This change fixes flakiness in the BIDIRECTIONAL test:
# [is_pkt_valid] expected length [60], got length [90]
not ok 1 FAIL: SKB BUSY-POLL BIDIRECTIONAL
When IPv6 is enabled, the interface will periodically send MLDv1 and
MLDv2 packets. These packets can cause the BIDIRECTIONAL test to fail
since it uses VETH0 for RX.
For other tests, this was not a problem since they only receive on VETH1
and IPv6 was already disabled on VETH0.
Fixes: a89052572ebb ("selftests/bpf: Xsk selftests framework")
Signed-off-by: Kal Conley <kal.conley(a)dectris.com>
---
tools/testing/selftests/bpf/test_xsk.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/bpf/test_xsk.sh b/tools/testing/selftests/bpf/test_xsk.sh
index b077cf58f825..377fb157a57c 100755
--- a/tools/testing/selftests/bpf/test_xsk.sh
+++ b/tools/testing/selftests/bpf/test_xsk.sh
@@ -116,6 +116,7 @@ setup_vethPairs() {
ip link add ${VETH0} numtxqueues 4 numrxqueues 4 type veth peer name ${VETH1} numtxqueues 4 numrxqueues 4
if [ -f /proc/net/if_inet6 ]; then
echo 1 > /proc/sys/net/ipv6/conf/${VETH0}/disable_ipv6
+ echo 1 > /proc/sys/net/ipv6/conf/${VETH1}/disable_ipv6
fi
if [[ $verbose -eq 1 ]]; then
echo "setting up ${VETH1}"
--
2.39.2
All related to the pages code, and the latter are reproducible with a
simple test.
Jason Gunthorpe (4):
iommufd: Check for uptr overflow
iommufd: Fix unpinning of pages when an access is present
iommufd: Do not corrupt the pfn list when doing batch carry
iommufd/selftest: Cover domain unmap with huge pages and access
drivers/iommu/iommufd/pages.c | 16 ++++++++++--
tools/testing/selftests/iommu/iommufd.c | 34 +++++++++++++++++++++++++
2 files changed, 48 insertions(+), 2 deletions(-)
base-commit: 9c7d518b9b71f4d5ca3d12952cda3417ac6126c4
--
2.40.0
Dzień dobry,
chcielibyśmy zapewnić Państwu kompleksowe rozwiązania, jeśli chodzi o system monitoringu GPS.
Precyzyjne monitorowanie pojazdów na mapach cyfrowych, śledzenie ich parametrów eksploatacyjnych w czasie rzeczywistym oraz kontrola paliwa to kluczowe funkcjonalności naszego systemu.
Organizowanie pracy pracowników jest dzięki temu prostsze i bardziej efektywne, a oszczędności i optymalizacja w zakresie ponoszonych kosztów, mają dla każdego przedsiębiorcy ogromne znaczenie.
Dopasujemy naszą ofertę do Państwa oczekiwań i potrzeb organizacji. Czy moglibyśmy porozmawiać o naszej propozycji?
Pozdrawiam
Krystian Wieczorek