lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19f34abd0806301002o7bdbd3a3y63d4d036ce5c26b0@mail.gmail.com>
Date:	Mon, 30 Jun 2008 19:02:51 +0200
From:	"Vegard Nossum" <vegard.nossum@...il.com>
To:	"Ingo Molnar" <mingo@...e.hu>
Cc:	"Linus Torvalds" <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Thomas Gleixner" <tglx@...utronix.de>,
	"Daniel J Blueman" <daniel.blueman@...il.com>
Subject: Re: [git pull] core kernel fixes

On Mon, Jun 30, 2008 at 5:32 PM, Ingo Molnar <mingo@...e.hu> wrote:
> diff --git a/lib/debugobjects.c b/lib/debugobjects.c
> index a76a5e1..85b18d7 100644
> --- a/lib/debugobjects.c
> +++ b/lib/debugobjects.c
> @@ -68,6 +68,7 @@ static int fill_pool(void)
>  {
>        gfp_t gfp = GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN;
>        struct debug_obj *new;
> +       unsigned long flags;
>
>        if (likely(obj_pool_free >= ODEBUG_POOL_MIN_LEVEL))
>                return obj_pool_free;
> @@ -81,10 +82,10 @@ static int fill_pool(void)
>                if (!new)
>                        return obj_pool_free;
>
> -               spin_lock(&pool_lock);
> +               spin_lock_irqsave(&pool_lock, flags);
>                hlist_add_head(&new->node, &obj_pool);
>                obj_pool_free++;
> -               spin_unlock(&pool_lock);
> +               spin_unlock_irqrestore(&pool_lock, flags);
>        }
>        return obj_pool_free;
>  }
> @@ -110,16 +111,13 @@ static struct debug_obj *lookup_object(void *addr, struct debug_bucket *b)
>  }
>
>  /*
> - * Allocate a new object. If the pool is empty and no refill possible,
> - * switch off the debugger.
> + * Allocate a new object. If the pool is empty, switch off the debugger.
>  */
>  static struct debug_obj *
>  alloc_object(void *addr, struct debug_bucket *b, struct debug_obj_descr *descr)
>  {
>        struct debug_obj *obj = NULL;
> -       int retry = 0;
>
> -repeat:
>        spin_lock(&pool_lock);
>        if (obj_pool.first) {
>                obj         = hlist_entry(obj_pool.first, typeof(*obj), node);
> @@ -141,9 +139,6 @@ repeat:
>        }
>        spin_unlock(&pool_lock);
>
> -       if (fill_pool() && !obj && !retry++)
> -               goto repeat;
> -
>        return obj;
>  }
>
> @@ -261,6 +256,8 @@ __debug_object_init(void *addr, struct debug_obj_descr *descr, int onstack)
>        struct debug_obj *obj;
>        unsigned long flags;
>
> +       fill_pool();
> +
>        db = get_bucket((unsigned long) addr);
>
>        spin_lock_irqsave(&db->lock, flags);
> --

Hm. I have to wonder where this patch came from.

This was my (faulty) patch: http://lkml.org/lkml/2008/6/14/193
and Daniel J Blueman followed up with this: http://lkml.org/lkml/2008/6/15/27

..but this one looks different from both. I am guessing the last bits
were added (or removed?) by Thomas?

I am wondering if the final patch was tested with the reproducible
test case (if so, by whom?) and whether should be credited to Daniel
(or Thomas?) instead...

?


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ