* [PATCH] test: skip when /proc/kallmodsyms is not present
@ 2026-02-09 18:34 Kris Van Hees
2026-02-09 18:55 ` Eugene Loh
0 siblings, 1 reply; 4+ messages in thread
From: Kris Van Hees @ 2026-02-09 18:34 UTC (permalink / raw)
To: dtrace, dtrace-devel
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
---
test/unittest/consumer/tst.merge_ranges_bug25767469.x | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/unittest/consumer/tst.merge_ranges_bug25767469.x b/test/unittest/consumer/tst.merge_ranges_bug25767469.x
index 7e265f2f..a92690ad 100755
--- a/test/unittest/consumer/tst.merge_ranges_bug25767469.x
+++ b/test/unittest/consumer/tst.merge_ranges_bug25767469.x
@@ -1,10 +1,14 @@
#!/bin/bash
#
# Oracle Linux DTrace.
-# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.
+# If /proc/kallmodsyms does not exist, there is nothing to test.
+
+[[ -r /proc/kallmodsyms ]] || exit 2
+
# The test depends on a kernel fix to report kernel (and built-in-module)
# symbol sizes correctly in /proc/kallmodsyms. An easy check is to count
# how many kernel and built-in-module symbols (that is, symbols that appear
--
2.51.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] test: skip when /proc/kallmodsyms is not present
2026-02-09 18:34 [PATCH] test: skip when /proc/kallmodsyms is not present Kris Van Hees
@ 2026-02-09 18:55 ` Eugene Loh
2026-02-09 19:04 ` Kris Van Hees
0 siblings, 1 reply; 4+ messages in thread
From: Eugene Loh @ 2026-02-09 18:55 UTC (permalink / raw)
To: Kris Van Hees, dtrace, dtrace-devel
I'm rusty on this stuff, but maybe you can help me out. What happens
with the test if kallmodsyms is not there? The test does not directly
rely on that file. The test simply makes libdtrace calls, and
dt_modsym_update() can fail over to kallsyms if kallmodsyms is not present.
On 2/9/26 13:34, Kris Van Hees wrote:
> Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
> ---
> test/unittest/consumer/tst.merge_ranges_bug25767469.x | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/test/unittest/consumer/tst.merge_ranges_bug25767469.x b/test/unittest/consumer/tst.merge_ranges_bug25767469.x
> index 7e265f2f..a92690ad 100755
> --- a/test/unittest/consumer/tst.merge_ranges_bug25767469.x
> +++ b/test/unittest/consumer/tst.merge_ranges_bug25767469.x
> @@ -1,10 +1,14 @@
> #!/bin/bash
> #
> # Oracle Linux DTrace.
> -# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
> +# Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
> # Licensed under the Universal Permissive License v 1.0 as shown at
> # http://oss.oracle.com/licenses/upl.
>
> +# If /proc/kallmodsyms does not exist, there is nothing to test.
> +
> +[[ -r /proc/kallmodsyms ]] || exit 2
> +
> # The test depends on a kernel fix to report kernel (and built-in-module)
> # symbol sizes correctly in /proc/kallmodsyms. An easy check is to count
> # how many kernel and built-in-module symbols (that is, symbols that appear
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] test: skip when /proc/kallmodsyms is not present
2026-02-09 18:55 ` Eugene Loh
@ 2026-02-09 19:04 ` Kris Van Hees
2026-02-09 19:13 ` Eugene Loh
0 siblings, 1 reply; 4+ messages in thread
From: Kris Van Hees @ 2026-02-09 19:04 UTC (permalink / raw)
To: Eugene Loh; +Cc: Kris Van Hees, dtrace, dtrace-devel
On Mon, Feb 09, 2026 at 01:55:03PM -0500, Eugene Loh wrote:
> I'm rusty on this stuff, but maybe you can help me out. What happens with
> the test if kallmodsyms is not there? The test does not directly rely on
> that file. The test simply makes libdtrace calls, and dt_modsym_update()
> can fail over to kallsyms if kallmodsyms is not present.
The .x file depends on being able to read kallmodsyms to determine whether
the kernel fix that the test depends on is in the running kernel, which
cannot be when kallmodsyms isn't even in the kernel.
Without kallmodsyms, this test becomes a verifier for the kallsyms data that
the kernel provides, and then only in terms of loaded modules, which is pretty
much guaranteed to be correct or the kernel modules would be conflicting and
cause horrible crashes of the kernel.
With modules.builtin.ranges, the association of an address with a builtin
module is done by performing a lookup of the symbol address in the data that
modules.builtin.ranges provides. If that has overlapping ranges, then this
is a kernel bug, and this test wouldn't be able to detect it anyway.
So, if kallmodsyms is not present, the test is useless.
> On 2/9/26 13:34, Kris Van Hees wrote:
> > Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
> > ---
> > test/unittest/consumer/tst.merge_ranges_bug25767469.x | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/test/unittest/consumer/tst.merge_ranges_bug25767469.x b/test/unittest/consumer/tst.merge_ranges_bug25767469.x
> > index 7e265f2f..a92690ad 100755
> > --- a/test/unittest/consumer/tst.merge_ranges_bug25767469.x
> > +++ b/test/unittest/consumer/tst.merge_ranges_bug25767469.x
> > @@ -1,10 +1,14 @@
> > #!/bin/bash
> > #
> > # Oracle Linux DTrace.
> > -# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
> > +# Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
> > # Licensed under the Universal Permissive License v 1.0 as shown at
> > # http://oss.oracle.com/licenses/upl.
> > +# If /proc/kallmodsyms does not exist, there is nothing to test.
> > +
> > +[[ -r /proc/kallmodsyms ]] || exit 2
> > +
> > # The test depends on a kernel fix to report kernel (and built-in-module)
> > # symbol sizes correctly in /proc/kallmodsyms. An easy check is to count
> > # how many kernel and built-in-module symbols (that is, symbols that appear
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] test: skip when /proc/kallmodsyms is not present
2026-02-09 19:04 ` Kris Van Hees
@ 2026-02-09 19:13 ` Eugene Loh
0 siblings, 0 replies; 4+ messages in thread
From: Eugene Loh @ 2026-02-09 19:13 UTC (permalink / raw)
To: Kris Van Hees; +Cc: dtrace, dtrace-devel
Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
On 2/9/26 14:04, Kris Van Hees wrote:
> On Mon, Feb 09, 2026 at 01:55:03PM -0500, Eugene Loh wrote:
>> I'm rusty on this stuff, but maybe you can help me out. What happens with
>> the test if kallmodsyms is not there? The test does not directly rely on
>> that file. The test simply makes libdtrace calls, and dt_modsym_update()
>> can fail over to kallsyms if kallmodsyms is not present.
> The .x file depends on being able to read kallmodsyms to determine whether
> the kernel fix that the test depends on is in the running kernel, which
> cannot be when kallmodsyms isn't even in the kernel.
>
> Without kallmodsyms, this test becomes a verifier for the kallsyms data that
> the kernel provides, and then only in terms of loaded modules, which is pretty
> much guaranteed to be correct or the kernel modules would be conflicting and
> cause horrible crashes of the kernel.
>
> With modules.builtin.ranges, the association of an address with a builtin
> module is done by performing a lookup of the symbol address in the data that
> modules.builtin.ranges provides. If that has overlapping ranges, then this
> is a kernel bug, and this test wouldn't be able to detect it anyway.
>
> So, if kallmodsyms is not present, the test is useless.
>
>> On 2/9/26 13:34, Kris Van Hees wrote:
>>> Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
>>> ---
>>> test/unittest/consumer/tst.merge_ranges_bug25767469.x | 6 +++++-
>>> 1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/test/unittest/consumer/tst.merge_ranges_bug25767469.x b/test/unittest/consumer/tst.merge_ranges_bug25767469.x
>>> index 7e265f2f..a92690ad 100755
>>> --- a/test/unittest/consumer/tst.merge_ranges_bug25767469.x
>>> +++ b/test/unittest/consumer/tst.merge_ranges_bug25767469.x
>>> @@ -1,10 +1,14 @@
>>> #!/bin/bash
>>> #
>>> # Oracle Linux DTrace.
>>> -# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
>>> +# Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved.
>>> # Licensed under the Universal Permissive License v 1.0 as shown at
>>> # http://oss.oracle.com/licenses/upl.
>>> +# If /proc/kallmodsyms does not exist, there is nothing to test.
>>> +
>>> +[[ -r /proc/kallmodsyms ]] || exit 2
>>> +
>>> # The test depends on a kernel fix to report kernel (and built-in-module)
>>> # symbol sizes correctly in /proc/kallmodsyms. An easy check is to count
>>> # how many kernel and built-in-module symbols (that is, symbols that appear
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-02-09 19:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-09 18:34 [PATCH] test: skip when /proc/kallmodsyms is not present Kris Van Hees
2026-02-09 18:55 ` Eugene Loh
2026-02-09 19:04 ` Kris Van Hees
2026-02-09 19:13 ` Eugene Loh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox