[PATCH] fix deadlock in audit_log_task_context()

2007-03-12 Thread Al Viro
GFP_KERNEL allocations in non-blocking context; fixed by killing an idiotic use of security_getprocattr(). Acked-by: Stephen Smalley [EMAIL PROTECTED] Acked-by: James Morris [EMAIL PROTECTED] Signed-off-by: Al Viro [EMAIL PROTECTED] --- kernel/auditsc.c | 24 +++- 1 files

[PATCH] sanitize security_getprocattr() API

2007-03-12 Thread Al Viro
have it return the buffer it had allocated Acked-by: Stephen Smalley [EMAIL PROTECTED] Acked-by: James Morris [EMAIL PROTECTED] Signed-off-by: Al Viro [EMAIL PROTECTED] --- fs/proc/base.c | 21 ++--- include/linux/security.h |8 security/dummy.c

[PATCH 1/13] ibmtr probe is __devinit, not __init

2007-03-14 Thread Al Viro
used by -attach() in pcmcia analog Signed-off-by: Al Viro [EMAIL PROTECTED] --- drivers/net/pcmcia/ibmtr_cs.c |4 ++-- drivers/net/tokenring/ibmtr.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c

[PATCH 2/13] const file_operations fallout

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- sound/oss/dmasound/dmasound_core.c | 20 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c index a0ec886..f4056a9 100644 --- a/sound/oss

[PATCH 3/13] appldata build fix

2007-03-14 Thread Al Viro
PGALLOC_DMA is defined only if we have CONFIG_ZONE_DMA Signed-off-by: Al Viro [EMAIL PROTECTED] --- arch/s390/appldata/appldata_mem.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c index 4ca6157

[PATCH 5/13] zatm __init abuse

2007-03-14 Thread Al Viro
zatm_init() and zatm_start() should be __devinit (the former is not module init, despite the name - it's a helper for PCI -probe()) Signed-off-by: Al Viro [EMAIL PROTECTED] --- drivers/atm/zatm.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/atm/zatm.c b

[PATCH 4/13] (uml) sparse flags for userland glue are missing $(CF)

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- arch/um/scripts/Makefile.rules |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules index 813077f..a9a4b85 100644 --- a/arch/um/scripts/Makefile.rules +++ b/arch/um

[PATCH 6/13] stacktrace doesn't work on uml

2007-03-14 Thread Al Viro
and no, it's not the case of let's pull bits from underlying architecture Signed-off-by: Al Viro [EMAIL PROTECTED] --- arch/um/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/um/Kconfig b/arch/um/Kconfig index b3a21ba..354cc6b 100644 --- a/arch/um/Kconfig

[PATCH 7/13] fix ipath_dma_free_coherent() prototype

2007-03-14 Thread Al Viro
method gets u64, not dma_addr_t Signed-off-by: Al Viro [EMAIL PROTECTED] --- drivers/infiniband/hw/ipath/ipath_dma.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/ipath/ipath_dma.c b/drivers/infiniband/hw/ipath/ipath_dma.c index f6f9490

[PATCH 8/13] m32r dma-mapping.h should simply include generic/dma-mapping-broken.h

2007-03-14 Thread Al Viro
... instead of trying to duplicate its bits Signed-off-by: Al Viro [EMAIL PROTECTED] --- include/asm-m32r/dma-mapping.h | 19 +-- 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/include/asm-m32r/dma-mapping.h b/include/asm-m32r/dma-mapping.h index a7fa030

[PATCH 10/13] BLK_DEV_IDE_CELLEB dependency fix

2007-03-14 Thread Al Viro
It's bool and it depends on IDE = should depend on IDE=y Signed-off-by: Al Viro [EMAIL PROTECTED] --- drivers/ide/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 5d134bb..3f76987 100644 --- a/drivers/ide/Kconfig

[PATCH 9/13] include of asm/pgtable.h in nfsfh is bogus

2007-03-14 Thread Al Viro
not needed and actually breaks build on frv, while we are at it Signed-off-by: Al Viro [EMAIL PROTECTED] --- fs/nfsd/nfsfh.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index c2660cb..8d995bc 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs

[PATCH 11/13] sparc: have dma-mapping.h include generic/dma-mapping-broken in non-PCI case

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- include/asm-sparc/dma-mapping.h | 15 +-- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/include/asm-sparc/dma-mapping.h b/include/asm-sparc/dma-mapping.h index 6db83dc..f3a641e 100644 --- a/include/asm-sparc/dma

[PATCH 12/13] rtc-cmos needs RTC_ALWAYS_BCD known

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- include/asm-m68k/mc146818rtc.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/asm-m68k/mc146818rtc.h b/include/asm-m68k/mc146818rtc.h index 11fe12d..9f70a01 100644 --- a/include/asm-m68k/mc146818rtc.h +++ b/include

[PATCH 13/13] fix ps3fb glue allowing a modular build

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- arch/powerpc/platforms/ps3/htab.c |2 ++ drivers/video/Kconfig |2 +- include/asm-powerpc/ps3fb.h |5 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/ps3/htab.c b/arch/powerpc

[PATCH 1/17] misc NULL noise

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- arch/x86_64/kernel/vsyscall.c |2 +- drivers/acpi/events/evmisc.c |2 +- drivers/ata/pata_mpc52xx.c |2 +- drivers/char/watchdog/machzwd.c|2 +- drivers/media/video/pvrusb2/pvrusb2

[PATCH 4/17] constant should be long

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- arch/powerpc/kernel/udbg_16550.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c index e738f93..a963f65 100644 --- a/arch/powerpc/kernel/udbg_16550.c +++ b

[PATCH 2/17] fastcall still doesn't make sense in paravirt

2007-03-14 Thread Al Viro
Andi had removed a bunch of those, but one more had creeped in... Signed-off-by: Al Viro [EMAIL PROTECTED] --- include/asm-i386/paravirt.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index f8319ca..46dc34c

[PATCH 3/17] dmfe trivial endianness annotations

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- drivers/net/tulip/dmfe.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index 24a29c9..9aeac76 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c

[PATCH 5/17] pasemi trivial iomem annotations

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- arch/powerpc/platforms/pasemi/iommu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c index 459a53b..71dbf1a 100644 --- a/arch/powerpc/platforms

[PATCH 7/17] trivial ATA iomem annotations

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- drivers/ata/pata_cs5520.c |2 +- drivers/ata/sata_sis.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c index 7ef8342..55cc293 100644 --- a/drivers/ata/pata_cs5520

[PATCH 8/17] cciss endian annotations

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- drivers/block/cciss.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 0c716ee..072e18e 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1439,7

[PATCH 9/17] qeth gfp_t annotations

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- drivers/s390/net/qeth.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/s390/net/qeth.h b/drivers/s390/net/qeth.h index e95c281..84b108d 100644 --- a/drivers/s390/net/qeth.h +++ b/drivers/s390/net/qeth.h @@ -873,7

[PATCH 14/17] atl1 trivial endianness misannotations

2007-03-14 Thread Al Viro
NB: driver is choke-full of code that will break on big-endian; as long as the hardware is onboard-only we can live with that, but sooner or later that'll need fixing. Signed-off-by: Al Viro [EMAIL PROTECTED] --- drivers/net/atl1/atl1_main.c |4 ++-- 1 files changed, 2 insertions(+), 2

[PATCH 12/17] hid-core endianness annotations

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- drivers/hid/hid-core.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index f4ee1af..9c8157f 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -753,8

[PATCH 13/17] ANSIfy powerpc floppy.h

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- include/asm-powerpc/floppy.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/asm-powerpc/floppy.h b/include/asm-powerpc/floppy.h index a0f14ee..afa700d 100644 --- a/include/asm-powerpc/floppy.h +++ b/include/asm

[PATCH 17/17] m68k dma-mapping: gfp_t annotations

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- include/asm-m68k/dma-mapping.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/asm-m68k/dma-mapping.h b/include/asm-m68k/dma-mapping.h index 00259ed..a26cdeb 100644 --- a/include/asm-m68k/dma-mapping.h +++ b/include

[PATCH 16/17] paride endianness annotations

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- drivers/block/paride/pd.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 99e2c8c..31e0148 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride

[PATCH 15/17] kill bogus casts in amd64 uaccess.h

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- include/asm-x86_64/uaccess.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h index 1981f70..9df30b9 100644 --- a/include/asm-x86_64/uaccess.h +++ b/include/asm

[PATCH 10/17] C99 initializers, proper use of const in drivers/ps3

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- drivers/ps3/ps3av_cmd.c | 24 +--- 1 files changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/ps3/ps3av_cmd.c b/drivers/ps3/ps3av_cmd.c index 21c97c8..bc70e81 100644 --- a/drivers/ps3/ps3av_cmd.c +++ b/drivers/ps3

[PATCH 11/17] cifs endianness annotations

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- fs/cifs/cifspdu.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h index 0efdf35..3af7624 100644 --- a/fs/cifs/cifspdu.h +++ b/fs/cifs/cifspdu.h @@ -220,7 +220,7 @@ */ #define

[PATCH 6/17] sparc: nr_free_pages() is unsigned long

2007-03-14 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- arch/sparc/mm/init.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c index c85ddf3..a532922 100644 --- a/arch/sparc/mm/init.c +++ b/arch/sparc/mm/init.c @@ -75,7 +75,7 @@ void

Re: [PATCH 13/13] fix ps3fb glue allowing a modular build

2007-03-14 Thread Al Viro
On Wed, Mar 14, 2007 at 10:50:16AM +0100, Geert Uytterhoeven wrote: On Wed, 14 Mar 2007, Al Viro wrote: Signed-off-by: Al Viro [EMAIL PROTECTED] NAK There are several problems with making it modular. I did try, cfr. the incomplete patchlets below. [snip] And finally, make sure

Re: [PATCH 13/13] fix ps3fb glue allowing a modular build

2007-03-14 Thread Al Viro
On Wed, Mar 14, 2007 at 05:17:45PM +0100, Geert Uytterhoeven wrote: Hi Al, On Wed, 14 Mar 2007, Al Viro wrote: On Wed, Mar 14, 2007 at 10:50:16AM +0100, Geert Uytterhoeven wrote: On Wed, 14 Mar 2007, Al Viro wrote: Signed-off-by: Al Viro [EMAIL PROTECTED] NAK Lovely

Re: [PATCH 13/13] fix ps3fb glue allowing a modular build

2007-03-14 Thread Al Viro
On Wed, Mar 14, 2007 at 10:30:31AM -0700, Linus Torvalds wrote: Nope. How can kconfig distinguish that from a boolean option in modular driver? bool *can* depend on tristate and be selected when tristate is set to m. Btw, this is one of those things that easily causes problems. In

Re: [PATCH 13/13] fix ps3fb glue allowing a modular build

2007-03-14 Thread Al Viro
On Wed, Mar 14, 2007 at 07:09:40PM +0100, Geert Uytterhoeven wrote: On Wed, 14 Mar 2007, Al Viro wrote: On Wed, Mar 14, 2007 at 10:30:31AM -0700, Linus Torvalds wrote: Maybe not bool vs mbool, but it might be nice to have bool FB_PS3 depends strictly on FB ie

Re: [PATCH 10/13] BLK_DEV_IDE_CELLEB dependency fix

2007-03-14 Thread Al Viro
On Thu, Mar 15, 2007 at 02:25:40PM +0900, Akira Iguchi wrote: Al wrote: It's bool and it depends on IDE = should depend on IDE=y Signed-off-by: Al Viro [EMAIL PROTECTED] Move to if BLK_DEV_IDEDMA_PCI block because it depends on BLK_DEV_IDEDMA_PCI. +config BLK_DEV_IDE_CELLEB

Re: [PATCH 10/13] BLK_DEV_IDE_CELLEB dependency fix

2007-03-15 Thread Al Viro
On Thu, Mar 15, 2007 at 03:10:20PM +0900, Akira Iguchi wrote: Al wrote: Eh... You still need dependency on IDE=y; otherwise you'll get configs with IDE=m, BLK_DEV_IDE_CELLEB=y and those won't link. BLK_DEV_IDEDMA_PCI is selectable just fine with IDE=m. It's the same problem as with ps3

Re: [PATCH] iomap: make PCI iomap stuff excluded when PCI isn't configured

2007-02-10 Thread Al Viro
On Sat, Feb 10, 2007 at 02:25:53PM -0800, Linus Torvalds wrote: On Sat, 10 Feb 2007, Tejun Heo wrote: I think an arch needs to support ioport_map/unmap and noncoherent dma (just alias to coherent interface on x86/amd64) interface whether PCI is implemented or not. No? We

Re: [PATCH] iomap: make PCI iomap stuff excluded when PCI isn't configured

2007-02-10 Thread Al Viro
On Sat, Feb 10, 2007 at 10:50:33PM +, Al Viro wrote: We don't even require ioremap(). What the hell could it possibly mean on e.g. UML? The same goes for DMA. And yes, of course it means that a lot of drivers are not buildable on it - hardly a surprise, that... FWIW, the current picture

Re: [PATCH] iomap: make PCI iomap stuff excluded when PCI isn't configured

2007-02-10 Thread Al Viro
On Sat, Feb 10, 2007 at 05:14:13PM -0500, Tejun Heo wrote: Heiko Carstens wrote: On Sat, Feb 10, 2007 at 12:43:16PM -0500, Tejun Heo wrote: \ Heiko, how about this? Does it fix s390? Unfortunately not. Now I get CC lib/iomap.o lib/iomap.c: In function 'devm_ioport_map_release':

Re: [ANNOUNCE] sparse-0.2-cl2 is now available

2007-02-10 Thread Al Viro
On Sat, Feb 10, 2007 at 09:17:58PM -0800, Christopher Li wrote: e.g. sparse has not way to know some function only get called with interrupt disabled (or some lock already hold). So it assume interrupt is still enable and generate wrong warnings. Another example is that some helper function

Re: [patch] linux/io.h: forward declare struct pci_dev

2007-02-10 Thread Al Viro
for all archs or 2. CONFIG_IOMAP. Hmmm... I think CONFIG_IOMAP is better as it will allow leaving out related devres parts (or any generic function using iomap). My current version: From 97f115834b5ebef4f04e0f18aaa10f78f43733a0 Mon Sep 17 00:00:00 2001 From: Al Viro [EMAIL PROTECTED] Date

Re: [patch] linux/io.h: forward declare struct pci_dev

2007-02-11 Thread Al Viro
On Sun, Feb 11, 2007 at 07:10:47AM +, Christoph Hellwig wrote: On Sun, Feb 11, 2007 at 06:34:31AM +, Al Viro wrote: +config NO_IOPORT + bool + default n please make this IOPORT. config symbols with an implicit negation are quite horrible for the brain to understand. Take

[PATCH] sort the devres mess out

2007-02-11 Thread Al Viro
for dependencies of quite a few drivers). * protect the ioport-related parts of lib/devres.o with CONFIG_HAS_IOPORT. Signed-off-by: Al Viro [EMAIL PROTECTED] --- arch/arm/Kconfig |5 + arch/cris/Kconfig |3 + arch/h8300/Kconfig |3 + arch/h8300/kernel/Makefile

Re: [PATCH] iomap: make PCI iomap stuff excluded when PCI isn't configured

2007-02-11 Thread Al Viro
On Sun, Feb 11, 2007 at 05:45:33PM +0100, Martin Schwidefsky wrote: On Sat, 2007-02-10 at 23:55 +, Al Viro wrote: FWIW, the current picture wrt io-related stuff looks so: s390: no ioport_map, no ioread*/iowrite*, no port IO except for (in|out)b(_p|) s390 does not even need

[PATCH] add missing io...._rep() on sparc32

2007-02-11 Thread Al Viro
same as on sparc64 Signed-off-by: Al Viro [EMAIL PROTECTED] --- include/asm-sparc/io.h | 29 + 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h index cab0b85..c23e74a 100644 --- a/include/asm-sparc/io.h

Re: [PATCH v4] Fix rmmod/read/write races in /proc entries

2007-02-11 Thread Al Viro
Does it pass everyone's bullshit detectors? Nice, but incomplete. What we need to add is * procfs-specific file_operations shared by all regular files on procfs. Stuff in there would call methods from pde-proc_fops, after having done the same kind of exclusion you are currently doing

[PATCH] fix atl1 braino

2007-02-12 Thread Al Viro
Spot the bug... Signed-off-by: Al Viro [EMAIL PROTECTED] --- diff --git a/drivers/net/atl1/atl1_hw.c b/drivers/net/atl1/atl1_hw.c index 08b2d78..e28707a 100644 --- a/drivers/net/atl1/atl1_hw.c +++ b/drivers/net/atl1/atl1_hw.c @@ -357,7 +357,7 @@ void atl1_hash_set(struct atl1_hw *hw, u32

[RFC] security_getprocattr() API idiocy

2007-02-13 Thread Al Viro
[apologies for resend, bogus address on the original mail] security_getprocattr() takes a buffer + length, copies data to it and return the actual length. If buffer is NULL, it just returns the right length, a-la snprintf(). Observations: * at least selinux ends up actually

[GIT PULL] audit patches

2007-02-17 Thread Al Viro
. Please, pull from git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current.git/ audit.b37 Al Viro (1): AUDIT_FD_PAIR Steve Grubb (2): minor update to rule add/delete messages (ver 2) audit config lockdown fs/pipe.c |7 ++ include/linux/audit.h |9 ++ kernel

Re: $CHECK can't be overridden

2007-03-22 Thread Al Viro
On Thu, Mar 22, 2007 at 01:15:25AM -0400, Dave Jones wrote: make help implies that supplying $CHECK on the command line should override sparse as the checker used when building with C=1 Yet, this doesn't seem to be the case. This would be useful for cases where for eg, sparse isn't in the

Re: Problem with fix-rmmod-read-write-races-in-proc-entries.patch in 2.6.21-rc4-mm1

2007-03-22 Thread Al Viro
On Thu, Mar 22, 2007 at 09:14:45AM +0100, Eric Dumazet wrote: Also, do we really need to proxy via proc_reg_file_ops files that are not provided by a module ? I think not. Could you please add in proc_get_inode() a check against de-proc_fops-owner ? Let's _not_. Bugs that depend on

Re: max_loop limit

2007-03-22 Thread Al Viro
On Thu, Mar 22, 2007 at 02:42:31PM +0100, Jens Axboe wrote: But this still wastes memory, why not just allocate each loop device dynamically when it is set up? The current approach is crap, it is just wasting memory for loop devices, queues, etc. Correction: current ABI is crap. To set the

Re: [patch] [bugfix] loop.c

2007-03-23 Thread Al Viro
On Fri, Mar 23, 2007 at 03:19:56PM +0100, Eric Dumazet wrote: On Fri, 23 Mar 2007 15:04:54 +0100 Tomas M [EMAIL PROTECTED] wrote: I posted this yesterday but it seems people didn't understand the real goal of my patch. So I will explain once more again: This is a bugfix for loop.c

Re: [patch] [bugfix] loop.c

2007-03-23 Thread Al Viro
On Fri, Mar 23, 2007 at 02:41:09PM +, Christoph Hellwig wrote: The right thing to start with is to split the allocation up, and allocate each loop device by itself, like in the untested patch below: After that you're not wasting memory for any off number of loop devices and can create as

Re: [patch] [bugfix] loop.c

2007-03-23 Thread Al Viro
On Fri, Mar 23, 2007 at 03:48:09PM +0100, Eric Dumazet wrote: On Fri, 23 Mar 2007 14:36:05 + Al Viro [EMAIL PROTECTED] wrote: On Fri, Mar 23, 2007 at 03:19:56PM +0100, Eric Dumazet wrote: I cooked the following patch (untested), feel free to test it. Please, get the cleanup

Re: [AppArmor 01/41] Pass struct vfsmount to the inode_create LSM hook

2007-04-12 Thread Al Viro
On Thu, Apr 12, 2007 at 02:08:10AM -0700, [EMAIL PROTECTED] wrote: This is needed for computing pathnames in the AppArmor LSM. Which is an argument against said LSM in current form. - error = security_inode_create(dir, dentry, mode); + error = security_inode_create(dir, dentry, nd ?

Re: [AppArmor 40/41] AppArmor: all the rest

2007-04-12 Thread Al Viro
On Thu, Apr 12, 2007 at 02:08:49AM -0700, [EMAIL PROTECTED] wrote: + } else if (profile1 profile2) { + /* profile1 cannot be NULL here. */ + spin_lock_irqsave(profile1-lock, profile1-int_flags); + if (profile2) +

Re: [AppArmor 33/41] Add d_namespace_path() to obtain namespace relative pathnames

2007-04-12 Thread Al Viro
+char *d_namespace_path(struct dentry *dentry, struct vfsmount *vfsmnt, +char *buf, int buflen) +{ + char *res; + struct vfsmount *rootmnt, *nsrootmnt; + struct dentry *root; + + read_lock(current-fs-lock); + rootmnt = mntget(current-fs-rootmnt); +

Re: RFC: initramfs unpack point and rules

2007-04-12 Thread Al Viro
On Thu, Apr 05, 2007 at 02:34:39PM +0200, Krzysztof Halasa wrote: First problem: initramfs is unpacked way before console drivers are initialized, so you aren't going to see the panic(): init/initramfs.c:static int __init populate_rootfs(void) ... printk(KERN_INFO Unpacking

Re: [AppArmor 40/41] AppArmor: all the rest

2007-04-12 Thread Al Viro
On Thu, Apr 12, 2007 at 11:32:00AM +0100, Al Viro wrote: On Thu, Apr 12, 2007 at 02:08:49AM -0700, [EMAIL PROTECTED] wrote: + } else if (profile1 profile2) { + /* profile1 cannot be NULL here. */ + spin_lock_irqsave(profile1-lock, profile1-int_flags

Re: Oops in evdev_disconnect for kernel 2.6.23.12

2008-01-06 Thread Al Viro
On Sun, Jan 06, 2008 at 10:15:16PM +0100, Berthold Cogel wrote: I did that and got this in 'make modules': CC [M] drivers/input/joydev.o CC [M] drivers/input/evdev.o drivers/input/evdev.c: In function 'evdev_do_ioctl': drivers/input/evdev.c:749: error: 'struct input_dev' has no member

[RFC] netns / sysfs interaction

2008-01-06 Thread Al Viro
As much as I hate to touch either subject, let alone both at once... Eric, would you mind explaining what exactly do you want sysfs to do in presense of your namespaces? On the what does user see if we do ... level. a) what happens if I do chdir(/sys/class/net/eth42/) and then

Re: [Bluez-devel] Oops involving RFCOMM and sysfs

2008-01-07 Thread Al Viro
On Mon, Jan 07, 2008 at 06:18:21PM +0900, Tejun Heo wrote: Tejun Heo wrote: Eric W. Biederman wrote: That said, the mechanism is a bit too fragile. sysfs currently ensures that dentry/inode point to the associated sysfs_dirent. This is mainly remanent of conversion from previous VFS

Re: [RFC] netns / sysfs interaction

2008-01-07 Thread Al Viro
On Mon, Jan 07, 2008 at 03:01:47AM -0700, Eric W. Biederman wrote: Al Viro [EMAIL PROTECTED] writes: What appears to be a clean solution is to have multiple sysfs superblocks and to capture the namespace at mount time. It is not a clean solution at all. In particular, it leaves you with hell

Re: Top 10 kernel oopses for the week ending January 5th, 2008

2008-01-07 Thread Al Viro
On Mon, Jan 07, 2008 at 07:26:12PM -0800, Linus Torvalds wrote: I usually just compile a small program like const char array[]=\xnn\xnn\xnn...; int main(int argc, char **argv) { printf(%p\n, array); *(int *)0=0; } Heh. I prefer char

Re: Top 10 kernel oopses for the week ending January 5th, 2008

2008-01-09 Thread Al Viro
callers anymore) * take export_rdev() into failure case in bind_rdev_to_array() * in kick_rdev_from_array() do what export_rdev() does sans kobject_put() and do that before schedule_work(). Take kobject_put() into delayed_delete(). Signed-off-by: Al Viro [EMAIL PROTECTED] --- diff

Re: [PATCH]: ufs: fix symlink creation on ufs2

2008-01-10 Thread Al Viro
On Thu, Jan 10, 2008 at 08:40:41AM +, Christoph Hellwig wrote: On Wed, Jan 09, 2008 at 11:51:48PM -0800, Andrew Morton wrote: +++ b/fs/ufs/super.c @@ -131,6 +131,8 @@ static void ufs_print_super_stuff(struct super_block *sb, printk(KERN_INFO cs_nffree(Num of free

Re: [PATCH 002 of 6] md: Fix use-after-free bug when dropping an rdev from an md array.

2008-01-13 Thread Al Viro
On Mon, Jan 14, 2008 at 12:45:31PM +1100, NeilBrown wrote: Due to possible deadlock issues we need to use a schedule work to kobject_del an 'rdev' object from a different thread. A recent change means that kobject_add no longer gets a refernce, and kobject_del doesn't put a reference.

Re: [PATCH 002 of 6] md: Fix use-after-free bug when dropping an rdev from an md array.

2008-01-13 Thread Al Viro
On Mon, Jan 14, 2008 at 02:21:45PM +1100, Neil Brown wrote: Maybe it isn't there any more Once upon a time, when I echo remove /sys/block/mdX/md/dev-YYY/state Egads. And just what will protect you from parallel callers of state_store()? buffer-mutex does *not* do that - it only

Re: [PATCH 002 of 6] md: Fix use-after-free bug when dropping an rdev from an md array.

2008-01-14 Thread Al Viro
On Mon, Jan 14, 2008 at 05:28:44PM +1100, Neil Brown wrote: On Monday January 14, [EMAIL PROTECTED] wrote: Thanks. I'll see what I can some up with. How about this, against current -mm On both the read and write path for an rdev attribute, we call mddev_lock, first checking that

Re: [PATCH 002 of 6] md: Fix use-after-free bug when dropping an rdev from an md array.

2008-01-14 Thread Al Viro
On Mon, Jan 14, 2008 at 12:59:39PM +, Al Viro wrote: I really don't like the entire scheme, to be honest. BTW, what happens if you try to add the same device to the same array after having it kicked out? If that comes before your delayed kobject_del(), the things will get nasty since

[oops report analysis] hfs_bnode_split() one (Arjan's #2753)

2008-01-14 Thread Al Viro
-by: Al Viro [EMAIL PROTECTED] --- diff --git a/fs/hfs/brec.c b/fs/hfs/brec.c index 8626ee3..d7971d5 100644 --- a/fs/hfs/brec.c +++ b/fs/hfs/brec.c @@ -229,7 +229,7 @@ skip: static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd) { struct hfs_btree *tree; - struct hfs_bnode

Re: O_NOLINK for open()

2007-09-12 Thread Al Viro
On Wed, Sep 12, 2007 at 05:44:30PM -0500, Brent Casavant wrote: P.S. By the way, there doesn't seem to be a way to remove /proc/#/mem files. That might be an additional nicety -- programs worried about being snooped could unlink their own entry. /dev/mem and /dev/kmem can

Re: Wasting our Freedom

2007-09-17 Thread Al Viro
On Mon, Sep 17, 2007 at 05:03:55PM -0700, David Schwartz wrote: David Schwartz [EMAIL PROTECTED] writes: My point is that you *cannot* prevent a recipient of a derivative work from receiving any rights under either the GPL or the BSD to any protectable elements in that work.

Re: div64: Rework 64-bit type safety checks in do_div().

2007-12-16 Thread Al Viro
On Mon, Dec 17, 2007 at 12:20:19PM +0900, Paul Mundt wrote: (Adding Ingo to CC regarding kernel/lockdep_proc.c..) That seems to be an accurate asessment, yes. If do_div(s64, ...) is buggy behaviour, then the current check is fine, and the callsites should be corrected. Though if there's code

Re: Signed divides vs shifts (Re: [Security] /dev/urandom uses uninit bytes, leaks user data)

2007-12-17 Thread Al Viro
On Mon, Dec 17, 2007 at 09:28:57AM -0800, Linus Torvalds wrote: On Sat, 15 Dec 2007, Herbert Xu wrote: There ought to be a warning about this sort of thing. We could add it to sparse. The appended (untested) patch seems to say there's a lot of those signed divides-by-power-of-twos.

Re: Signed divides vs shifts (Re: [Security] /dev/urandom uses uninit bytes, leaks user data)

2007-12-17 Thread Al Viro
On Mon, Dec 17, 2007 at 06:55:57PM +0100, Eric Dumazet wrote: long *mid(long *a, long *b) { return ((a - b) / 2 + a); } ... is not actually a middle (you'd want b-a, not a-b there), but anyway It gave : mid: movq%rdi, %rdx subq%rsi, %rdx sarq

Re: [Security] Signed divides vs shifts (Re: /dev/urandom uses uninit bytes, leaks user data)

2007-12-17 Thread Al Viro
On Mon, Dec 17, 2007 at 10:28:38AM -0800, Linus Torvalds wrote: [ So Al, when you said that (a-b) is equivalent to ((char *)a-(char *)b)/4 for a int * a and b, you're right in the sense that the *result* is the same, but the code generation likely isn't. The a-b

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread Al Viro
On Tue, Dec 18, 2007 at 05:46:21PM -0500, Mark Lord wrote: Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Because it gives you a security boundary around a subtree. -- To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-18 Thread Al Viro
On Tue, Dec 18, 2007 at 11:00:16PM +, Al Viro wrote: On Tue, Dec 18, 2007 at 05:46:21PM -0500, Mark Lord wrote: Why does link(2) not support hard-linking across bind mount points of the same underlying filesystem ? Because it gives you a security boundary around a subtree. PS

Re: RFC: permit link(2) to work across --bind mounts ?

2007-12-19 Thread Al Viro
On Wed, Dec 19, 2007 at 02:43:26PM +0100, Bodo Eggert wrote: Since nobody knows about this security boundary and everybody knows about the annoying can't link across bind-mountpoints bug, ... how about teaching people to RTFM? Starting, perhaps, with man 2 link? -- To unsubscribe from this

Re: driver spin lock and files_lock deadlock question

2007-12-20 Thread Al Viro
On Thu, Dec 20, 2007 at 10:59:20PM -0800, Srinivas Kommu wrote: It seems this kind of a deadlock can happen with any kernel lock, not just files_lock. What's the driver's mistake here? Is it wrong to call remove_proc_entry() while holding another lock? What is the right thing to do?

Re: Major regression on hackbench with SLUB (more numbers)

2007-12-22 Thread Al Viro
On Sat, Dec 22, 2007 at 01:00:09PM -0800, Linus Torvalds wrote: Another problem with using /sys/slab is that it is downright *ugly*. Why is it for example, that /sys/slab/dentry is a symlink to ../slab/:a-160? That's the only really ugly thing there. Otherwise, it's pretty nice, but

Re: Major regression on hackbench with SLUB (more numbers)

2007-12-22 Thread Al Viro
On Sat, Dec 22, 2007 at 09:50:09PM +, Al Viro wrote: On Sat, Dec 22, 2007 at 01:00:09PM -0800, Linus Torvalds wrote: Another problem with using /sys/slab is that it is downright *ugly*. Why is it for example, that /sys/slab/dentry is a symlink to ../slab/:a-160? That's

Re: [git patches] net driver fixes

2007-12-22 Thread Al Viro
On Sun, Dec 23, 2007 at 12:33:14AM -0500, Jeff Garzik wrote: A couple [minorly] notable wireless bug fixes, and plenty of viro fixes for obscure issues :) Heh... FWIW, forcedeth patch (sent your way about two weeks ago) also belongs in the same set. If you need a resend - tell... There's

Re: [git patches] net driver fixes

2007-12-22 Thread Al Viro
On Sun, Dec 23, 2007 at 01:42:14AM -0500, Jeff Garzik wrote: I applied it to #upstream (2.6.25) since forcedeth is not on any big-endian platforms AFAIK. All right, then... I hadn't been sure if it's onboard-only, that's all. I have an epic100 card too if you need it (though it sounds like

tlb_finish_mmu() bogisity

2007-12-23 Thread Al Viro
tlb-need_flush += __get_cpu_var(quicklist)[0].nr_pages != 0; makes no sense whatsoever. How the hell can you ever get the address of __get_cpu_var(quicklist)[0].nr_pages to be NULL? Postfix operators have higher precedence than prefix ones, so that's

[PATCH] uml: user of helper_wait() got missed when it got extra arguments

2007-12-23 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- arch/um/drivers/harddog_user.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/drivers/harddog_user.c b/arch/um/drivers/harddog_user.c index b56f8e0..448ba59 100644 --- a/arch/um/drivers/harddog_user.c +++ b/arch/um

Re: Out of tree module using LSM

2007-11-29 Thread Al Viro
On Thu, Nov 29, 2007 at 09:35:56AM -0800, Ray Lee wrote: Perhaps if you looked at this outside of a file-server scenario, the problem would be clearer? Anti-malware companies want to check anything written to disk on a system, either at write time or blocking the open/mmap. That means

Re: Out of tree module using LSM

2007-11-29 Thread Al Viro
On Thu, Nov 29, 2007 at 03:56:28PM -0500, [EMAIL PROTECTED] wrote: Yes, most of these schemes *can* be bypassed because some malicious code does a mmap() or similar trick. But what is being overlooked here is that in most cases, what is *desired* is a way to filter things being handled by

Re: Out of tree module using LSM

2007-11-29 Thread Al Viro
On Thu, Nov 29, 2007 at 03:12:38PM -0700, Justin Banks wrote: It's not perfect, but as was recently pointed out, if you can only get 98% of the way there rather than 100% is that a reason for not trying to make it possible? BTW, that's a fine example of a common fallacy: $FOO is 98% of the

Re: Kernel Development Objective-C

2007-11-30 Thread Al Viro
On Sat, Dec 01, 2007 at 12:31:19AM +, Al Viro wrote: somehow be reassigned back and forth, according to the value of this. The s/this/thing/, of course - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info

Re: Kernel Development Objective-C

2007-11-30 Thread Al Viro
On Sat, Dec 01, 2007 at 12:19:50AM +0100, J.A. Magall??n wrote: An vtable in C++ takes exactly the same space that the function table pointer present in every driver nowadays... and probably the virtual method call that C++ does itself with thing-do_something(with,this) like

[PATCH] regression: bfs endianness bug

2007-12-05 Thread Al Viro
. Introduced in commit f433dc56344cb72cc3de5ba0819021cec3aef807 (Fixes to the BFS filesystem driver). Signed-off-by: Al Viro [EMAIL PROTECTED] --- diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index 294c41b..a64a71d 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c @@ -178,7 +178,8 @@ static void

[PATCH] no need to mess with KBUILD_CFLAGS on uml-i386 anymore

2007-12-05 Thread Al Viro
Now that X86_32 is provided on Kconfig level for uml-i386, there's no need to play with it explicitly on Makefile level anymore. Signed-off-by: Al Viro [EMAIL PROTECTED] --- diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386 index 6729011..561e373 100644 --- a/arch/um/Makefile

[PATCH] remove nonsense force-casts from ocfs2

2007-12-05 Thread Al Viro
for no reason whatsoever... Signed-off-by: Al Viro [EMAIL PROTECTED] --- diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index d84bd15..ee50c96 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c @@ -72,14 +72,6 @@ #include tcp_internal.h -/* - * The linux network stack

[PATCH] fcrypt endianness misannotations

2007-12-05 Thread Al Viro
Signed-off-by: Al Viro [EMAIL PROTECTED] --- diff --git a/crypto/fcrypt.c b/crypto/fcrypt.c index d161949..a32cb68 100644 --- a/crypto/fcrypt.c +++ b/crypto/fcrypt.c @@ -51,7 +51,7 @@ #define ROUNDS 16 struct fcrypt_ctx { - u32 sched[ROUNDS]; + __be32 sched[ROUNDS

[PATCH] regression: cifs endianness bug

2007-12-05 Thread Al Viro
access_flags_to_mode() gets on-the-wire data (little-endian) and treats it as host-endian. Introduced in commit e01b64001359034d04c695388870936ed3d1b56b ([CIFS] enable get mode from ACL when cifsacl mount option specified) Signed-off-by: Al Viro [EMAIL PROTECTED] --- diff --git a/fs/cifs

  1   2   3   4   5   6   7   8   9   10   >