Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1934274pxj; Sat, 5 Jun 2021 07:26:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypaS4h1TYvBrm73JLeFgHfD8+IU2OaxQEqSD4cIgtkUFgXLS8KV9hgFUsymCQr0AqHG7SQ X-Received: by 2002:a17:906:869a:: with SMTP id g26mr9116924ejx.94.1622903170569; Sat, 05 Jun 2021 07:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622903170; cv=none; d=google.com; s=arc-20160816; b=sLLsY1cTqFe6Q1fcmo3rm7fs5J5ihhdIvobwTXFDEYT2apTHpJMweTHVj0MfEvgVWG tem47jjqfEZxIrWEQpY52hVKB2N/mL2+iBwN5+KPUg+n5/UK//kUITwLQgGfRxvwO8xG VAxPc3WRh/lCFpCOfl7ZmNiFK45I+87hNaKAMxEO08L5AoP9Dknvkuub7IELVG78lSZW T2GrqdEKWOmPAlRBppUo5Ubz93Suf5VK3xjgyhPQNEieezyYT6qhjR8HvtprsokuqIBx HJvIJ10NS0w+jqjnEzXS91F9MVxWZiO2v20CvfAs2VHJN5hu16QnLa5zQwXlhp+c6bpK SylA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=NwpVxotBB1+eReP6uTafyFIHCo1DYlGvVJA2yCxCOY8=; b=OzNdMNZE01z6WTSWa1jKORgeIyp866/HKE3sCLeTAsx0llAC0e8rGV9szd4wZQ4Fcm tddNIa1QdbTcATjNI1NBz6ZCqm7yIOWp8vruEzh3dXY5CpPU2znRXZ0ICHo2TOeKYYA2 L7sIfDMxf5fCbFwzbH90D3E0ooGdUQBKy+c8LyNaIdJzHI1gNUa2ubHA/0MC3ikcPHjb TxkNKEzjCkAGFCcaIH8x3YLjMRAGfQVvAOLxmJzgg/D6adzDecay/6g3MtWygOm8Pvmh adbhA9+o8H25rkHT0J0mqYjCzIGwOUivE7H8Sf5uiJ4Z9HDTl39jt1+AYud3E6069Gq2 kCHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=REox6Qor; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m3si7602044edp.580.2021.06.05.07.25.48; Sat, 05 Jun 2021 07:26:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=REox6Qor; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229964AbhFEOWd (ORCPT + 99 others); Sat, 5 Jun 2021 10:22:33 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:63595 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbhFEOWc (ORCPT ); Sat, 5 Jun 2021 10:22:32 -0400 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 155EKLls030434; Sat, 5 Jun 2021 23:20:22 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 155EKLls030434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1622902822; bh=NwpVxotBB1+eReP6uTafyFIHCo1DYlGvVJA2yCxCOY8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=REox6QorF4HiAYznInvwPGp5kuWO5G7qbMbbYUe2wBY4evpD5wGFqeWdILewvSQqk rhV0LlPwRScs+6iH8YaTvActN0i0i+w4pd/PppbH6O4tPEXV+ie7fZwykF1j8clGiL Q1jUp7A6hOKayqd2G1JZ/3+wombSK1kuOCUITdeQcyB0/gBWNvJQwGDNAZ2IbPUFFO QYST9VqoU8EYQqe8MaS0koYmWmy1XzfrH3JxvnFfIq/PP91j5wqs0fKz//4UE+aI8X 6MgVdWjqbPxhxpe2y2enwvqRqj8RpXS//UiVdf06hoc3Kw2dnhaYCtdZ/73XJJH89E ReNbMFlEPoG7g== X-Nifty-SrcIP: [209.85.214.171] Received: by mail-pl1-f171.google.com with SMTP id u9so6045423plr.1; Sat, 05 Jun 2021 07:20:22 -0700 (PDT) X-Gm-Message-State: AOAM532GXEas3O2BPV2Fom08Pn4vyYC6KX/hMKQ1XzaIYruNcAOa4EhC m6CZyutkFfqObdfV/jMMqUSKACH9neiiKiswpFY= X-Received: by 2002:a17:903:22c6:b029:10e:b813:eb37 with SMTP id y6-20020a17090322c6b029010eb813eb37mr9348017plg.47.1622902821349; Sat, 05 Jun 2021 07:20:21 -0700 (PDT) MIME-Version: 1.0 References: <20210604153611.52209-1-broonie@kernel.org> In-Reply-To: <20210604153611.52209-1-broonie@kernel.org> From: Masahiro Yamada Date: Sat, 5 Jun 2021 23:19:44 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: modpost: Explicitly warn about unprototyped symbols To: Mark Brown Cc: Michal Marek , Linux Kbuild mailing list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 5, 2021 at 12:36 AM Mark Brown wrote: > > One common cause of modpost version generation failures is is a failure to double "is" > prototype exported assembly functions - the tooling requires this for > exported functions even if they are not and should not be called from C > code in order to do the version mangling for symbols. Unfortunately the > error message is currently rather abstruse, simply saying that "version > generation failed" and even diving into the code doesn't directly show > what's going on since there's several steps between the problem and it > being observed. > > Provide an explicit hint as to the likely cause of a version generation > failure to help anyone who runs into this in future more readily diagnose > and fix the problem. > > Signed-off-by: Mark Brown > --- > scripts/mod/modpost.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c > index 3e623ccc020b..78553f95c250 100644 > --- a/scripts/mod/modpost.c > +++ b/scripts/mod/modpost.c > @@ -662,6 +662,8 @@ static void handle_modversion(const struct module *mod, > if (sym->st_shndx == SHN_UNDEF) { > warn("EXPORT symbol \"%s\" [%s%s] version generation failed, symbol will not be versioned.\n", > symname, mod->name, mod->is_vmlinux ? "" : ".ko"); > + warn("Is \"%s\" prototyped in asm/asm-prototypes.h?\n", > + symname); May I ask for small changes? Could you enclose the header with angle bralets, like this ? These two sentences are related, so could you merge them into a single warn() call, like this ? warn("EXPORT symbol \"%s\" [%s%s] version ...\n", "Is \"%s\" prototyped in ?\n", symname, mod->name, mod->is_vmlinux ? "" : ".ko", modname); > return; > } > > -- > 2.20.1 > -- Best Regards Masahiro Yamada