__CHECKER__, __user, and user-space pointers in the kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I recently discovered a problem in our driver where we're dereferencing user-space pointers. Obviously, this is not allowed, but amazingly it seemd to work until we tried Fedora Core 2 (2.6.5 kernel). Now I see that our driver may have this problem in more than one place.

Looking at compiler.h, I see that __user is defined if __CHECKER__ is defined:

# define __user	__attribute__((noderef, address_space(1)))

So I have some questions:

1. Where is __CHECKER__ defined? I did a grep of an entire 2.6 kernel tree, and it's not defined in any source file, header file, or make file. I see a few #ifdef's, but no #define __CHECKER__ or anything like that.

2. What does address_space(1) mean?

3. Is __CHECKER__ related to the 2.6 support for the "sparse" tool? Is it related to the C=1 make command line parm?

--
Timur Tabi
Staff Software Engineer
timur.tabi@xxxxxxxxxxx

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux