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 translator/19120] kbuild warnings on RHEL5


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

--- Comment #2 from Martin Cermak <mcermak at redhat dot com> ---
Those warnings come from fullpath_struct_path(). A smaller reproducer is:

=======
stap -e 'probe oneshot { println
(fullpath_struct_path(task_cwd_path(task_current())))  } '
=======

Which passes on rhel6+ and fail on my rhel5 running 2.6.18-398.el5. However,
task_cwd_path() is *supposed* to return null:

=======
function task_cwd_path:long(task:long)
%{ /* pure */
... stuff deleted ...
        if (task->fs) {
                // Sigh. On kernels before 2.6.25, the task->fs->pwd
                // structure exists, but isn't a 'path'
                // structure. Instead it is a 'dentry' structure. The 
                // 'pwd' and 'pwdmnt' (which is a 'vfsmount'
                // structure) variables would both be needed to get a
                // pathname. However, this function can't return 2
                // items or really declare a static 'path' structure
                // to put the 2 pointers in. 
                //
                // So, on those RHEL5-era kernels, we'll just return
                // NULL here.
... stuff deleted ...
=======

The fullpath_struct_path() might pick one of linux/path.h or linux/nfs_fs.h
using @choose_defined() for the cast. Nevertheless that would neither suppress
those warnings, nor make task_paths.stp pass since task_cwd_path() will still
return null on such old kernel.

So maybe the best way would be to use autoconf-dpath-path.c which sets
STAPCONF_DPATH_PATH and let it drive the behavior of fullpath_struct_path()
making it return null on such old kernels.

-- 
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]