[PATCH 2/4] kmemcheck v4

2008-02-14 Thread Vegard Nossum
From 5cbf7d1cb81b4f8bb4d80c027b74cdf0f08aaaff Mon Sep 17 00:00:00 2001 From: Vegard Nossum <[EMAIL PROTECTED]> Date: Thu, 14 Feb 2008 19:20:51 +0100 Subject: [PATCH] kmemcheck: add the x86 hooks The hooks that we modify are: - Page fault handler (to handle kmemcheck faults) - Debug exc

[PATCH 3/4] kmemcheck v4

2008-02-14 Thread Vegard Nossum
From 4ce1c09e38b2402dc04f0246916f3c23abe8f3e1 Mon Sep 17 00:00:00 2001 From: Vegard Nossum <[EMAIL PROTECTED]> Date: Thu, 14 Feb 2008 19:25:39 +0100 Subject: [PATCH] kmemcheck: make SLUB use kmemcheck With kmemcheck enabled, SLUB needs to do this: 1. Request twice as much memory as

[PATCH 4/4] kmemcheck v4

2008-02-14 Thread Vegard Nossum
From f65bd157b88d3ae9a75737cdff5d6f27920af43d Mon Sep 17 00:00:00 2001 From: Ingo Molnar <[EMAIL PROTECTED]> Date: Thu, 14 Feb 2008 20:53:42 +0100 Subject: [PATCH] kmemcheck: Fix-up (some bogus) reports Signed-off-by: Vegard Nossum <[EMAIL PROTECTED]> --- include/asm-generic/sigi

[PATCH 1/4] kmemcheck v4

2008-02-14 Thread Vegard Nossum
ds, Vegard Nossum From 0fcca4341b6b1b277d936558aa3cab0f212bad9b Mon Sep 17 00:00:00 2001 From: Vegard Nossum <[EMAIL PROTECTED]> Date: Thu, 14 Feb 2008 19:10:40 +0100 Subject: [PATCH] kmemcheck: add the core kmemcheck changes General description: kmemcheck is a patch to the linux kernel tha

Re: [PATCH 4/4] kmemcheck v4

2008-02-14 Thread Vegard Nossum
On 2/14/08, Pekka Enberg <[EMAIL PROTECTED]> wrote: > Hi, > > > Vegard Nossum wrote: > > diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h > > index 412672a..7bdb37f 100644 > > --- a/include/linux/skbuff.h > > +++ b/include/linux/skbuff.h

Re: [PATCH 4/4] kmemcheck v4

2008-02-15 Thread Vegard Nossum
On Thu, Feb 14, 2008 at 10:49 PM, Andi Kleen <[EMAIL PROTECTED]> wrote: > The ifdefs are quite ugly. I would recommend to define standard > functions (kmemcheck_init_zero or similar and an own __GFP flag) that can > be used without ifdef and easily nop'ed out on !KMEMCHECK kernels. Yes, they ar

Re: [PATCH 1/2] kmemcheck v3

2008-02-07 Thread Vegard Nossum
Hello, Thank you for taking the time to look at this patch! On Feb 7, 2008 10:53 PM, Christoph Lameter <[EMAIL PROTECTED]> wrote: > On Thu, 7 Feb 2008, Vegard Nossum wrote: > > > --- a/include/linux/slab.h > > +++ b/include/linux/slab.h > > @@ -28,6 +28,7 @@ &g

[PATCH 2/2] kmemcheck v3

2008-02-07 Thread Vegard Nossum
Applies on top of kmemcheck patch. Fixes/silences some reports of use of uninitialized memory. From: Ingo Molnar <[EMAIL PROTECTED]> Signed-off-by: Vegard Nossum <[EMAIL PROTECTED]> diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h index 8786e01..b70cd97

Re: [PATCH 1/2] kmemcheck v3

2008-02-07 Thread Vegard Nossum
ere memory is used before it is initialized. This is a heavier-weight approach, however, and more precise, as it gives you the exact location of the error. I hope this clears it up. Kind regards, Vegard Nossum -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" i

[PATCH 1/2] kmemcheck v3

2008-02-07 Thread Vegard Nossum
if a chunk of memory is used for DMA. Ideally, DMA should be allocated with untracked caches, but this requires annotation of the drivers in question. The patch applies to linux-2.6.git. Kind regards, Vegard Nossum arch/x86/Kconfig.debug | 35 +++ arch/x86/kernel/Makefile

Re: [PATCH 1/2] kmemcheck v3

2008-02-08 Thread Vegard Nossum
On 2/8/08, Andi Kleen <[EMAIL PROTECTED]> wrote: > On Fri, Feb 08, 2008 at 01:18:37PM +0100, Vegard Nossum wrote: > > On 2/8/08, Andi Kleen <[EMAIL PROTECTED]> wrote: > > > Your assumption that only the string instructions can take > > > multiple p

Re: [PATCH 1/2] kmemcheck v3

2008-02-08 Thread Vegard Nossum
andle all the faulting addresses, it will simply fault again and again, without making any progress. I mean, it won't go unnoticed for very long :-) This is also why we depend on M386 and !X86_GENERIC, to avoid those MMX, etc. instructions, as we have no support for those currently. Sincerely, Vega

mm/slub.c warnings

2008-02-09 Thread Vegard Nossum
Hi, I get these warnings when compiling mm/slub.c in linux-2.6.git: mm/slub.c: In function 'slab_alloc': mm/slub.c:1637: warning: assignment makes pointer from integer without a cast mm/slub.c:1637: warning: assignment makes pointer from integer without a cast mm/slub.c: In function 'slab_free':

Re: kmemcheck: Fatal error; system fails to boot when kmemcheck enabled

2012-07-13 Thread Vegard Nossum
Hi, On Fri, 13 Jul 2012 00:33:07 +0300, Sami Liedes wrote: > Hi, > > Kernel 3.4.4 with kmemcheck enabled does not correctly boot on my > system, which is a x86-64, Core i7 Sandy Bridge computer with Asus > P8P67-EVO motherboard. The errors seem to be related to ACPI, but > there may be other thin

make[3]: *** [sound/drivers/opl3/opl3_synth.o] Error 1

2008-02-22 Thread Vegard Nossum
Hi. make randconfig (v2.6.25-rc2 + unrelated patches) found this: CC [M] sound/drivers/opl3/opl3_synth.o sound/drivers/opl3/opl3_synth.c: In function ‘snd_opl3_find_patch’: sound/drivers/opl3/opl3_synth.c:308: error: ‘OPL3_PATCH_HASH_SIZE’ undeclared (first use in this function) sound/driver

[PATCH] x86: don't save unreliable stack trace entries

2008-02-22 Thread Vegard Nossum
users of save_stack_trace() and all arches saving this information to change. Kind regards, Vegard Nossum From 5edfd896c5f0d728111df3d8cae729a375f29d3c Mon Sep 17 00:00:00 2001 From: Vegard Nossum <[EMAIL PROTECTED]> Date: Fri, 22 Feb 2008 19:23:58 +0100 Subject: [PATCH] x86: don&

[PATCH] stacktrace: add reliability information to saved stack traces

2008-02-23 Thread Vegard Nossum
Hi again, This patch is different (probably better?), but touches all users and all architectures implementing stacktrace saving. If you want it, it's here... :-) Kind regards, Vegard Nossum From 98d928d337dca6326773d43da90a268e5ff0c098 Mon Sep 17 00:00:00 2001 From: Vegard Nossum &l

ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)

2008-02-23 Thread Vegard Nossum
her !SMP kernel works fine. The problem also exists in 2.6.24-rc2. Kind regards, Vegard Nossum -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Ple

Re: ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)

2008-02-23 Thread Vegard Nossum
On Sat, Feb 23, 2008 at 7:31 PM, Alan Cox <[EMAIL PROTECTED]> wrote: > O> I don't see the connection between (no-)smp and ata. Something with > > > interrupt routing/IPI, missing irq ack? Booting another !SMP kernel > > works fine. The problem also exists in 2.6.24-rc2. > > Almost certainly inter

Re: ata1.00: failed to IDENTIFY (I/O error, err_mask=0x4)

2008-02-23 Thread Vegard Nossum
On Sat, Feb 23, 2008 at 7:31 PM, Alan Cox <[EMAIL PROTECTED]> wrote: > O> I don't see the connection between (no-)smp and ata. Something with > > > interrupt routing/IPI, missing irq ack? Booting another !SMP kernel > > works fine. The problem also exists in 2.6.24-rc2. > > Almost certainly inter

Re: compile problem in current x86.git

2008-02-25 Thread Vegard Nossum
Hello! On Mon, Feb 25, 2008 at 8:23 PM, Jeremy Fitzhardinge <[EMAIL PROTECTED]> wrote: > CC arch/x86/kernel/traps_32.o > /home/jeremy/hg/xen/paravirt/linux/arch/x86/kernel/traps_32.c:59:27: error: > asm/kmemcheck.h: No such file or directory > > > asm-x86/kmemcheck.h does seem to be comp

[BISECTED] Re: psmouse.c: GlidePoint at isa0060/serio1/input0 lost sync at byte 1

2008-01-07 Thread Vegard Nossum
Hi, On Nov 14, 2007 9:26 PM, Vegard Nossum <[EMAIL PROTECTED]> wrote: > Hello, > > With 2.6.23 kernel, the laptop middle button worked fine. With > 2.6.24-rc1, when I press the middle button, the cursor jumps around > the screen and this appears in the kernel log (for ea

Re: [RESULTS] Port 0x80 I/O speed

2007-12-12 Thread Vegard Nossum
On Dec 12, 2007 8:14 PM, Rene Herman <[EMAIL PROTECTED]> wrote: > Time varies between 0.54 microseconds and 2.50 microseconds, with most > around 1.3/1.4 microseconds. Numbers 58, 59 and 60 (the ones at > 2 us) I > dont completely trust since similar machines are among the fastest as well. Hi. Ju

Re: [RFC][PATCH] New message-logging API (kprint)

2007-10-05 Thread Vegard Nossum
On 10/5/07, Rob Landley <[EMAIL PROTECTED]> wrote: > On Thursday 04 October 2007 3:17:03 pm Randy Dunlap wrote: > > On Thu, 04 Oct 2007 22:04:07 +0200 Vegard Nossum wrote: > > > Description: This patch largely implements the kprint API as previously > > > po

Re: [RFC][PATCH] New message-logging API (kprint)

2007-10-05 Thread Vegard Nossum
On 10/5/07, Rob Landley <[EMAIL PROTECTED]> wrote: > The original idea (selectively compile out printk() instances based on log > level to conserve space) is explicitly not addressed by this patch, and in > fact this patch might actually make it harder to implement (by complicating > the code). Th

Re: [RFC][PATCH] New message-logging API (kprint)

2007-10-08 Thread Vegard Nossum
On 10/8/07, Stephen Hemminger <[EMAIL PROTECTED]> wrote: > On Sun, 7 Oct 2007 16:50:49 -0500 > Rob Landley <[EMAIL PROTECTED]> wrote: > > > On Saturday 06 October 2007 1:10:26 am Vegard Nossum wrote: > > > On 10/5/07, Rob Landley <[EMAIL PROTECTED]> wrot

[RFC][PATCH] Escaping the arguments of kernel messages for sane user-space localisation

2007-10-08 Thread Vegard Nossum
Alan, I send here the simplified patch to emit log messages with markers for the message arguments, as per your suggestion. Do you still think this is over-kill? The rigour exists in order to preserve the generality of snprintf(), instead of changing it to include printk-specific code, which in m

Re: [RFC][PATCH] Escaping the arguments of kernel messages for sane user-space localisation

2007-10-09 Thread Vegard Nossum
Hello again, On Mon, 2007-10-08 at 21:45 +0200, Vegard Nossum wrote: > These functions make it quite easy to make snprintf() automatically > escape certain characters in string arguments, for example. I think they > are also well suited to printing to variable-sized buffers, though t

[PATCH] init: Fix printk format strings

2007-10-10 Thread Vegard Nossum
This makes sure printk format strings are string literals containing no more than a single line. Signed-off-by: Vegard Nossum <[EMAIL PROTECTED]> --- init/calibrate.c|4 +++- init/do_mounts_initrd.c |5 - init/main.c |2 +- 3 files changed, 8 insertions

[PATCH] Fix printk format strings

2007-10-10 Thread Vegard Nossum
This makes sure printk format strings contain no more than a single line. Signed-off-by: Vegard Nossum <[EMAIL PROTECTED]> --- kernel/time/timer_list.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index f

[PATCH] mm: Fix printk format strings

2007-10-10 Thread Vegard Nossum
This makes sure printk format strings contain no more than a single line. Signed-off-by: Vegard Nossum <[EMAIL PROTECTED]> --- mm/page_alloc.c | 20 +++- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 1a8c595..9

Re: [PATCH] mm: Fix printk format strings

2007-10-11 Thread Vegard Nossum
On 10/11/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > On Thu, 11 Oct 2007 08:47:01 +0200 Vegard Nossum <[EMAIL PROTECTED]> wrote: > > > This makes sure printk format strings contain no more than a single > > line. > > > > Signed-off-by: Vegard

Re: [PATCH] mm: Fix printk format strings

2007-10-11 Thread Vegard Nossum
On 10/11/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > On Thu, 11 Oct 2007 09:04:57 +0200 "Vegard Nossum" <[EMAIL PROTECTED]> wrote: > > > > > - printk("Active:%lu inactive:%lu dirty:%lu writeback:%lu > > > > unstable:%lu\n" >

[PATCH] FAT: Fix printk format strings.

2007-10-11 Thread Vegard Nossum
This makes sure printk format strings contain no more than a single line. Signed-off-by: Vegard Nossum <[EMAIL PROTECTED]> --- fs/fat/inode.c |3 ++- fs/fat/misc.c |3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 4

Re: [PATCH] init: Fix printk format strings

2007-10-11 Thread Vegard Nossum
On 10/11/07, Randy Dunlap <[EMAIL PROTECTED]> wrote: > On Thu, 11 Oct 2007 08:17:02 +0200 Vegard Nossum wrote: > > > This makes sure printk format strings are string literals containing no > > more than a single line. > > Each patch needs justification (

Re: [PATCH] init: Fix printk format strings

2007-10-11 Thread Vegard Nossum
On 10/11/07, Randy Dunlap <[EMAIL PROTECTED]> wrote: > On Thu, 11 Oct 2007 17:55:16 +0200 Vegard Nossum wrote: > > > On 10/11/07, Randy Dunlap <[EMAIL PROTECTED]> wrote: > > > On Thu, 11 Oct 2007 08:17:02 +0200 Vegard Nossum wrote: > > > > > >

Re: [PATCH] init: Fix printk format strings

2007-10-11 Thread Vegard Nossum
On 10/11/07, Johannes Weiner <[EMAIL PROTECTED]> wrote: > On Thu, Oct 11, 2007 at 08:17:02AM +0200, Vegard Nossum wrote: > > This makes sure printk format strings are string literals containing no > > more than a single line. > > Perhaps you should write _why_ one-lin

Re: [RFC] kmemcheck: trap uses of uninitialized memory (v2)

2007-11-28 Thread Vegard Nossum
Hi, On Nov 28, 2007 7:51 AM, Richard Knutsson <[EMAIL PROTECTED]> wrote: > Vegard Nossum wrote: > > +static int > Not 'static bool'? > > +page_is_tracked(struct page *page) > Why not returning 'false' and 'true'? Sorry, I am not used to us

Re: [RFC] kmemcheck: trap uses of uninitialized memory (v2)

2007-11-29 Thread Vegard Nossum
Hi, On Nov 29, 2007 9:02 AM, Pekka Enberg <[EMAIL PROTECTED]> wrote: > Hi Vegard, > > On Nov 27, 2007 5:16 PM, Vegard Nossum <[EMAIL PROTECTED]> wrote: > > +config KMEMCHECK > > + bool "Trap use of uninitialized memory" > > + depends on

Re: [RFC] kmemcheck: trap uses of uninitialized memory (v2)

2007-11-29 Thread Vegard Nossum
ess memory. You might also want to make > > > kzalloc() and GFP_ZERO mark the memory area as initialized to avoid > > > some page faults. > > On Thu, 29 Nov 2007, Vegard Nossum wrote: > > Yes, we are in fact only tracking the memory within SLUB allocations > > (minus w

Re: [RFC] kmemcheck: trap uses of uninitialized memory (v2)

2007-11-29 Thread Vegard Nossum
On 29 Nov 2007 11:29:48 +0100, Andi Kleen <[EMAIL PROTECTED]> wrote: > Vegard Nossum <[EMAIL PROTECTED]> writes: > > > > - We properly flush TLB entries that change. This used to not be the case, > > and so we > > For low values of "proper

Re: [BUG 2.6.24-rc3-git6] SLUB's ksize() fails for size > 2048.

2007-12-02 Thread Vegard Nossum
On Dec 2, 2007 11:39 AM, Tetsuo Handa <[EMAIL PROTECTED]> wrote: > Hello. > > I can't pass memory allocated by kmalloc() to ksize() > if it is allocated by SLUB allocator and > size is larger than (I guess) PAGE_SIZE / 2. > > Regards. Take a look at mm/slub.c around line 2560, in __kmalloc:

Re: [BUG 2.6.24-rc3-git6] SLUB's ksize() fails for size > 2048.

2007-12-02 Thread Vegard Nossum
On Dec 2, 2007 5:30 PM, Vegard Nossum <[EMAIL PROTECTED]> wrote: > On Dec 2, 2007 11:39 AM, Tetsuo Handa > <[EMAIL PROTECTED]> wrote: > > Hello. > > > > I can't pass memory allocated by kmalloc() to ksize() > > if it is allocated by SLUB allocator

[RFC][PATCH] Implement a memory checker for kernel allocations (kmemcheck)

2007-11-19 Thread Vegard Nossum
s to), but that's a detail. The important thing (for now) is to get it working without any false reports. I will try to test it more myself and see if it can actually come up with something that is a real error. Kind regards, Vegard Nossum Sample output: TCP cubic registered Initializi

[RFC] kmemcheck: trap uses of uninitialized memory (v2)

2007-11-27 Thread Vegard Nossum
ither qemu-cvs or qemu-0.9.0 with the following patch: http://lists.gnu.org/archive/html/qemu-devel/2007-03/msg00126.html In addition, you probably want to remove the -O2 entirely from the Makefile to inhibit inlining, which makes the stack traces somewhat better. Kind regards, Vegard Nossum

Re: [BISECTED] Re: psmouse.c: GlidePoint at isa0060/serio1/input0 lost sync at byte 1

2008-01-15 Thread Vegard Nossum
Dmitry Torokhov wrote: echo 1 > /sys/module/i8042/parameters/debug push and release left button push and release rigth button move finger on the touchpad a bit echo 0 > /sys/module/i8042/parameters/debug dmesg > dmesg.sync echo 1 > /sys/module/i8042/parameters/debug push and release middle button

Re: [BISECTED] Re: psmouse.c: GlidePoint at isa0060/serio1/input0 lost sync at byte 1

2008-01-16 Thread Vegard Nossum
Hi, On Jan 16, 2008 4:42 PM, Dmitry Torokhov <[EMAIL PROTECTED]> wrote: > Ok, how about this one to begin with? > > Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]> > --- > drivers/input/mouse/alps.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: linux/drivers/input/mouse

Re: [BISECTED] Re: psmouse.c: GlidePoint at isa0060/serio1/input0 lost sync at byte 1

2008-01-16 Thread Vegard Nossum
On Jan 16, 2008 8:33 PM, Dmitry Torokhov <[EMAIL PROTECTED]> wrote: > On Wed, Jan 16, 2008 at 06:46:46PM +0100, Vegard Nossum wrote: > > > > I have now tried this patch. I don't see a sync error now, but the > > button still does not work as expected. Now the sc

Re: [BISECTED] Re: psmouse.c: GlidePoint at isa0060/serio1/input0 lost sync at byte 1

2008-01-17 Thread Vegard Nossum
is this the Intellimouse?) since this used to work perfectly for me earlier. Maybe I can just remove the GlidePoint driver from my kernel to force the older driver? Kind regards, Vegard Nossum -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a mess

lib/idr.c: initialize struct idr_layer

2008-01-27 Thread Vegard Nossum
Hi, I am testing my kmemcheck patches, and it has come up with a couple of uses of uninitialized memory in lib/idr.c. These are (the line numbers may differ slightly): line 135 (sub_alloc): bm = ~p->bitmap; p->bitmap is uninitialized line 171 (sub_alloc): if (!p->ary[m]) { p->ary is uninitialize

Re: lib/idr.c: initialize struct idr_layer

2008-01-27 Thread Vegard Nossum
On Jan 27, 2008 10:00 PM, Pekka Enberg <[EMAIL PROTECTED]> wrote: > Hi Vegard, > > On Jan 27, 2008 10:07 PM, Vegard Nossum <[EMAIL PROTECTED]> wrote: > > I am testing my kmemcheck patches, and it has come up with a couple of > > uses of uninitialized memory

Re: lib/idr.c: initialize struct idr_layer

2008-01-27 Thread Vegard Nossum
On Jan 27, 2008 10:21 PM, Pekka J Enberg <[EMAIL PROTECTED]> wrote: > On Sun, 27 Jan 2008, Vegard Nossum wrote: > > Though in this case, idr_pre_get() actually *is* called first. Hmm... > > I think there's a pretty big chance that kmemcheck is at fault :-( > >

Re: lib/idr.c: initialize struct idr_layer

2008-01-27 Thread Vegard Nossum
On Jan 27, 2008 10:35 PM, Pekka Enberg <[EMAIL PROTECTED]> wrote: > > I think there's a pretty big chance I'm wrong (or misunderstanding > > something) here, so I'll just ask: > > setup_object() from mm/slub.c is what calls the ctor. Shouldn't this > > be called from slab_alloc() as well? (I'm mark

Re: [PATCH] Include header required for INT_MAX

2007-11-12 Thread Vegard Nossum
On Nov 12, 2007 1:06 PM, Andreas Schwab <[EMAIL PROTECTED]> wrote: > "Robert P. J. Day" <[EMAIL PROTECTED]> writes: > > > On Mon, 12 Nov 2007, Andreas Schwab wrote: > > > >> Jan Engelhardt <[EMAIL PROTECTED]> writes: > >> > >> > No, because I be damn sure that some developers try compiling programs

psmouse.c: GlidePoint at isa0060/serio1/input0 lost sync at byte 1

2007-11-14 Thread Vegard Nossum
: PS/2 mouse device common for all mice input: ImPS/2 Generic Wheel Mouse as /class/input/input2 It seems that the driver used is different. What can I do to fix this? Kind regards, Vegard Nossum - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: Check handling of kernel build output directory

2007-10-26 Thread Vegard Nossum
On 10/26/07, Markus Elfring <[EMAIL PROTECTED]> wrote: > Hello, > > Two ways are mentioned in the Makefile for the Linux kernel 2.6.31.1 to > specify output > diretories. The description of the environment variable "KBUILD_OUTPUT" is > missing from > the file "README". Aren't you supposed to use

[PATCH] sprintf() to snprintf() and some style changes

2007-02-08 Thread Vegard Nossum
To: linux-kernel@vger.kernel.org Cc: [EMAIL PROTECTED] From: Vegard Nossum <[EMAIL PROTECTED]> Date: Thu Feb 8 19:57:16 2007 +0100 Subject: [PATCH] sprintf() to snprintf() and some style changes Change a few instances of sprintf() to the safer snprintf(). Nicely split lines that exceed 80 c

Re: [PATCH] sprintf() to snprintf() and some style changes

2007-02-08 Thread Vegard Nossum
I thought my mailer wouldn't do that. :-( This one should be right. From: Vegard Nossum <[EMAIL PROTECTED]> Date: Thu Feb 8 19:57:16 2007 +0100 Subject: [PATCH] sprintf() to snprintf() and some style changes Change a few instances of sprintf() to the safer snprintf(). Nicely split

Re: [PATCH] Add "is_power_of_2" checking to log2.h.

2007-01-31 Thread Vegard Nossum
On Tue, January 30, 2007 3:12 pm, Jan Engelhardt wrote: > >>> Why the qualifier? Zero *is* not a power of 2, is it? > > No, it is not: > > In[1]:= Solve[2^n == 0, n] > > Out[1]= {} > > So says Mathematica5. As a side note, I would just like to point out that Mathematica does not deal w

IRQ handler type mismatch for IRQ 7

2007-06-11 Thread Vegard Nossum
The machine still runs, though X.org crashes with SIGSEGV. I have a feeling the two are unrelated. The full dmesg follows. Kind regards, Vegard Nossum Linux version 2.6.21-1.3194.fc7 ([EMAIL PROTECTED]) (gcc version 4.1.2 20070502 (Red Hat 4.1.2-12)) #1 SMP Wed May 23 22:47:07 EDT 2007 Command lin

Re: IRQ handler type mismatch for IRQ 7

2007-06-11 Thread Vegard Nossum
On 6/11/07, Ingo Molnar <[EMAIL PROTECTED]> wrote: so both parport and serial is on the same IRQ: #7, but the parport one does not support shared interrupt lines (IRQF_SHARED). You can probably change the mapping in the BIOS (change the serial one to say IRQ#3 or IRQ#4). I suspect you dont have a

Re: How to printk unsigned long long variable?

2007-06-15 Thread Vegard Nossum
On 6/15/07, jidong xiao <[EMAIL PROTECTED]> wrote: typedef unsigned long long u64; u64 *dma_mask; Then how to use printk() to print out a dma_mask variable? In regular printf(), this would be specified by the format "%llu". Try that? Vegard - To unsubscribe from this list: send the

[PATCH] Optimize is_power_of_2().

2007-06-15 Thread Vegard Nossum
From: Vegard Nossum <[EMAIL PROTECTED]> Date: Fri, 15 Jun 2007 18:35:49 +0200 Subject: [PATCH] Optimize is_power_of_2(). Rationale: Removes one conditional branch and reduces icache footprint. Proof: If n is false, the product of n and any value is false. If n is true, the truth of (n * x)

Re: [patch] CFS scheduler, -v18

2007-07-02 Thread Vegard Nossum
lockups) with -v8, though it has not been reproducible with -v18, so I suppose it must have been fixed already. Otherwise, I am satisfied with the performance of CFS. Especially the desktop is noticably smoother. Thanks! Kind regards, Vegard Nossum - To unsubscribe from this list: send the line &q

Re: [patch] CFS scheduler, -v18

2007-07-02 Thread Vegard Nossum
On 7/2/07, Dmitry Adamushko <[EMAIL PROTECTED]> wrote: On 02/07/07, Vegard Nossum <[EMAIL PROTECTED]> wrote: > I have been running cfs-v18 for a couple of days now, and today I > stumbled upon a rather strange problem. Consider the following short > program: > > while

Re: [patch] CFS scheduler, -v18

2007-07-02 Thread Vegard Nossum
On 7/2/07, Ingo Molnar <[EMAIL PROTECTED]> wrote: thx. As an initial matter, could you double-check whether your v18 kernel source has the patch below applied already? Ingo Index: linux/kernel/sched_fair.c === --- linux.ori

Re: [patch] CFS scheduler, -v18

2007-07-03 Thread Vegard Nossum
On 7/2/07, Ingo Molnar <[EMAIL PROTECTED]> wrote: ok. Does the xterm slowdown get any better if you do: echo 46 > /proc/sys/kernel/sched_features ? The default on v18 is: echo 14 > /proc/sys/kernel/sched_features No. The Ctrl-C still hangs between 1 and 3 seconds, again seemingly dependi

Re: [patch] CFS scheduler, -v18

2007-07-03 Thread Vegard Nossum
On 7/3/07, Ingo Molnar <[EMAIL PROTECTED]> wrote: does it still get more CPU time than you'd expect it to get? A reniced or SCHED_IDLE task will 'fill in' any idle time that it senses, so in itself it's not an anomaly if a task gets 50% and FEH fills in the remaining 50%. Does it still get CPU ti

Re: Linux 2.6.21

2007-04-30 Thread Vegard Nossum
On Mon, April 30, 2007 8:57 pm, Adrian Bunk wrote: > I never expected the reality to be come as white as my ideal or the > washed things in washing powder ads. This reminds me very much of what the brilliant computing scientist Edsger W. Dijkstra more than once wrote: `Confusing "love of perfecti

Re: [patch] CFS scheduler, -v8

2007-05-02 Thread Vegard Nossum
On Tue, May 1, 2007 11:22 pm, Ingo Molnar wrote: > As usual, any sort of feedback, bugreport, fix and suggestion is more than welcome, Hi, The sys_sched_yield_to() is not callable from userspace on i386 because it is not part of the syscall table (arch/i386/kernel/syscall_table.S). This causes sy

cleanup_net()/net_mutex hung tasks + kobject release debugging

2016-07-21 Thread Vegard Nossum
Hi Dave + list, I've started doing some trinity fuzzing and I'm seeing quite a few hung tasks ("blocked for more than 120 seconds"). It started with unshare()/net_mutex which I found a few others running into as well: http://www.spinics.net/lists/trinity/msg00724.html http://www.spinics.net/lis

[PATCH] 9p/trans_virtio: use kvfree() for iov_iter_get_pages_alloc()

2016-07-22 Thread Vegard Nossum
a04bafec038 ]--- Cc: Al Viro Signed-off-by: Vegard Nossum --- net/9p/trans_virtio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 4acb1d5..f24b25c 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -5

[PATCH] ACPICA: cleanup method properly on error

2016-07-22 Thread Vegard Nossum
e new state. You can observe this when reading e.g. /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0F:01/status Cc: sta...@vger.kernel.org Signed-off-by: Vegard Nossum --- drivers/acpi/acpica/dsmethod.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers

[PATCH] sched/core: add taint on "BUG: sleeping function called from invalid context"

2016-07-22 Thread Vegard Nossum
Signed-off-by: Vegard Nossum --- kernel/sched/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 97ee9ac..7171cf9 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7573,6 +7573,7 @@ void ___might_sleep(const char *file, int line

[PATCH] net/irda: fix NULL pointer dereference on memory allocation failure

2016-07-22 Thread Vegard Nossum
055b30 ]--- The problem is that irda_open_tsap() can fail and leave self->tsap = NULL, and then irttp_connect_request() almost immediately dereferences it. Cc: sta...@vger.kernel.org Signed-off-by: Vegard Nossum --- net/irda/af_irda.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions

[PATCH] tipc: fix NULL pointer dereference in shutdown()

2016-07-22 Thread Vegard Nossum
tipc_msg_create() callers. Cc: sta...@vger.kernel.org Signed-off-by: Vegard Nossum --- net/tipc/socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index c49b8df..f9f5f3c 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2180,7 +2

[PATCH] sched/core: make "Preemption disabled at" message more useful

2016-07-23 Thread Vegard Nossum
Preemption disabled at:[] rhashtable_walk_start+0x46/0x150 (Bug report: http://marc.info/?l=linux-netdev&m=146925979821849&w=2) Cc: Peter Zijlstra Cc: Paul E. McKenney Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Rusty Russel Signed-off-by: Vegard Nossum --- kernel/sched/cor

Re: [PATCH] kcov: properly check if we are in an interrupt

2016-09-27 Thread Vegard Nossum
On 09/27/2016 09:50 AM, Dmitry Vyukov wrote: On Tue, Sep 27, 2016 at 9:34 AM, Peter Zijlstra wrote: On Tue, Sep 27, 2016 at 08:21:32AM +0200, Dmitry Vyukov wrote: I suspect there is a bunch of places that use in_interrupt(), but mean the same as KCOV wants -- am I in interrupt? and not am I i

Re: [PATCH] kcov: properly check if we are in an interrupt

2016-09-27 Thread Vegard Nossum
On 09/27/2016 01:20 PM, Vegard Nossum wrote: Your patch was: -if (!t || in_interrupt()) +if (!t || (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_OFFSET +| NMI_MASK))) But look at the definitions: #define irq_count() (preempt_count() & (HARD

NULL ptr deref in perf/filter_match

2016-07-27 Thread Vegard Nossum
Hi, I'm seeing this on latest linus/master: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.7.0+ #

[PATCH] mm: fail prefaulting if page table allocation fails

2016-07-28 Thread Vegard Nossum
c008b5c ("mm: postpone page table allocation until we have page to map") Cc: Kirill A. Shutemov Signed-off-by: Vegard Nossum --- mm/memory.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/memory.c b/mm/memory.c index 4425b60..0400483 100644 --- a/mm/memory.c +++ b/mm/memor

Re: [PATCH] sched/core: add taint on "BUG: sleeping function called from invalid context"

2016-07-28 Thread Vegard Nossum
On 07/29/2016 03:22 AM, Rusty Russell wrote: Vegard Nossum writes: Seeing this, it occurs to me that we should probably add a taint here: Taint has traditionally meant "the user did something unsupported, take the bug report with a grain of salt". Such as force removing a module

Re: [PATCH] ACPICA: cleanup method properly on error

2016-07-29 Thread Vegard Nossum
On 07/29/2016 06:47 AM, Zheng, Lv wrote: Hi, Vegard From: linux-acpi-ow...@vger.kernel.org [mailto:linux-acpi- ow...@vger.kernel.org] On Behalf Of Vegard Nossum Subject: [PATCH] ACPICA: cleanup method properly on error If the call to acpi_ds_init_aml_walk() fails, then we have to undo the

[PATCH] block: fix use-after-free in seq file

2016-07-29 Thread Vegard Nossum
d even if start failed, so we need to reinitialise the private pointer to NULL when seq iteration stops. An alternative would be to set the private pointer to NULL when the kmalloc() in disk_seqf_start() fails. Cc: Tejun Heo Cc: sta...@vger.kernel.org Signed-off-by: Vegard Nossum --- block/ge

Re: [PATCH] nbd: fix race in ioctl

2016-07-29 Thread Vegard Nossum
On 05/30/2016 02:58 PM, Markus Pargmann wrote: Hi, On Friday 27 May 2016 12:59:35 Vegard Nossum wrote: Quentin ran into this bug: WARNING: CPU: 64 PID: 10085 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x65/0x80 [...] It seems fairly obvious that device_create_file() is not being protected from

kernel BUG at mm/mempolicy.c:1699!

2016-07-29 Thread Vegard Nossum
Hi guys, I ran into this one on commit c624c86615fb8aa61fa76ed8c935446d06c80e77: [ cut here ] kernel BUG at mm/mempolicy.c:1699! invalid opcode: [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) CPU: 1 PID: 27676 Comm: trinity-c0 Not tainted 4.7.

Re: kernel BUG at mm/mempolicy.c:1699!

2016-07-29 Thread Vegard Nossum
On 07/29/2016 08:05 PM, Dmitry Vyukov wrote: On Fri, Jul 29, 2016 at 7:57 PM, Vegard Nossum wrote: [ cut here ] kernel BUG at mm/mempolicy.c:1699! [...] In particular, it's interesting that the kernel/exit.c line is mpol_put(tsk->mempolic

KASAN use-after-free not showing freed stacktrace?

2016-07-29 Thread Vegard Nossum
Hi again, I am seeing some KASAN use-after-free bugs now but there is no stacktrace for where they were freed anymore: BUG: KASAN: use-after-free in acct_collect+0x7d5/0x830 at addr 88010e129b08 Read of size 8 by task trinity-c0/13609 CPU: 0 PID: 13609 Comm: trinity-c0 Not tainted 4.7.0+ #

Re: NULL ptr deref in perf/filter_match

2016-07-29 Thread Vegard Nossum
On 27 July 2016 at 16:15, Vegard Nossum wrote: > Hi, > > I'm seeing this on latest linus/master: > > kasan: CONFIG_KASAN_INLINE enabled > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: [#1] PREEMPT SMP KASAN > Dumpi

Re: KASAN use-after-free not showing freed stacktrace?

2016-07-29 Thread Vegard Nossum
On 07/29/2016 11:27 PM, Dmitry Vyukov wrote: On Fri, Jul 29, 2016 at 10:17 PM, Vegard Nossum wrote: Hi again, I am seeing some KASAN use-after-free bugs now but there is no stacktrace for where they were freed anymore: [...] That seems like a regression, maybe related to memory quarantine

Re: NULL ptr deref in perf/filter_match

2016-07-29 Thread Vegard Nossum
On 29 July 2016 at 23:41, Vegard Nossum wrote: > On 27 July 2016 at 16:15, Vegard Nossum wrote: >> Hi, >> >> I'm seeing this on latest linus/master: [...] >> RIP: 0010:[] [] >> perf_iterate_sb+0x1b0/0x6a0 [...] >> >> In particular, it look

Hang in 9p/virtio

2016-07-30 Thread Vegard Nossum
Hi, With fault injection triggering an allocation failure for the alloc_indirect() call in virtqueue_add() I'm seeing a hang in p9_virtio_zc_request() -- it seems to be waiting here indefinitely (i.e. at least 120 seconds): err = wait_event_interruptible(*req->wq,

Re: [PATCH] usercopy: remove page-spanning test for now

2016-09-07 Thread Vegard Nossum
On 7 September 2016 at 19:17, Linus Torvalds wrote: > On Wed, Sep 7, 2016 at 10:06 AM, Kees Cook wrote: >> >> +#ifndef CONFIG_HARDENED_USERCOPY_PAGESPAN >> + /* >> +* The page-spanning checks are hitting false positives, so >> +* do not check them for now. >> +*/ >>

Re: [PATCH 4/6] time: Avoid undefined behaviour in timespec64_add_safe()

2016-09-01 Thread Vegard Nossum
On 09/01/2016 10:02 AM, Richard Cochran wrote: On Wed, Aug 31, 2016 at 02:50:20PM -0700, John Stultz wrote: UBSAN: Undefined behaviour in kernel/time/time.c:783:2 signed integer overflow: 5273 + 9223372036854771711 cannot be represented in type 'long int' ... Line 783 is this: 7

Re: [PATCH 1/3] ALSA: timer: fix NULL pointer dereference in read()/ioctl() race

2016-09-02 Thread Vegard Nossum
On 08/29/2016 09:14 AM, Vegard Nossum wrote: On 08/29/2016 09:02 AM, Takashi Iwai wrote: On Mon, 29 Aug 2016 00:33:49 +0200, Vegard Nossum wrote: @@ -1602,15 +1602,25 @@ static int snd_timer_user_tselect(struct file *file, kfree(tu->tqueue); tu->tqueue = NULL; if (tu-

Re: NULL ptr deref in perf/filter_match

2016-08-04 Thread Vegard Nossum
On 4 August 2016 at 14:37, Peter Zijlstra wrote: > On Fri, Jul 29, 2016 at 11:41:11PM +0200, Vegard Nossum wrote: > >> Digging a bit deeper into this, it seems the event itself is getting >> created by perf_event_open() and it gets added to the pmu_event_list >> throug

Re: NULL ptr deref in perf/filter_match

2016-08-04 Thread Vegard Nossum
On 4 August 2016 at 17:17, Vegard Nossum wrote: > On 4 August 2016 at 14:37, Peter Zijlstra wrote: >> On Fri, Jul 29, 2016 at 11:41:11PM +0200, Vegard Nossum wrote: >> >>> Digging a bit deeper into this, it seems the event itself is getting >>> created by perf_

Re: How the devil can gettid() return 1?

2016-08-08 Thread Vegard Nossum
On 8 August 2016 at 14:11, Tom Horsley wrote: > Every once in a while google-chrome goes into a 100% cpu loop. > I got curious and examined the thread that was running at 100% > and strace says this over and over again till I interrupt it: > > gettid()= 1 > gettid()

Re: [PATCH 10/10] fault injection: inject faults in new/rare callchains

2016-08-08 Thread Vegard Nossum
Hi, On 08/08/2016 03:54 PM, Akinobu Mita wrote: 2016-08-04 0:05 GMT+09:00 Vegard Nossum : Before this patch, fault injection uses a combination of randomness and frequency to determine where to inject faults. The problem with this is that code paths which are executed very rarely get

Re: NULL ptr deref in perf/filter_match

2016-08-08 Thread Vegard Nossum
On 8 August 2016 at 22:07, Vince Weaver wrote: > On Thu, 4 Aug 2016, Vegard Nossum wrote: >> BTW, this seems to show up slightly more frequently although I've seen >> it a couple of times before without your patch too so it's probably >> unrelated: >> >

  1   2   3   4   >