mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjanv@redhat.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Dave Jones <davej@redhat.com>, Jeff Garzik <jgarzik@pobox.com>,
	viro@parcelfarce.linux.theplanet.co.uk,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	bfennema@falcon.csc.calpoly.edu
Subject: Re: Fix UDF-FS potentially dereferencing null
Date: Sat, 17 Apr 2004 11:50:58 +0200	[thread overview]
Message-ID: <1082195458.4691.1.camel@laptop.fenrus.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0404161720450.3947@ppc970.osdl.org>

[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]

On Sat, 2004-04-17 at 02:44, Linus Torvalds wrote:
> On Sat, 17 Apr 2004, Dave Jones wrote:
> > 
> > And there's a *lot* of them. Those half dozen or so patches earlier were
> > results of just a quick random skim of the list the coverity folks came up with.
> > 
> > It'll take a lot of effort to 'fix' them all, and given the non-severity
> > of a lot of them, I'm not convinced it's worth the effort.
> 
> Just for the fun of it, I added a "safe" attribute to sparse (hey, it was 
> trivial), and made it warn if you test a safe variable. 
> 
> You can do
> 
> 	#define __safe __attribute__((safe))
> 
> 	static struct denty *
> 	udf_lookup(struct inode * __safe dir,
> 			struct dentry * __safe dentry,
> 			struct nameidata * __safe nd);
> 
> or

Hi,

is it maybe a good idea to map this to gcc's "nonnull" attribute in some
way? That way both sparse and the compiler get this explicit
knowledge.... (afaics gcc will then also just optimize out the null ptr
checks)

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-04-17 10:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-16 21:41 Dave Jones
2004-04-16 21:58 ` Linus Torvalds
2004-04-16 22:00 ` viro
2004-04-16 23:13   ` Jeff Garzik
2004-04-16 23:18     ` Dave Jones
2004-04-16 23:34       ` viro
2004-04-17  0:44       ` Linus Torvalds
2004-04-17  9:50         ` Arjan van de Ven [this message]
2004-04-17 10:42           ` Arjan van de Ven
2004-04-17 11:12           ` Ingo Oeser
2004-04-17 17:14             ` Linus Torvalds
2004-04-22 20:29               ` Alexandre Oliva
2004-04-22 20:56                 ` Linus Torvalds
2004-04-23 14:00                   ` Alexandre Oliva

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=1082195458.4691.1.camel@laptop.fenrus.com \
    --to=arjanv@redhat.com \
    --cc=bfennema@falcon.csc.calpoly.edu \
    --cc=davej@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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

all inboxes | Powered by JetHome®