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]
Message-ID: <527C373F.5050009@asianux.com>
Date:	Fri, 08 Nov 2013 08:58:39 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	paulmck@...ux.vnet.ibm.com
CC:	josh@...edesktop.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] kernel/rcutorture.c: be sure of enough memory for
 result printing

On 11/08/2013 04:59 AM, Paul E. McKenney wrote:
> On Thu, Nov 07, 2013 at 10:30:25AM +0800, Chen Gang wrote:
>> > If the contents is more than 4096 bytes (e.g. if have 1K cpus), current
>> > sprintf() will cause memory overflow. And this fix patch is to be sure
>> > of memory large enough.
>> > 
>> > Benefit:
>> > 
>> >  - do not truncate printing contents.
>> >  - extensible, it is large enough for printing various related contents.
>> >  - simple and clear enough for both source code readers and writers.
>> > 
>> > Shortcoming:
>> > 
>> >  - It will waste some memory:
>> > 
>> >     1 cpu now comsumes 50 - 60 bytes, and this patch provides 200 bytes.
>> >     global printing now comsumes a few KB, and this patch provide 8KB,
>> >     so for 1K cpus, it may waste 100 - 200 KB memory.
>> > 
>> >    after finish printing, it will free the related memory, quickly.
>> >    it is a test module, so wast a little memory for extensible is OK.
>> > 
>> > Related  test (Fedora16 2 CPUs, 2GB RAM x86_64)
>> > 
>> >  - as module, with/without "torture_type=srcu".
>> >  - build-in not boot runnable, with/without "torture_type=srcu".
>> >  - build-in let boot runnable, with/without "torture_type=srcu".
>> > 
>> > 
>> > Signed-off-by: Chen Gang <gang.chen@...anux.com>
> Thank you, queued for 3.14.

Thank you too.

-- 
Chen Gang
--
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