This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/22036] New: compiler errors when using tapset/linux/ioblock.stp


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

            Bug ID: 22036
           Summary: compiler errors when using tapset/linux/ioblock.stp
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: dsmith at redhat dot com
  Target Milestone: ---

We're getting compile errors when using tapset/linux/ioblock.stp on RHEL7
ppc64le (3.10.0-693.el7.ppc64le):

====
# stap --compatible=2.9 -vp4 ../src.copy/testsuite/buildok/ioblock-embedded.stp
Pass 1: parsed user script and 488 library scripts using
166400virt/49152res/7744shr/37056data kb, in 660usr/0sys/661real ms.
Pass 2: analyzed script: 1 probe, 21 functions, 2 embeds, 2 globals using
248384virt/132736res/9344shr/119040data kb, in 740usr/50sys/808real ms.
Pass 3: translated to C into
"/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c" using
248384virt/132800res/9408shr/119040data kb, in 0usr/0sys/2real ms.
In file included from /usr/local/share/systemtap/runtime/linux/runtime.h:210:0,
                 from /usr/local/share/systemtap/runtime/runtime.h:26,
                 from
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c:25:
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c: In function
‘function___global_bio_op__overload_0’:
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c:1072:19:
error: ‘struct bio’ has no member named ‘bi_opf’
  (void)kread(&(bio->bi_opf));
                   ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:663:15: note: in
definition of macro ‘__Xread’
   ( (typeof(*(ptr))) Xderef(sizeof(*(ptr)), (ptr)) )
               ^
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c:1072:8: note:
in expansion of macro ‘kread’
  (void)kread(&(bio->bi_opf));
        ^
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c:1072:19:
error: ‘struct bio’ has no member named ‘bi_opf’
  (void)kread(&(bio->bi_opf));
                   ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:495:13: note: in
definition of macro ‘_stp_deref’
     switch (size)       \
             ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:663:22: note: in
expansion of macro ‘kderef’
   ( (typeof(*(ptr))) Xderef(sizeof(*(ptr)), (ptr)) )
                      ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:669:20: note: in
expansion of macro ‘__Xread’
 #define kread(ptr) __Xread((ptr), kderef)
                    ^
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c:1072:8: note:
in expansion of macro ‘kread’
  (void)kread(&(bio->bi_opf));
        ^
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c:1072:19:
error: ‘struct bio’ has no member named ‘bi_opf’
  (void)kread(&(bio->bi_opf));
                   ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:499:10: note: in
definition of macro ‘_stp_deref’
   (&_v, (size), (void *)(uintptr_t)(addr), (seg)); \
          ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:663:22: note: in
expansion of macro ‘kderef’
   ( (typeof(*(ptr))) Xderef(sizeof(*(ptr)), (ptr)) )
                      ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:669:20: note: in
expansion of macro ‘__Xread’
 #define kread(ptr) __Xread((ptr), kderef)
                    ^
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c:1072:8: note:
in expansion of macro ‘kread’
  (void)kread(&(bio->bi_opf));
        ^
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c:1072:19:
error: ‘struct bio’ has no member named ‘bi_opf’
  (void)kread(&(bio->bi_opf));
                   ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:499:37: note: in
definition of macro ‘_stp_deref’
   (&_v, (size), (void *)(uintptr_t)(addr), (seg)); \
                                     ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:663:22: note: in
expansion of macro ‘kderef’
   ( (typeof(*(ptr))) Xderef(sizeof(*(ptr)), (ptr)) )
                      ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:669:20: note: in
expansion of macro ‘__Xread’
 #define kread(ptr) __Xread((ptr), kderef)
                    ^
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c:1072:8: note:
in expansion of macro ‘kread’
  (void)kread(&(bio->bi_opf));
        ^
In file included from
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:24:0,
                 from /usr/local/share/systemtap/runtime/linux/runtime.h:210,
                 from /usr/local/share/systemtap/runtime/runtime.h:26,
                 from
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c:25:
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c:1072:19:
error: ‘struct bio’ has no member named ‘bi_opf’
  (void)kread(&(bio->bi_opf));
                   ^
/usr/local/share/systemtap/runtime/linux/../loc2c-runtime.h:232:43: note: in
definition of macro ‘DEREF_FAULT’
       STAP_MSG_LOC2C_01, (long)(intptr_t)(addr));      \
                                           ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:617:21: note: in
expansion of macro ‘_stp_deref’
 #define kderef(s,a) _stp_deref(s,a,KERNEL_DS)
                     ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:663:22: note: in
expansion of macro ‘kderef’
   ( (typeof(*(ptr))) Xderef(sizeof(*(ptr)), (ptr)) )
                      ^
/usr/local/share/systemtap/runtime/linux/loc2c-runtime.h:669:20: note: in
expansion of macro ‘__Xread’
 #define kread(ptr) __Xread((ptr), kderef)
                    ^
/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.c:1072:8: note:
in expansion of macro ‘kread’
  (void)kread(&(bio->bi_opf));
        ^
make[1]: *** [/tmp/stapn1mScg/stap_52465c24135decfd1488389440805488_7007_src.o]
Error 1
make: *** [_module_/tmp/stapn1mScg] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_52465c24135decfd1488389440805488_7007.ko" in
7940usr/560sys/8424real ms.
Pass 4: compilation failed.  [man error::pass4]
[root@ibm-p8-04-lp9 rhel7-ppc64le]# vi
/usr/src/debug/kernel-3.10.0-693.el7/linux-3.10.0-693.el7.ppc64le/include/linux/bio.h
====

It looks like our fix for the following kernel commit isn't quite right:

====
commit 1eff9d322a444245c67515edb52bc0eb68374aa8
Author: Jens Axboe <axboe@fb.com>
Date:   Fri Aug 5 15:35:16 2016 -0600

    block: rename bio bi_rw to bi_opf

    Since commit 63a4cc24867d, bio->bi_rw contains flags in the lower
    portion and the op code in the higher portions. This means that
    old code that relies on manually setting bi_rw is most likely
    going to be broken. Instead of letting that brokeness linger,
    rename the member, to force old and out-of-tree code to break
    at compile time instead of at runtime.

    No intended functional changes in this commit.
====

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]