Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758606AbcK3TNP (ORCPT ); Wed, 30 Nov 2016 14:13:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47876 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758071AbcK3TNF (ORCPT ); Wed, 30 Nov 2016 14:13:05 -0500 Date: Wed, 30 Nov 2016 13:13:03 -0600 From: Josh Poimboeuf To: "Paul E. McKenney" Cc: Peter Zijlstra , Petr Mladek , Vince Weaver , "linux-kernel@vger.kernel.org" , Ingo Molnar , Arnaldo Carvalho de Melo , "dvyukov@google.com" Subject: Re: perf: fuzzer BUG: KASAN: stack-out-of-bounds in __unwind_start Message-ID: <20161130191303.prvrgkvijqzydexg@treble> References: <20161129004021.GL3924@linux.vnet.ibm.com> <20161129055241.6dy2dt4q4ptazk2s@treble> <20161129124323.GJ3092@twins.programming.kicks-ass.net> <20161129151004.GU3924@linux.vnet.ibm.com> <20161129162920.GF21230@pathway.suse.cz> <20161129171038.GN3092@twins.programming.kicks-ass.net> <20161129193935.GE3924@linux.vnet.ibm.com> <20161129195204.GG3045@worktop.programming.kicks-ass.net> <20161129200711.GF3924@linux.vnet.ibm.com> <20161129203259.GA28037@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161129203259.GA28037@linux.vnet.ibm.com> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 30 Nov 2016 19:13:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2339 Lines: 55 On Tue, Nov 29, 2016 at 12:32:59PM -0800, Paul E. McKenney wrote: > On Tue, Nov 29, 2016 at 12:07:11PM -0800, Paul E. McKenney wrote: > > On Tue, Nov 29, 2016 at 08:52:04PM +0100, Peter Zijlstra wrote: > > > On Tue, Nov 29, 2016 at 11:39:35AM -0800, Paul E. McKenney wrote: > > > > On Tue, Nov 29, 2016 at 06:10:38PM +0100, Peter Zijlstra wrote: > > > > > > > > It mostly works, most of the time, and that seems to be what Linus > > > > > wants, since its really the best we can have given the constraints. But > > > > > for debugging, when you have a UART, it totally blows. > > > > > > > > UART??? They still make those things??? ;-) > > > > > > Yes, most computer like devices actually have them, trouble is, most > > > consumer devices don't have the pins exposed. Luckily most server class > > > hardware still does. > > > > > > And they're absolutely _awesome_ for debugging; getting data out is a > > > matter of trivial MMIO poll loops. Rock solid stuff. > > > > They very clearly need to bring the baud rate into the current millenium, > > many tens of Mbaud at the -very- least. > > On a more practical note... > > Currently, cond_resched_rcu_qs() is not permitted to be invoked until > after the scheduler has started. However, it appears that there is some > kernel code that can loop for quite some time at runtime, but which also > executes during early boot. So it would be good to make it so that > cond_resched_rcu_qs() could be called at boot. > > One approach would be to check rcu_scheduler_active, but this isn't > defined in normal Tiny RCU builds. I can expand Tiny RCU, or I can > kludge the non-CONFIG_DEBUG_LOCK_ALLOC value of rcu_scheduler_active > to false (with this latter being the current state). But it occurred > to me that I could also condition on !is_idle_task(), given that idle > tasks shouldn't ever be invoking the scheduler anyway. This question was probably intended for other folks, but I should point out that idle tasks *do* invoke the scheduler. cpu_idle_loop() calls schedule_preempt_disabled(). > > So is the following a sensible approach, or should I look elsewhere? > > #define cond_resched_rcu_qs() \ > do { \ > if (!is_idle_task(current) && !cond_resched()) \ > rcu_note_voluntary_context_switch(current); \ > } while (0) > > Thanx, Paul > -- Josh