dtrace4linux / linux

dtrace for linux - kernel driver and userland tools
http://crtags.blogspot.com
1.16k stars 223 forks source link

Linux 3.8: CONFIG_UIDGID_STRICT_TYPE_CHECKS breaks the build #64

Open ryao opened 11 years ago

ryao commented 11 years ago

I encountered the following failure when building against Linux 3.10.4. This issue first started in Linux 3.8.0, but generally only affects kernels built with user namespace support because it requires CONFIG_UIDGID_STRICT_TYPE_CHECKS:

/root/dtrace4linux/build-3.10.4/driver/ctl.c: In function 'ctl_linux_ioctl':
/root/dtrace4linux/build-3.10.4/driver/ctl.c:263:9: error: incompatible types when assigning to type 'uid_t' from type 'kuid_t'
    uid2 = child->cred->uid;
         ^
/root/dtrace4linux/build-3.10.4/driver/ctl.c:275:8: error: incompatible types when assigning to type 'uid_t' from type 'kuid_t'
   uid1 = current->cred->uid;
        ^

This also affected ZFSOnLinux. I wrote a fix for ZFSOnLinux's Solaris Porting Layer, which is currently in zfsonlinux/spl#260. I imagine that a similar fix could be done in dtrace4linux.

If you adapt that patch, do not worry about licensing. You can have it under the CDDL.

ryao commented 11 years ago

Upon review, it does not look like this patch will work for dtrace4linux unless it hooks into the ZFSOnLinux SPL.

plexus commented 10 years ago

I can confirm the same problem happens on Ubuntu 13.04 running kernel 3.12.1-031201-generic

dtrace4linux commented 10 years ago

Thanks for this. Just uploaded a new release which fixes the compile time issue with strict uid/gid checks. Please give it a go.

On 3 January 2014 14:58, Arne Brasseur notifications@github.com wrote:

I can confirm the same problem happens on Ubuntu 13.04 running kernel 3.12.1-031201-generic

— Reply to this email directly or view it on GitHubhttps://github.com/dtrace4linux/linux/issues/64#issuecomment-31527058 .

plexus commented 10 years ago

Thanks, just cloned the latest version and 'make all ; make install ; make load' works without a glitch. Can't wait to play with it :)