From: "Justin P. Mattock" <justinmattock@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, jkosina@suse.cz
Subject: Re: [PATCH]kernel.h Move warning message about using kernel headers for userspace to types.h
Date: Thu, 01 Jul 2010 06:34:26 -0700 [thread overview]
Message-ID: <4C2C9962.3080307@gmail.com> (raw)
In-Reply-To: <201007010958.46720.arnd@arndb.de>
On 07/01/2010 12:58 AM, Arnd Bergmann wrote:
> On Thursday 01 July 2010 00:09:45 Justin P. Mattock wrote:
>> Hopefully correct, as request move the function that checks
>> if userspace is using kernel headers, from kernel.h to types.h.
>> (Please check.)
>>
>> Signed-off-by: Justin P. Mattock<justinmattock@gmail.com>
>
> Trivial change: The 'Signed-off-by'-line should start at the beginning
> of the line, no space in front of it, to make all tools parse
> it correctly.
>
o.k.
> Also, the text above should really be the changelog in the way
> that you want it to appear in the git history. The explanatory
> text about what has changed can go below the '---' line, together
> with the diffstat information. Git only uses text above the line
> as a changeset comment.
cool thanks for the tid bit of info on how git reads these patches
(also later down the line, I'll have to figure out how to have
thunderbird copy/past patches properly so that life can be easier). .
>
>> --- a/include/linux/types.h
>> +++ b/include/linux/types.h
>> @@ -179,6 +179,12 @@ typedef __u32 __bitwise __wsum;
>> typedef unsigned __bitwise__ gfp_t;
>> typedef unsigned __bitwise__ fmode_t;
>>
>> +#ifndef __EXPORTED_HEADERS__
>> +#ifndef __KERNEL__
>> +#warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
so this is legit with the length of the statement? or should this be
broken down into a small quick line directing to a file with the address
or something
>> +#endif /* __KERNEL__ */
>> +#endif /* __EXPORTED_HEADERS__ */
>> +
>> #ifdef CONFIG_PHYS_ADDR_T_64BIT
>> typedef u64 phys_addr_t;
>
> Good: No more linewrap, correct use of quotation marks.
> Bad: This is now inside of #ifdef __KERNEL__, so it can never be caught by
> the compiler. Even if it looks like a trivial patch, it's a good idea
> to test it.
>
thats probably why this wasnt firing off, before I had sent it out I
though twice about it, but then figured better to get it out there, then
go from there.
> I'd suggest putting the #ifndef __EXPORTED_HEADERS__ into a new #else
> path of the last #ifdef __KERNEL__ of this file.
>
alright.. I look into this and resend
> Anyway, thanks for the persistence, I know it's frustrating when a one-line
> change goes through half a dozen revisions.
>
> Arnd
>
it does seem frustrating, but honestly I am actually excited to do such
a thing, main issue is energy i.g. doing this when/after spending hours
already is a bit intense...
Justin P. Mattock
next prev parent reply other threads:[~2010-07-01 13:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 22:09 [PATCH]kernel.h Move warning message about using kernel headers for userspace to types.h Justin P. Mattock
2010-07-01 7:58 ` Arnd Bergmann
2010-07-01 13:34 ` Justin P. Mattock [this message]
2010-07-01 15:07 ` Arnd Bergmann
2010-07-01 15:57 ` Justin P. Mattock
2010-07-01 17:20 ` Justin P. Mattock
2010-07-01 20:38 ` Arnd Bergmann
2010-07-01 21:31 ` Justin P. Mattock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C2C9962.3080307@gmail.com \
--to=justinmattock@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox