public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Kees Cook <kees@ubuntu.com>
Cc: Greg KH <greg@kroah.com>, Alexey Dobriyan <adobriyan@gmail.com>,
	Jeff Garzik <jeff@garzik.org>,
	linux-kernel@vger.kernel.org, Ben Collins <bcollins@ubuntu.com>,
	Michael Wu <flamingice@sourmilk.net>
Subject: Re: [PATCH] modpost: detect unterminated device id lists
Date: Wed, 12 Sep 2007 18:21:44 -0700	[thread overview]
Message-ID: <20070912182144.89ee9411.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070913004937.GM8183@outflux.net>

On Wed, 12 Sep 2007 17:49:37 -0700 Kees Cook <kees@ubuntu.com> wrote:

> On Wed, Sep 12, 2007 at 02:53:56PM -0700, Greg KH wrote:
> > On Wed, Sep 12, 2007 at 03:48:49PM +0400, Alexey Dobriyan wrote:
> > > On 9/12/07, Jeff Garzik <jeff@garzik.org> wrote:
> > > > Kees Cook wrote:
> > > > > This patch against 2.6.23-rc6 fixes a couple drivers that do not
> > > > > correctly terminate their pci_device_id lists.  This results in garbage
> > > > > being spewed into modules.pcimap when the module happens to not have
> > > > > 28 NULL bytes following the table, and/or the last PCI ID is actually
> > > > > truncated from the table when calculating the modules.alias PCI aliases,
> > > > > cause those unfortunate device IDs to not auto-load.
> > > > >
> > > > > Signed-off-by: Kees Cook <kees@ubuntu.com>
> > > >
> > > > ACK
> > > 
> > > I mut say, non-terminated PCI ids lists are constant PITA. There should be
> > > a way to a) put it in macro[1], so that terminator automatically added, and
> > > b) still allow #ifdef inside table like, e.g. 8139too does.
> > > 
> > > [1] or not macro, because #ifdef inside macros aren't allowed.
> > 
> > If you know of a way to do this in an easier manner, patches are always
> > gladly accepted :)
> 
> This patch against 2.6.23-rc6 will cause modpost to fail if any device
> id lists are incorrectly terminated, after reporting the offender.

ooh, clever chap.

> +			fprintf(stderr,"%s: struct %s_device_id is %lu bytes.  The last of %lu is:\n", modname, device_id, id_size, size / id_size);

dude, bid on this: http://cgi.ebay.com/Wyse-WY55-General-Purpose-Serial-Terminal-No-Keyboard_W0QQitemZ230169388145QQihZ013QQcategoryZ51280QQssPageNameZWDVWQQrdZ1QQcmdZViewItem

(not allowed to use 132-column mode, either)

  reply	other threads:[~2007-09-13  1:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-12  6:41 [PATCH] pci: fix unterminated pci_device_id lists Kees Cook
2007-09-12 11:10 ` Jeff Garzik
2007-09-12 11:48   ` Alexey Dobriyan
2007-09-12 21:53     ` Greg KH
2007-09-12 23:08       ` Andrew Morton
2007-09-13  6:34         ` Alexey Dobriyan
2007-09-13  6:42           ` Jeff Garzik
2007-09-15  9:01             ` Jan Engelhardt
2007-09-13  6:58           ` Sam Ravnborg
2007-09-13  0:49       ` [PATCH] modpost: detect unterminated device id lists Kees Cook
2007-09-13  1:21         ` Andrew Morton [this message]
2007-09-16 22:14         ` Andrew Morton
2007-09-17  0:24           ` Satyam Sharma
2007-09-17  6:46             ` Andrew Morton
2007-09-17 21:45               ` Satyam Sharma
2007-09-17 21:50                 ` Andrew Morton
2007-09-17 23:36                   ` Mauro Carvalho Chehab
2007-09-17  1:22         ` Satyam Sharma
2007-09-17  3:45           ` Kees Cook
2007-09-17  6:48             ` Andrew Morton

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=20070912182144.89ee9411.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=bcollins@ubuntu.com \
    --cc=flamingice@sourmilk.net \
    --cc=greg@kroah.com \
    --cc=jeff@garzik.org \
    --cc=kees@ubuntu.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