<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in urandom_read.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>7089f85a - selftests/bpf: Add tests for symbol versioning for uprobe</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/testing/selftests/bpf/urandom_read.c#7089f85a</link>
        <description>selftests/bpf: Add tests for symbol versioning for uprobeThis exercises the newly added dynsym symbol versioning logics.Now we accept symbols in form of func, func@LIB_VERSION orfunc@@LIB_VERSION.The test rely on liburandom_read.so. For liburandom_read.so, we have:    $ nm -D liburandom_read.so                     w __cxa_finalize@GLIBC_2.17                     w __gmon_start__                     w _ITM_deregisterTMCloneTable                     w _ITM_registerTMCloneTable    0000000000000000 A LIBURANDOM_READ_1.0.0    0000000000000000 A LIBURANDOM_READ_2.0.0    000000000000081c T urandlib_api@@LIBURANDOM_READ_2.0.0    0000000000000814 T urandlib_api@LIBURANDOM_READ_1.0.0    0000000000000824 T urandlib_api_sameoffset@LIBURANDOM_READ_1.0.0    0000000000000824 T urandlib_api_sameoffset@@LIBURANDOM_READ_2.0.0    000000000000082c T urandlib_read_without_sema@@LIBURANDOM_READ_1.0.0    00000000000007c4 T urandlib_read_with_sema@@LIBURANDOM_READ_1.0.0    0000000000011018 D urandlib_read_with_sema_semaphore@@LIBURANDOM_READ_1.0.0For `urandlib_api`, specifying `urandlib_api` will cause a conflict becausethere are two symbols named urandlib_api and both are global bind.For `urandlib_api_sameoffset`, there are also two symbols in the .so, butboth are at the same offset and essentially they refer to the same functionso no conflict.Signed-off-by: Hengqi Chen &lt;hengqi.chen@gmail.com&gt;Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Reviewed-by: Alan Maguire &lt;alan.maguire@oracle.com&gt;Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;Link: https://lore.kernel.org/bpf/20230918024813.237475-4-hengqi.chen@gmail.com

            List of files:
            /linux-6.15/tools/testing/selftests/bpf/urandom_read.c</description>
        <pubDate>Mon, 18 Sep 2023 02:48:13 +0000</pubDate>
        <dc:creator>Hengqi Chen &lt;hengqi.chen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>00a0fa2d - selftests/bpf: Add urandom_read shared lib and USDTs</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/testing/selftests/bpf/urandom_read.c#00a0fa2d</link>
        <description>selftests/bpf: Add urandom_read shared lib and USDTsExtend urandom_read helper binary to include USDTs of 4 combinations:semaphore/semaphoreless (refcounted and non-refcounted) and based inexecutable or shared library. We also extend urandom_read with abilityto report it&apos;s own PID to parent process and wait for parent process toready itself up for tracing urandom_read. We utilize popen() andunderlying pipe properties for proper signaling.Once urandom_read is ready, we add few tests to validate that libbpf&apos;sUSDT attachment handles all the above combinations of semaphore (or lackof it) and static or shared library USDTs. Also, we validate that libbpfhandles shared libraries both with PID filter and without one (i.e., -1for PID argument).Having the shared library case tested with and without PID is importantbecause internal logic differs on kernels that don&apos;t support BPFcookies. On such older kernels, attaching to USDTs in shared librarieswithout specifying concrete PID doesn&apos;t work in principle, because it&apos;simpossible to determine shared library&apos;s load address to derive absoluteIPs for uprobe attachments. Without absolute IPs, it&apos;s impossible toperform correct look up of USDT spec based on uprobe&apos;s absolute IP (theonly kind available from BPF at runtime). This is not the problem onnewer kernels with BPF cookie as we don&apos;t need IP-to-ID lookup becauseBPF cookie value *is* spec ID.So having those two situations as separate subtests is good becauselibbpf CI is able to test latest selftests against old kernels (e.g.,4.9 and 5.5), so we&apos;ll be able to disable PID-less shared lib attachmentfor old kernels, but will still leave PID-specific one enabled to validatethis legacy logic is working correctly.Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;Acked-by: Dave Marchevsky &lt;davemarchevsky@fb.com&gt;Link: https://lore.kernel.org/bpf/20220404234202.331384-8-andrii@kernel.org

            List of files:
            /linux-6.15/tools/testing/selftests/bpf/urandom_read.c</description>
        <pubDate>Mon, 04 Apr 2022 23:42:02 +0000</pubDate>
        <dc:creator>Andrii Nakryiko &lt;andrii@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>f6827526 - selftests: bpf: modify urandom_read and link it non-statically</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/testing/selftests/bpf/urandom_read.c#f6827526</link>
        <description>selftests: bpf: modify urandom_read and link it non-staticallyAfter some experiences I found that urandom_read does not need to belinked statically. When the &apos;read&apos; syscall call is moved to separatenon-inlined function then bpf_get_stackid() is able to findthe executable in stack trace and extract its build_id from it.Signed-off-by: Ivan Vecera &lt;ivecera@redhat.com&gt;Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;

            List of files:
            /linux-6.15/tools/testing/selftests/bpf/urandom_read.c</description>
        <pubDate>Fri, 15 Mar 2019 20:04:14 +0000</pubDate>
        <dc:creator>Ivan Vecera &lt;ivecera@redhat.com&gt;</dc:creator>
    </item>
<item>
        <title>13790d1c - bpf: add selftest for stackmap with build_id in NMI context</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/testing/selftests/bpf/urandom_read.c#13790d1c</link>
        <description>bpf: add selftest for stackmap with build_id in NMI contextThis new test captures stackmap with build_id with hardware eventPERF_COUNT_HW_CPU_CYCLES.Because we only support one ips-to-build_id lookup per cpu in NMIcontext, stack_amap will not be able to do the lookup in this test.Therefore, we didn&apos;t do compare_stack_ips(), as it will alwasy fail.urandom_read.c is extended to run configurable cycles so that it can becaught by the perf event.Signed-off-by: Song Liu &lt;songliubraving@fb.com&gt;Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;

            List of files:
            /linux-6.15/tools/testing/selftests/bpf/urandom_read.c</description>
        <pubDate>Mon, 07 May 2018 17:50:49 +0000</pubDate>
        <dc:creator>Song Liu &lt;songliubraving@fb.com&gt;</dc:creator>
    </item>
<item>
        <title>81f77fd0 - bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/tools/testing/selftests/bpf/urandom_read.c#81f77fd0</link>
        <description>bpf: add selftest for stackmap with BPF_F_STACK_BUILD_IDtest_stacktrace_build_id() is added. It accesses tracepoint urandom_readwith &quot;dd&quot; and &quot;urandom_read&quot; and gathers stack traces. Then it reads thestack traces from the stackmap.urandom_read is a statically link binary that reads from /dev/urandom.test_stacktrace_build_id() calls readelf to read build ID of urandom_readand compares it with build ID from the stackmap.Signed-off-by: Song Liu &lt;songliubraving@fb.com&gt;Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;

            List of files:
            /linux-6.15/tools/testing/selftests/bpf/urandom_read.c</description>
        <pubDate>Wed, 14 Mar 2018 17:23:22 +0000</pubDate>
        <dc:creator>Song Liu &lt;songliubraving@fb.com&gt;</dc:creator>
    </item>
</channel>
</rss>
