[Bug tapsets/26152] New: _struct_compat_timex_u() function doesn't work on rhel8

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug tapsets/26152] New: _struct_compat_timex_u() function doesn't work on rhel8

Sourceware - systemtap mailing list
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.
Reply | Threaded
Open this post in threaded view
|

[Bug tapsets/26152] _struct_compat_timex_u() function doesn't work on rhel8

Sourceware - systemtap mailing list
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 <[hidden email]>
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 <[hidden email]>  2019-01-02 07:28:47
Committer: Arnd Bergmann <[hidden email]>  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 <[hidden email]>

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