dtrace4linux / linux

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

error: implicit declaration of function 'KUIDT_VALUE' (Oracle Linux 7) #97

Open ghost opened 9 years ago

ghost commented 9 years ago

Hi all,

I got the same error as issue #91 and I have commented the lines as :

/* if defined(CONFIG_UIDGID_STRICT_TYPE_CHECKS) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
#   define  KUIDT_VALUE(v) v.val
#   define  KGIDT_VALUE(v) v.val
#else
#   define  KUIDT_VALUE(v) v
#   define  KGIDT_VALUE(v) v
#endif
*/

After doing a make all I get now the error :

Executing: /home/user1/repo/linux/tools/make-me
make -C /lib/modules/3.8.13-55.1.2.el7uek.x86_64/build M=/home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver
  LD      /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/built-in.o
  CC [M]  /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_hash.o
  CC [M]  /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_lookup.o
  CC [M]  /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_mod.o
  CC [M]  /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_open.o
  CC [M]  /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_struct.o
  CC [M]  /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_subr.o
  CC [M]  /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_types.o
  CC [M]  /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_util.o
  CC [M]  /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctl.o
/home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctl.c: In function 'ctl_linux_ioctl':
/home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctl.c:271:3: error: implicit declaration of function 'KUIDT_VALUE' [-Werror=implicit-function-declaration]
   uid2 = KUIDT_VALUE(child->cred->uid);
   ^
cc1: some warnings being treated as errors
make[3]: *** [/home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctl.o] Error 1
make[2]: *** [_module_/home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver] Error 2
make[1]: *** [kernel] Error 2
tools/bug.sh
make: *** [all] Error 1

gcc --version gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16)

yum info kernel-headers| grep -E 'Version|Release' : Version : 3.10.0 Release : 123.13.2.el7

cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.0 (Maipo)

uname: Linux localhost.localdomain 3.8.13-55.1.2.el7uek.x86_64

Distribution : Oracle Linux 7

Thank you for your help,

Kind regards.

dtrace4linux commented 9 years ago

just comment out the code - its not needed and i have commented it ready for the next release.

dtrace wont work on your OEL system I believe.

On 12 January 2015 at 10:06, Pascal Chenevas notifications@github.com wrote:

Hi all,

I got the same error as issue #91 https://github.com/dtrace4linux/linux/issues/91 and I have commented the lines as :

/* if defined(CONFIG_UIDGID_STRICT_TYPE_CHECKS) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) define KUIDT_VALUE(v) v.val define KGIDT_VALUE(v) v.val

else

define KUIDT_VALUE(v) v define KGIDT_VALUE(v) v

endif

*/

After doing a make all I get now the error :

Executing: /home/user1/repo/linux/tools/make-me make -C /lib/modules/3.8.13-55.1.2.el7uek.x86_64/build M=/home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver LD /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/built-in.o CC [M] /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_hash.o CC [M] /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_lookup.o CC [M] /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_mod.o CC [M] /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_open.o CC [M] /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_struct.o CC [M] /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_subr.o CC [M] /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_types.o CC [M] /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctf_util.o CC [M] /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctl.o /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctl.c: In function 'ctl_linux_ioctl': /home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctl.c:271:3: error: implicit declaration of function 'KUIDT_VALUE' [-Werror=implicit-function-declaration] uid2 = KUIDT_VALUE(child->cred->uid); ^ cc1: some warnings being treated as errors make[3]: * [/home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver/ctl.o] Error 1 make[2]: *\ [module/home/user1/repo/linux/build-3.8.13-55.1.2.el7uek.x86_64/driver] Error 2 make[1]: * [kernel] Error 2 tools/bug.sh

make: *\ [all] Error 1

gcc --version gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16)

yum info kernel-headers| grep -E 'Version|Release' : Version : 3.10.0 Release : 123.13.2.el7

cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.0 (Maipo)

uname: Linux localhost.localdomain 3.8.13-55.1.2.el7uek.x86_64

Distribution : Oracle Linux 7

Thank you for your help,

Kind regards.

— Reply to this email directly or view it on GitHub https://github.com/dtrace4linux/linux/issues/97.

bhourigan commented 9 years ago

I followed your instructions and commented out the uid permission check in driver/ctl.c, and the KUIDT_VALUE() macros. I'm getting a new error, however:

driver/dtrace.c:1200: error: implicit declaration of function ‘KUIDT_VALUE’

Should dtrace_priv_proc_common_user be modified to always return 1?

dtrace4linux commented 9 years ago

You can do if you have a private system and dont mind end users gaining root access.

On 17 February 2015 at 20:50, Brian Hourigan notifications@github.com wrote:

I followed your instructions and commented out the uid permission check in driver/ctl.c, and the KUIDT_VALUE() macros. I'm getting a new error, however:

driver/dtrace.c:1200: error: implicit declaration of function ‘KUIDT_VALUE’

Should dtrace_priv_proc_common_user be modified to always return 1?

— Reply to this email directly or view it on GitHub https://github.com/dtrace4linux/linux/issues/97#issuecomment-74750404.