From patchwork Thu Mar 14 17:57:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10853365 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19CD315AC for ; Thu, 14 Mar 2019 17:59:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 018C128B88 for ; Thu, 14 Mar 2019 17:59:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3A8728B87; Thu, 14 Mar 2019 17:59:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9049328B87 for ; Thu, 14 Mar 2019 17:59:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727649AbfCNR7M (ORCPT ); Thu, 14 Mar 2019 13:59:12 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:35303 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726832AbfCNR7L (ORCPT ); Thu, 14 Mar 2019 13:59:11 -0400 Received: by mail-pg1-f195.google.com with SMTP id e17so4515867pgd.2 for ; Thu, 14 Mar 2019 10:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=o5V2IGfvFmkGe9nrhEJ/yWrbDVoIrNz8HD+S+k+/BmQ=; b=Jls7RE7in5/SSKdOe0Df4SiMH54nComjLI7tbXoh5eyNAUOq+5+tvQPB0qk8bduxL0 srQ99DWv3sJDN0vlW+v3sKWRiCZFdzv+mG2Ki4y9pCwXhcAgxdaeu39z46zSb4gxGLSP yQzteIO4UIhD84vpyJwMy/3pZ+YpScqQ+iA2g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=o5V2IGfvFmkGe9nrhEJ/yWrbDVoIrNz8HD+S+k+/BmQ=; b=Opy7/36RRNDWdQqrmvPLu2Yd9KHOlIJIUHmyIUY3+IFiXJncaKM5OddpwxhnrAeXTA Ly+nwSIwal5yvvGxJF0stYHSIcxXpRSRAnBRcbQZjnRESJUyBlNZ5DHl82Ve9AZXwuaw Q/hFSH6cR7szVOE00ufDty66eeqC1slovoclMeHi7nxiycPrd83EGzVDgI6AJIjk7sTf Ow/1HzNI5z5Fd5y3/gi7aHufwQzrw7FbJHH4dwQ0ZFu4+RrXJIelOouBnbPlilwsLCpH r9sUkHEFOkG72uxdHZKkvXXMv7k1NnbrJKSLunuPlwvfYWCLw1llBZQwVLa8qt/p4rDC Oh2w== X-Gm-Message-State: APjAAAXezv4sMSGzr3q1midtQTFBExiCPlmUOBkdortdd6lwNrct9FnF nMrQXLu7cvTA53FbkuyvHGte+Q== X-Google-Smtp-Source: APXvYqxr5vzQQBeN9z3DsXTMTkWwTI6fb/uV9RF0XtApbize+IqqOmG25SgaAfxwkvRw2mAK+oE6Mw== X-Received: by 2002:a17:902:e784:: with SMTP id cp4mr16310349plb.135.1552586351296; Thu, 14 Mar 2019 10:59:11 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:24fa:e766:52c9:e3b2]) by smtp.gmail.com with ESMTPSA id q62sm28387213pga.32.2019.03.14.10.59.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 10:59:10 -0700 (PDT) From: Douglas Anderson To: Masahiro Yamada Cc: Douglas Anderson , Michal Marek , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [PATCH] kbuild: If the module stripping command fails the build should abort Date: Thu, 14 Mar 2019 10:57:05 -0700 Message-Id: <20190314175705.11671-1-dianders@chromium.org> X-Mailer: git-send-email 2.21.0.360.g471c308f928-goog MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the call to strip returns an error code then it makes sense for the build to fail. Currently we'll just chug along and ship unstripped modules. Fixes: e2a666d52b48 ("kbuild: sign the modules at install time") Signed-off-by: Douglas Anderson --- scripts/Makefile.modinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index ff5ca9817a85..5d05c43c6f31 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst @@ -22,7 +22,7 @@ quiet_cmd_modules_install = INSTALL $@ cmd_modules_install = \ mkdir -p $(2) ; \ cp $@ $(2) ; \ - $(mod_strip_cmd) $(2)/$(notdir $@) ; \ + $(mod_strip_cmd) $(2)/$(notdir $@) && \ $(mod_sign_cmd) $(2)/$(notdir $@) $(patsubst %,|| true,$(KBUILD_EXTMOD)) && \ $(mod_compress_cmd) $(2)/$(notdir $@)