Received: by 10.223.185.116 with SMTP id b49csp2627107wrg; Mon, 5 Mar 2018 06:14:43 -0800 (PST) X-Google-Smtp-Source: AG47ELswFkUU+FLgUFnuiO8o5355zG36fYFOzhKKO6437NKWPXoqYWeftR/mJa8BzFzz1xYyw/PV X-Received: by 2002:a17:902:2de4:: with SMTP id p91-v6mr13411988plb.405.1520259283844; Mon, 05 Mar 2018 06:14:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520259283; cv=none; d=google.com; s=arc-20160816; b=toOReg8ZmIN/crzi79jeJ20utW6rflLyen8ZFOtPnyfBNYXXwzj9kYD3erk3cPZxRd Y7azFTvYYnVW0SdPQ8vzA2804fQoDoDBiO5EVU4DhP3chf+yMctSdgDyDnpggj/ptVsu +BalrjR3l5FSvxrwrvxTjmlcJXhFZjbdYSp7QkQpZnyCYxa7Nyf8lPbazjbGKtqUWvj1 Mlw0GEzGtVTu5gbEajTy9yilNrmSFLBx2BYSpnr6BK8gI/DpzbstNh0M6bgCH7b3ZxL+ qCpYVi/B4bTQ2yRDlt+aDB6oQ2LLitKPTiUU8qnrKtRUvr2E1kKYNJdBwnkG1mhVQtFy UpBg== 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=JmWILBJShqrq93Kw1ihQ31pAX+6GoKlXtG0/i2jZxpU=; b=upQSCIPI1+xiq79570Ex04apWqfi3L5lZczZ5Jdcr8+/s9NMPFrS8Iv+9w3/SnpgCN hV5NEw4bq+Jq21BT/9hv10z5XFHArQISN6/rDkDFfFZ8tG8MOtATbsVAhyF+gAELt3o4 CqPjOGngRnQyJJQp0mpoXYXsUMkafMryuqDdqU31a/xvixpcfV1ocL3NWRZzpsfKokX9 epcYx5wOEi1avlV6MKvcFx7twsteWViq6BvIswSyAJyYysqLFX8Cv+85MnGZHy04g+E/ GyS6aHbzfkM8z7QOWoLV0/KCYDbUok3WCQST+k/PRoLmN+kRCKRSJJybbLNKjEOURu5n XR1A== 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 y62si10321800pfj.204.2018.03.05.06.14.29; Mon, 05 Mar 2018 06:14:43 -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 S934632AbeCEMZn (ORCPT + 99 others); Mon, 5 Mar 2018 07:25:43 -0500 Received: from mx2.suse.de ([195.135.220.15]:34362 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934287AbeCEMZl (ORCPT ); Mon, 5 Mar 2018 07:25:41 -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 12DD9ACFB; Mon, 5 Mar 2018 12:25:40 +0000 (UTC) Date: Mon, 5 Mar 2018 13:25:39 +0100 From: Petr Mladek To: Sergey Senozhatsky Cc: Tejun Heo , Stephen Rothwell , Linux-Next Mailing List , Linux Kernel Mailing List , Dave Young , Steven Rostedt , Sergey Senozhatsky , akpm@linux-foundation.org, Andi Kleen Subject: Re: linux-next: build failure after merge of the printk tree Message-ID: <20180305122539.dakxwzxylyrv27od@pathway.suse.cz> References: <20180302160732.12691fbc@canb.auug.org.au> <20180302155454.eme5gplxdcltvwkw@pathway.suse.cz> <20180303144739.GA516@tigerII.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180303144739.GA516@tigerII.localdomain> 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 Sat 2018-03-03 23:47:39, Sergey Senozhatsky wrote: > Cc-ing Tejun > > On (03/02/18 16:54), Petr Mladek wrote: > [..] > > > (Though it is not immediately obvious why.) > > > > It is a mistery to me. The error appears when I move any of > > dump_stack_print_info() or show_regs_print_info() function > > definitions from kernel/printk/printk.c to lib/dump_stack.c. > > All the other changes seems unrelated. > > > > The thing is that we basically do not touch dump_stack() definition > > by that patch. > > Apparently dump_stack_print_info() was in lib/dump_stack.c a long > time ago, but it was deliberately moved to printk.c, when kernel gained > a "generic" (dummy) dump_stack() fallback. Some archs, like blackfin, > define their own dump_stack() symbol and make it global via EXPORT_SYMBOL. > > In case of blackfin that arch-specific dump_stack() symbol invokes a > global dump_stack_print_info(). If we move dump_stack_print_info() back > to lib/dump_stack.c then we link both with arch/blackfin/dumpstack.o > and lib/dump_stack.o, which results in multiple definitions error. > If we move dump_stack_print_info() out on libdump_stack.o, then we > never link with lib/dump_stack.o Ah, I have finally understood the meaning of the libs-y kbuild variable. It is a nice source of these strange build failures. > ... so what are we going to do with that. > > a) we can drop the patch and cherry pick only the kexec part > > b) we can try to mark dummy lib/dump_stack() as __weak > EXPORT_SYMBOL and remove EXPORT_SYMBOL from arch-specific > definitions. Using the weak symbol makes perfect sense. I am going to look at the patch. Thanks a lot everybody for help. Best Regards, Petr