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: <20140627144323.GG23205@pathway.suse.cz>
Date:	Fri, 27 Jun 2014 16:43:23 +0200
From:	Petr Mládek <pmladek@...e.cz>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jiri Kosina <jkosina@...e.cz>, Michal Hocko <mhocko@...e.cz>,
	Jan Kara <jack@...e.cz>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Dave Anderson <anderson@...hat.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Konstantin Khlebnikov <koct9i@...il.com>
Subject: Re: [RFC][PATCH 4/5 v2] printk: Add per_cpu printk func to allow
 printk to be diverted

On Fri 2014-06-27 10:39:33, Steven Rostedt wrote:
> On Fri, 27 Jun 2014 16:20:25 +0200
> Petr Mládek <pmladek@...e.cz> wrote:
> 
> 
> > >  	va_start(args, fmt);
> > > -	r = vprintk_emit(0, -1, NULL, 0, fmt, args);
> > > +	preempt_disable();
> > 
> > I think that it is too late to disable the preemption here.
> > It has to be done by the printk() caller if it wants to be sure
> > that the requested function is used.
> 
> That's only if the printk() caller cares. But it would be nice that we
> run the printk_func for the CPU that vprintk_func() is on, thus the
> preempt_disable() is required. (in -rt, this would turn into a
> migrate_disable()).

It makes sense. Thanks for explanation.

Best Regards,
Petr
 
> -- Steve
> 
> > 
> > > +	vprintk_func = this_cpu_read(printk_func);
> > > +	r = vprintk_func(fmt, args);
> > > +	preempt_enable();
> > >  	va_end(args);
> > >  
> > >  	return r;
> > 
> > Best Regards,
> > Petr
> 
--
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