public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Stephen Boyd <sboyd@codeaurora.org>,
	Russell King <linux@arm.linux.org.uk>,
	linux-kernel@vger.kernel.org,
	Arjan van de Ven <arjan@infradead.org>
Subject: Re: [PATCH] ARM: uaccess: Implement strict user copy checks
Date: Thu, 12 Aug 2010 17:00:27 +0200	[thread overview]
Message-ID: <201008121700.28085.arnd@arndb.de> (raw)
In-Reply-To: <4C62F01E.2000708@codeaurora.org>

On Wednesday 11 August 2010, Stephen Boyd wrote:
> On 08/10/2010 08:04 PM, Arnd Bergmann wrote:
> >
> > Do you actually need to disable this if running an older gcc? AFAICT, it
> > should just have no effect at all in that case, so the comment is slightly
> > misleading.
> 
> I blindly copied the help text from x86. Will fix to be less misleading.

Ok, I didn't realize that x86 is also doing this as an optional error.
My comment was obviously not about your copy then but about the
comment in general. Since it would be good to diverge, please
leave the patch as it is then and do a new patch that fixes the
message on all architectures at the same time.

> > Also, why turn this specific warning into an error but not any of the other
> > warnings? Some architectures (alpha, sparc, mips, powerpc, sh) simply turn
> > on -Werror for architecture specific code in general, which seems very
> > useful. We can also make that a config option (probably arch independent)
> > that we turn on for defconfig files that we know build without warnings.
> >
> > Unfortunately, there is a number of device drivers that have never been
> > warning-free, so we can't just enable -Werror for all code.
> >
> 
> I'm following the x86 implementation. I suppose it's done this way since 
> many drivers aren't warning free (as you mention) and turning on -Werror 
> will make it more annoying to find these types of errors. Since there 
> isn't any -Werror=user-copy this approach allows us to find this type of 
> error easily without having to sift through noise.
> 
> Enabling -Werror in architecture specific code wouldn't help much here 
> though right since this is going to be inlined into drivers and such?

My point was that I don't think we should single out this particular
warning and make it an error, while there are other equally important
warnings.

Again, this is directed more at the original code from Arjan than your
copy for the ARM architecture. I agree that it may be helpful to turn
more warnings into errors, but I don't think we should do this on 
this level of detail (one Kconfig option per warning).

Your patch should just go in unmodified, but I'd also suggest generalizing
this a bit more on all architectures.

	Arnd

      reply	other threads:[~2010-08-12 15:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-04  3:02 [PATCH] ARM: uaccess: Implement strict user copy checks Stephen Boyd
2010-08-10 22:46 ` Stephen Boyd
2010-08-10 22:55   ` Russell King - ARM Linux
2010-08-11  0:27     ` Stephen Boyd
2010-08-18  1:29       ` [PATCH v2] " Stephen Boyd
2010-08-18 12:28         ` Arnd Bergmann
2010-08-18 19:48           ` Stephen Boyd
2010-08-19 11:09             ` Arnd Bergmann
2010-08-24 15:06               ` Heiko Carstens
2010-08-24 15:26                 ` Arnd Bergmann
2010-08-24 15:47                   ` Heiko Carstens
2010-08-25 12:14                     ` Arnd Bergmann
2010-08-25 12:54                       ` Heiko Carstens
2010-08-25 13:55                         ` Arnd Bergmann
2010-08-25 14:40                           ` Heiko Carstens
2010-08-28  1:35                             ` Stephen Boyd
2010-08-28  7:43                               ` Heiko Carstens
2010-08-28  9:56                                 ` Arnd Bergmann
2010-09-04  4:49                                 ` Stephen Boyd
2010-09-14  3:07                                   ` Stephen Boyd
2010-09-14  8:25                                     ` Heiko Carstens
2010-09-14 13:10                                       ` Arnd Bergmann
2010-09-14 14:18                                         ` Heiko Carstens
2010-08-19  2:28           ` [PATCHv2 2/1] Consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS Stephen Boyd
2010-08-19  4:38             ` Arjan van de Ven
2010-08-19  4:47             ` Stephen Rothwell
2010-08-19 11:04               ` Arnd Bergmann
2010-08-11  3:04 ` [PATCH] ARM: uaccess: Implement strict user copy checks Arnd Bergmann
2010-08-11 18:46   ` Stephen Boyd
2010-08-12 15:00     ` Arnd Bergmann [this message]

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=201008121700.28085.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=arjan@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=sboyd@codeaurora.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