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]

[PATCH] runtime: linux 3.14 porting: case when CONFIG_USER_NS not defined


Hi,

My systemtap tree is at a404e997732d88a148d822bab9ea413b01e5da41 and
I run it on ARMv7 3.14 based kernel. It looks like that there was
set of commits around kuid_t and kgid_t. However it does look it is
enough to cover all possible cases. In my case CONFIG_USER_NS is not 
set but kernel is 3.14 with CONFIG_UIDGID_STRICT_TYPE_CHECKS removal
commit present.

Pass 1: parsed user script and 100 library script(s) using 20524virt/16336res/1728shr/15264data kb, in 550usr/30sys/775real ms.
Pass 2: analyzed script: 5 probe(s), 8 function(s), 3 embed(s), 2 global(s) using 21996virt/18572res/2624shr/16736data kb, in 1270usr/960sys/2640real ms.
Pass 3: translated to C into "/tmp/stapKpOeoW/stap_ab952db703452530b1d473c8f05f8f6d_6448_src.c" using 21996virt/18800res/2852shr/16736data kb, in 50usr/280sys/324real ms.
In file included from /home/root/systemtap/systemtap-20140405/share/systemtap/runtime/linux/task_finder.c:17:0,
                 from /home/root/systemtap/systemtap-20140405/share/systemtap/runtime/linux/runtime.h:206,
                 from /home/root/systemtap/systemtap-20140405/share/systemtap/runtime/runtime.h:24,
                 from /tmp/stapKpOeoW/stap_ab952db703452530b1d473c8f05f8f6d_6448_src.c:24:
/home/root/systemtap/systemtap-20140405/share/systemtap/runtime/linux/task_finder2.c: In function '__stp_utrace_attach_match_filename':
/home/root/systemtap/systemtap-20140405/share/systemtap/runtime/linux/task_finder2.c:813:11: error: incompatible types when assigning to type 'uid_t' from type 'kuid_t'
  tsk_euid = task_euid(tsk);
           ^
/home/root/systemtap/systemtap-20140405/share/systemtap/runtime/linux/task_finder2.c: In function 'stap_start_task_finder':
/home/root/systemtap/systemtap-20140405/share/systemtap/runtime/linux/task_finder2.c:1703:12: error: incompatible types when assigning to type 'uid_t' from type 'kuid_t'
   tsk_euid = task_euid(tsk);
            ^

I.e code goes into !CONFIG_USER_NS part but it does not
work on 3.14 kernel.

Proposed fix by adding kernel version check along with check for
CONFIG_USER_NS.

Note it was working for me when I defined CONFIG_USER_NS kernel,
I used it as workaround, but I decided to address this case that 
I orignally run into. If case was already addressed please ignore.

Victor Kamensky (1):
  runtime: linux 3.14 porting: case when CONFIG_USER_NS not defined

 runtime/linux/task_finder.c   | 4 ++--
 runtime/linux/task_finder2.c  | 4 ++--
 runtime/transport/control.c   | 2 +-
 runtime/transport/transport.c | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

-- 
1.9.0


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