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] [day] [month] [year] [list]
Date:	Thu, 02 Feb 2012 21:31:03 +0800
From:	Cong Wang <xiyou.wangcong@...il.com>
To:	Arnd Bergmann <arnd@...db.de>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Prarit Bhargava <prarit@...hat.com>,
	Greg Kroah-Hartman <greg@...ah.com>
Subject: Re: [Patch] lkdtm: avoid calling lkdtm_do_action() with spin lock
 held

On 02/01/2012 11:29 PM, Arnd Bergmann wrote:
> On Wednesday 01 February 2012, Cong Wang wrote:
>> On 01/31/2012 11:35 PM, Arnd Bergmann wrote:
>>> On Tuesday 31 January 2012, Cong Wang wrote:
>>>> @@ -323,14 +323,16 @@ static void lkdtm_do_action(enum ctype which)
>>>>           }
>>>>           case CT_WRITE_AFTER_FREE: {
>>>>                   size_t len = 1024;
>>>> -               u32 *data = kmalloc(len, GFP_KERNEL);
>>>> +               u32 *data = kmalloc(len, GFP_ATOMIC);
>>>>
>>>>                   kfree(data);
>>>> -               schedule();
>>>> +               udelay(100);
>>>>                   memset(data, 0x78, len);
>>>>                   break;
>>>>           }
>>>
>>> I can't think of why the udelay would have any positive effect here,
>>> if the idea of the schedule was to let some other process allocate and
>>> use the memory.
>>
>>
>> Hmm, on SMP udelay on this CPU will give a chance to other CPU's to use
>> that memory, right?
>>
>
> There is a small chance for that, but it's much less likely than it would
> be using another process on the same CPU, plus it requires SMP.

Yeah, I updated this in [PATCH 2/2] lkdtm: avoid calling sleeping 
functions in interrupt context.
--
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