public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/26152] New: _struct_compat_timex_u() function doesn't work on rhel8
@ 2020-06-22 18:45 wcohen at redhat dot com
  2020-06-29 15:39 ` [Bug tapsets/26152] " wcohen at redhat dot com
  2023-10-04 14:30 ` wcohen at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2020-06-22 18:45 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=26152

            Bug ID: 26152
           Summary: _struct_compat_timex_u() function doesn't work on
                    rhel8
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: wcohen at redhat dot com
  Target Milestone: ---

When running the current snapshot of systemtap on rhel8 some of the examples
(errsnoop and strace) that probe all the syscalls were failing.  Tracked the
problem down to the _struct_compat_timex_u() function.  This doesn't appear to
be a problem with the newer kernels in feora 32.

$ rpm -q kernel
kernel-4.18.0-216.el8.x86_64
$ stap -V
Systemtap translator/driver (version 4.4/0.180, rpm 4.4-1.202006221421.el8)
Copyright (C) 2005-2020 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.32 ... 5.7.0
enabled features: AVAHI BOOST_STRING_REF DYNINST BPF JAVA PYTHON3 LIBRPM
LIBSQLITE3 LIBVIRT LIBXML2 NLS NSS READLINE MONITOR_LIBS
$ stap -p4 -e 'probe syscall.clock_adjtime {printf("%s\n", tx_uaddr_str)}'
/tmp/stapjqCFmW/stap_bf428e306108d6ed4ee7e688fdb3a93d_67608_src.c: In function
‘function___global__struct_compat_timex_u__overload_0’:
/tmp/stapjqCFmW/stap_bf428e306108d6ed4ee7e688fdb3a93d_67608_src.c:4195:22:
error: storage size of ‘ts’ isn’t known
  struct compat_timex ts;
                      ^~
/tmp/stapjqCFmW/stap_bf428e306108d6ed4ee7e688fdb3a93d_67608_src.c:4203:14:
error: invalid application of ‘sizeof’ to incomplete type ‘struct old_timex32’
       sizeof(struct compat_timex)) == 0)
              ^~~~~~
make[1]: *** [scripts/Makefile.build:315:
/tmp/stapjqCFmW/stap_bf428e306108d6ed4ee7e688fdb3a93d_67608_src.o] Error 1
make: *** [Makefile:1545: _module_/tmp/stapjqCFmW] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed.  [man error::pass4]

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tapsets/26152] _struct_compat_timex_u() function doesn't work on rhel8
  2020-06-22 18:45 [Bug tapsets/26152] New: _struct_compat_timex_u() function doesn't work on rhel8 wcohen at redhat dot com
@ 2020-06-29 15:39 ` wcohen at redhat dot com
  2023-10-04 14:30 ` wcohen at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2020-06-29 15:39 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=26152

--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
git bisect showed that the problem occurs due to:


commit 4ab42baafca69953229422923ec0721abebb570f
Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Wed Dec 11 15:28:46 2019 -0500

    tapset: _struct_compat_timex_u() support after renaming to old_timex32

    Kernel commit 4d5f007eedb74d (v5.1+) renames the old compat_timex
    structure to old_timex32.


The CONFIG_COMPAT_32BIT_TIME was added to kernels before struct old_timex32.
CONFIG_COMPAT_32BIT_TIME available in 4.18 kenels, but old_timex32 wasn't added
to kernels until:

Author: Arnd Bergmann <arnd@arndb.de>  2019-01-02 07:28:47
Committer: Arnd Bergmann <arnd@arndb.de>  2019-02-06 18:13:27
Parent: 805089c2f77047d81f47ddc227435d606ceb180e (syscalls: remove obsolete
__IGNORE_ macros)
Child:  2c620ff93d9fbd5d644760d4c21d389078ec1080 (time: Add struct
__kernel_timex)
Branches: master, remotes/origin/master, wcohen/gcc9
Follows: v5.0-rc2
Precedes: v5.1-rc1

    time: make adjtime compat handling available for 32 bit

    We want to reuse the compat_timex handling on 32-bit architectures the
    same way we are using the compat handling for timespec when moving to
    64-bit time_t.

    Move all definitions related to compat_timex out of the compat code
    into the normal timekeeping code, along with a rename to old_timex32,
    corresponding to the timespec/timeval structures, and make it controlled
    by CONFIG_COMPAT_32BIT_TIME, which 32-bit architectures will then select.

    Signed-off-by: Arnd Bergmann <arnd@arndb.de>

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tapsets/26152] _struct_compat_timex_u() function doesn't work on rhel8
  2020-06-22 18:45 [Bug tapsets/26152] New: _struct_compat_timex_u() function doesn't work on rhel8 wcohen at redhat dot com
  2020-06-29 15:39 ` [Bug tapsets/26152] " wcohen at redhat dot com
@ 2023-10-04 14:30 ` wcohen at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2023-10-04 14:30 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=26152

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from William Cohen <wcohen at redhat dot com> ---
This works on current RHEL8 kernels with systemtap git commit ca71442b9

[wcohen@rhel8 systemtap]$ uname -a
Linux rhel8 4.18.0-514.el8.x86_64 #1 SMP Tue Sep 19 10:07:12 EDT 2023 x86_64
x86_64 x86_64 GNU/Linux
[wcohen@rhel8 systemtap]$ ../install/bin/stap -V
Systemtap translator/driver (version 5.0/0.189, release-4.8-147-gca71442b)
Copyright (C) 2005-2023 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.32 ... 6.5
enabled features: AVAHI BOOST_STRING_REF DYNINST BPF JAVA PYTHON2 PYTHON3
LIBRPM LIBSQLITE3 LIBVIRT LIBXML2 NLS NSS READLINE MONITOR_LIBS JSON_C
[wcohen@rhel8 systemtap]$ ../install/bin/stap  -p4 -e 'probe
syscall.clock_adjtime {printf("%s\n", tx_uaddr_str)}'
/home/wcohen/.systemtap/cache/a0/stap_a0317735832db1578751089e63f33b99_70663.ko

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-04 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22 18:45 [Bug tapsets/26152] New: _struct_compat_timex_u() function doesn't work on rhel8 wcohen at redhat dot com
2020-06-29 15:39 ` [Bug tapsets/26152] " wcohen at redhat dot com
2023-10-04 14:30 ` wcohen at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).