public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4.15-final drivers/net/bonding.c includes user space headers
Date: Mon, 26 Nov 2001 13:06:37 +1100	[thread overview]
Message-ID: <1432.1006740397@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "25 Nov 2001 13:49:33 -0800." <9trp1d$ppg$1@cesium.transmeta.com>

On 25 Nov 2001 13:49:33 -0800, 
"H. Peter Anvin" <hpa@zytor.com> wrote:
>By author:    Keith Owens <kaos@ocs.com.au>
>>
>> 2.4.15-final/drivers/net/bonding.c:188: #include <limits.h>
>> 
>> Kernel code must not include use space headers.  I thought this had
>> been fixed.  It will not compile in 2.5.
>
><limits.h> is one of the compiler-provided headers, i.e. from
>/usr/lib/gcc-lib/*/*/include -- if your kbuild harness don't
>allow those headers to be included, it's broken.

kbuild 2.5 does
  '-nostdinc -I/usr/lib/gcc-lib/... gcc version ../include/'
so it allows includes from the compiler headers.  The problem is:

  bonding.c includes limits.h, picked up from gcc, OK.
  limits.h includes syslimits.h from gcc, OK.
  syslimits.h tries to include_next <limits.h> to get the user space
  limits, not OK.

Any kernel code that includes limits.h or syslimits.h is polluted by
user space headers.  net/bonding.c does not even need limits.h.


  reply	other threads:[~2001-11-26  2:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-23  6:31 2.4.15-final drivers/net/bonding.c includes user space headers Keith Owens
2001-11-25 21:49 ` H. Peter Anvin
2001-11-26  2:06   ` Keith Owens [this message]
2001-11-26  2:09     ` H. Peter Anvin
2001-11-26  2:19       ` Keith Owens
2001-11-26  2:22         ` H. Peter Anvin
2001-11-26  5:02   ` David S. Miller
2001-11-26 17:55 ` Thomas Davis
2001-11-26 18:57   ` David S. Miller

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=1432.1006740397@ocs3.intra.ocs.com.au \
    --to=kaos@ocs.com.au \
    --cc=hpa@zytor.com \
    --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