Re: [PATCH] fix calls to request_module()

From: Al Viro
Date: Thu Dec 11 2008 - 01:00:54 EST


On Thu, Dec 11, 2008 at 02:42:28PM +0900, Nguyen Anh Quynh wrote:
> > Ah, but that's different. Take a look at that warning and think _why_
> > it is given and what is it about. Getting an untrusted string as
> > format argument is a real security hole, but it has nothing to do
> > with a pile of cases in your patch.
>
> Yes, clearly the warning is to warn us about potential format string
> bugs. But I agree that there are a lot of false possitives.
>
> My patch is mainly to make gcc happy.

Your patch is mostly obfuscating the places gcc does *not* warn about...

Looking through it, only
drivers/media/video/cx18/cx18-driver.c
drivers/media/video/ivtv/ivtv-driver.c
drivers/media/video/pvrusb2/pvrusb2-hdw.c
drivers/media/video/zoran/zoran_card.c
drivers/mtd/chips/gen_probe.c
drivers/net/wireless/hostap/hostap_ioctl.c
drivers/of/of_spi.c
drivers/usb/storage/libusual.c
fs/dquot.c
fs/gfs2/locking.c
net/ieee80211/ieee80211_wx.c
sound/core/sound.c

are not of <string literal> -> "%s", <string literal> variety. Everything
else has never generated a format warning. At least trim the patch,
removing the obviously useless parts.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/