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]
Date:	Wed, 5 Mar 2014 13:34:01 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Christoph Lameter <cl@...ux.com>
Cc:	Tejun Heo <tj@...nel.org>, akpm@...uxfoundation.org,
	rostedt@...dmis.org, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 05/48] percpu: Add preemption checks to __this_cpu ops

On Tue, 4 Mar 2014 21:27:14 -0600 (CST) Christoph Lameter <cl@...ux.com> wrote:

> > > +notrace void __this_cpu_preempt_check(const char *op)
> > > +{
> > > +	char text[40];
> > > +
> > > +	snprintf(text, sizeof(text), "__this_cpu_%s()", op);
> > > +	check_preemption_disabled(text);
> > > +}
> >
> > I'd like to see a comment here telling scared readers why this can
> > never overflow text[].
> 
> Ok. I can also add VM_BUG_ON(strlen(op) >= sizeof(text)) ?

I misread the code - snprintf() will dtrt and we'll just end up with
truncated debug text.  Not worth worrying about.
--
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