Received: by 10.223.185.116 with SMTP id b49csp4796775wrg; Wed, 7 Mar 2018 00:51:06 -0800 (PST) X-Google-Smtp-Source: AG47ELuZQyGD2nK0VQrsgZt/Xmxnm1xPEhl1PwK9ku5buO3OuUH4Yw0QIu+HJqRs3ExUmq9fterT X-Received: by 2002:a17:902:6b81:: with SMTP id p1-v6mr14616181plk.181.1520412665936; Wed, 07 Mar 2018 00:51:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520412665; cv=none; d=google.com; s=arc-20160816; b=YFlSicIHZ0NuvoFDs939GphqKNVFc+0viBEmLO2kwZsQVRsjI2/iuh6gGoIdfjnKi2 QiUV7NhmmFzHdapvSesN0lRTWau5awjlKp6ukudy720fq0e00Lpp71MqENXOKzxaRPx6 ydfOB02WUHq7TSxOIrL5f4xLEQuqN7ERusU5AXSU9xLIPDbfSXEOOcoZ4QkYvBp2T9Sz Q8mZmmDuHcoHtsRTszckuzTckdnfSAeDUUvpCyNFpJOdGsQVDCzinUIwHLBUvdNH9Mrx oSID9Zvm8CKrGiIgAq1e9wyBX0HdCGlugFYAaafmLIEKNfkA36mjOZYirZs2Jc8CwhBv tZwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=TPhkDljEScr+datydIJ6Ni/rbOvpN3EjxVcd7Nk/x0Y=; b=NrbXoZfnP+v0bPnGDIrbUQouZdnLRW+iGO23RG4m70a3ADhpJ9OmtLALpJMSwg5ymS wf1Wfcxa9aVPZdhGmYhcvo+7mC0ydFXqmSBF0JsRzBHmAHmMGxS9pp0nmcin7ZDtTDfW cjRVMMkUcKP5d92VGfuD+HdrP0Ou4+AaVFCz4WSNaG2fF/r/AXfcURdIFD7nTQXs9KGi YTdFKOvVbXhovq8GqI35QsfX3ARlf/pQUpaJ6TXRFZcfGqwO81CMqFKItGgE9r2uq6JD IHNKCXTRpMVbpXNhrUgd9G35M5Nil8pyGHLJWLGV4OFo3/uGAAJCYNkyujFOgKuEplln JZbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si12472793plv.604.2018.03.07.00.50.51; Wed, 07 Mar 2018 00:51:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751263AbeCGIti (ORCPT + 99 others); Wed, 7 Mar 2018 03:49:38 -0500 Received: from mx2.suse.de ([195.135.220.15]:53178 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751159AbeCGItd (ORCPT ); Wed, 7 Mar 2018 03:49:33 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7D969AF15; Wed, 7 Mar 2018 08:49:32 +0000 (UTC) Date: Wed, 7 Mar 2018 09:49:31 +0100 From: Petr Mladek To: Sergey Senozhatsky , Arnd Bergmann Cc: Tejun Heo , Steven Rostedt , Dave Young , Andi Kleen , Greentime Hu , Vincent Chen , Peter Zijlstra , Andrew Morton , Stephen Rothwell , adi-buildroot-devel@lists.sourceforge.net, Linux Kernel Mailing List , Sergey Senozhatsky Subject: Re: [PATCH] dump_stack: convert generic dump_stack into a weak symbol Message-ID: <20180307084931.txou4vo5qj27anhe@pathway.suse.cz> References: <20180305053742.9149-1-sergey.senozhatsky@gmail.com> <20180307022127.GB802@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180307022127.GB802@jagdpanzerIV> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2018-03-07 11:21:27, Sergey Senozhatsky wrote: > Hello Arnd, > > On (03/06/18 14:27), Arnd Bergmann wrote: > [..] > > As we are now removing blackfin, based on the latest discussion, this > > part should no longer be necessary. > > When is this going to happen? 4.17? > > [..] > > nds32 currently only exists in linux-next, not in the mainline kernel. > > If it's the only architecture that does something different from everyone > > else, I think we should change nds32. > > > > I looked at the nds32 show_stack() implementation now and it > > seems to me that it is completely unnecessary, as the implementation > > from lib/dump_stack.c does basically the same thing (by calling > > show_stack(NULL, NULL)). > > Interesting point. I'll leave it to nds32 maintainers. > OTOH blackfin is still in linux-next, so I assume we need > that __weak dump_stack() for the time being. My understanding is that blacfin will not be removed in the first wave. Therefore we would need to do something about it for 4.17. Or is there any new info, Arnd? > [..] > > > +asmlinkage __weak __visible void dump_stack(void) > > > { > > > __dump_stack(); > > > } > > > > Weak symbols are generally discouraged in the kernel. We have > > them in a couple of places, but I find them rather confusing as they > > make it harder to figure out what is actually going on. I agree that using weak symbols might be confusing. But I wonder what is the preferred alternative when only few architectures do something slightly different. > Honestly, I kind of find __weak less confusing than EXPORT_SYMBOL(dump_stack) > in 3 different places. __weak hints that the symbol likely will be overridden > somewhere, while EXPORT_SYMBOL() does not (at least not to me). Dunno. The trick used for dump_stack() is really confusing. I mean the linking of lib/dump_stack.o only when there is no arch-specific variant. Best Regards, Petr