Received: by 10.223.185.116 with SMTP id b49csp4883263wrg; Wed, 7 Mar 2018 02:42:24 -0800 (PST) X-Google-Smtp-Source: AG47ELtA5miK9KVHwCIrweb5Ncu6ca8KhirTulhFXv3EOPAv2wcgHstIXs0O7ec5p/JXvm5llAL2 X-Received: by 10.99.166.10 with SMTP id t10mr17729906pge.198.1520419343894; Wed, 07 Mar 2018 02:42:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520419343; cv=none; d=google.com; s=arc-20160816; b=Q3WutFuet9zjH3+sUZJhSeTOWq04mt1T5RHY0u3IyR/RZZSuAsSCdtvASia165jKLA ltbB1Fj1k0Lya3gdwNNy31IpqVsrGrm+o5yWWQkZZqsVPxNbHuHQ/8ZOsYH2M63phjMP 1AJbsaXE1FNDHjxxCSodvYcMGth/9oiARuCunihOsHLFYx4iAbSrN5eYBQvk6mwhDzKP VodcZNpZPUkRSXi40eDz9JjpvrWuYJiZ9IJ2wwB6fgHU7LyG7TwBMRM1BPNoLkmuyUK1 iJZYTCj1rdxFLsFzKk4KTIB95c0zjBM/bxqVWy9j+itTE3HqeL5t6c4ARjseUCNDR7QM rxWg== 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:dkim-signature:arc-authentication-results; bh=NQ3TaIH9oDiW7OakFBm4QXqLD9ICDnVnj8Uaxrjvs0k=; b=mDu7yHmzw6Th66Tvig1sfhYaOaoP4yPYUqJrV+hYAxCFTfaX3BOqzI6tMYWsALL/Dc WinWFRcDxc2Tml+fX4A5cqxsyNB201iV8SjOTdR82a61zRIUMXXafUMNoo28lYWYCgjZ AFFiyKN3eO8tVH5MTkkWTg+JOH3YQKeSmBM04eakgPQ2fO8gGVJur6j0TIdwYM8Qn6qy H4yEUSBmF9ijWFBsGcXzGEHyLLYWDPrLn456r6ErF/439PeBHf1PC+DyHBXS/FkyoVGT g7gJpVhAPIqteDs3usiH8pNvjAw0EEi2cj2MCr/809MJyYrV2Fb5hkS7HEm/CNHivDjB 1M7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YtLYsnyc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l85si13709065pfg.104.2018.03.07.02.42.09; Wed, 07 Mar 2018 02:42:23 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YtLYsnyc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754191AbeCGKkM (ORCPT + 99 others); Wed, 7 Mar 2018 05:40:12 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:42952 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751112AbeCGKkH (ORCPT ); Wed, 7 Mar 2018 05:40:07 -0500 Received: by mail-pg0-f66.google.com with SMTP id y8so723638pgr.9 for ; Wed, 07 Mar 2018 02:40:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=NQ3TaIH9oDiW7OakFBm4QXqLD9ICDnVnj8Uaxrjvs0k=; b=YtLYsnycuyWonfoHCtShJZQn4Jd6DmADGmxZdvM91IUOhXlSfgoqQVzPop5QZ9AJ6f CNXstq8zPjYlRecfexOsOvcxjGFaKqV5b4Nkpk7mqCKfBwU+DH6GohPBpiua21+pwTTO Lz3xCgSLROnkpdXpqS8uaE/7Oz/DrivLuS0sQ6YuJUvrm1u+kvA1iJu2UNYli0+n51ns IXDFIc9u5mLAcwWmj/PhOzGNfLHjg/XerOE8/LXHS/rHEnDAsFW+bRITzqvt8nG14kCH e7JLr+FqPvHBbrcTXvxPpli5DHmigtWrdPrLNlhJBecT479r0IuVTktHqpLkmyjb3PIE JYGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=NQ3TaIH9oDiW7OakFBm4QXqLD9ICDnVnj8Uaxrjvs0k=; b=oIGHoMJGlf4Q3l+dZFwGFJ19WTNInoD8lsfaQFKS5IWmRi6A686Jt+dftwpU7NhTlz 8iAwHZ5VpeaxQIZhTc5CAgZ79CIBMTxgkg4zHKFgGl5f39IFXbq3B6vXbb4GMgTyya0A LGzA7CBc1e6OzD7HZ4jtudPqwOunGYzEZoCH+Gtj1xLRnm7OmoNkTZmAbzih3ZJL36zm nvFRuJt/Bgxb/SSHQ+5XMhn+ONT6pVjkXscUGEa7ZOhoMW87JgpyHigu3BygjBYZtH2t MPtm5Ej80q6+aesF7A9BhmL86X1lQ8nvyhLJ6Pl6utQDNrqtKNo3hJhy6TxF2NjJlclC tpCQ== X-Gm-Message-State: APf1xPDf83pS0wTz1JUNsB6lsNy60gUCgFE0ISIG+E9ZXv0LTupbQL2C 6yUQ+qb4jWtr65W/JeYzL3E= X-Received: by 10.101.86.138 with SMTP id v10mr17775390pgs.353.1520419206519; Wed, 07 Mar 2018 02:40:06 -0800 (PST) Received: from localhost ([175.223.33.219]) by smtp.gmail.com with ESMTPSA id f86sm76859pfk.111.2018.03.07.02.40.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Mar 2018 02:40:05 -0800 (PST) Date: Wed, 7 Mar 2018 19:40:02 +0900 From: Sergey Senozhatsky To: Arnd Bergmann Cc: Sergey Senozhatsky , Petr Mladek , 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: <20180307104002.GA505@jagdpanzerIV> 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: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (03/07/18 09:46), Arnd Bergmann wrote: > > > > When is this going to happen? 4.17? > > Originally I planned to wait a few more releases, but the last maintainer > has commented that he will now send a patch for immediate removal, > so 4.17 is almost certain at this point. Would be great to get it removed as soon as possible then. Otherwise we will get broken blackfin build errors from Stephen (or would need to hold off Dave's patch). > > [..] > I did the review of all the nds32 patches, and would have commented > on this if I had noticed it earlier. I see no reason not to change it, > and would suggest that you continue under the assumption that > nds32 is going to be fixed, leaving it up to Greentime to add a fix > to his tree before he sends the pull request. Good. > > 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. > > It's not either/or, they are both wrong ;-) > > The EXPORT_SYMBOL() is not the thing that makes it work. The duplicate > declaration today only works because lib/dump_stack.o is listed as lib-y > in the Makefile instead of obj-y. On blackfin and nds32, this causes the entire > file to just not be included in the final vmlinux, because there are no > references to it. Yeah. But, admittedly, I learned that "obj-y vs lib-y" stuff quite recently. > With your patch, I would actually expect the lib/dump_stack.o file > to still not be picked up, so now you have a missing EXPORT_SYMBOL() > on the two unusual architectures until the point when you add another > (referenced) symbol to it. Interesting point. Didn't check it. But I checked that we have at least one reference to lib/dump_stack from every arch so __weak could work its magic. The function is show_regs_print_info(). AFAICT, every arch calls it (we have it in lib/dump_stack now, so we will link with lib/dump_stack). Anyway, I'll be happy to drop my patch. Thanks for taking a look. -ss