Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4504108imu; Tue, 15 Jan 2019 00:52:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN6kBPyWtIIEAEqiKTDUpHgQ1zhC5Xf/+lPBMzmmWHZ8V6KXTkcpXLT7BdGqpJn/V9CbZNre X-Received: by 2002:a17:902:2969:: with SMTP id g96mr2905456plb.295.1547542365787; Tue, 15 Jan 2019 00:52:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547542365; cv=none; d=google.com; s=arc-20160816; b=pW8toF1XIKjM/k1fRBstmYGT93Kq1dTqwspr8bn1TvBDhGtGgQo6TU+k1M4YMAE4ES F3RodELS3d3pgZM7dJr99IWWPfa2zjElFs3IyxzGJ16LJpKd6BArzX3bBsJhlEQqewE1 W046hOw8k0XoVn2AQCTafPBT2xVY3X1NUlRQ2rec9Vbbi3ItnuBu5zc3kIdfa4eUOgSs A7wer9oq9M4q3HwWrToQaTO7zVbCTBi6VZJP20lri4YUqWax8iBINiYUcyzdE7n7bDmB o/HSWtMaHIPmmduv0bcEuB/2Db3+8cffCJPHD+HP7ukLjR4IGsCCCom+EaZDtZmAjX9u cZ1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=08AbJJ8hBVDBXX2UF9mFjcRwzLGQ7QhyPVH8V6BPlIc=; b=iVtvD8LDMUfDBjkUNKcNAYQOu7kfMTpyZzcRaq9dHJgnQJYWDNAwopPegNsnXjaMMP R/ie7A9/MS87JCP02vCQI5q3846A8Oz4GDmMKnTBl2mdCRxPFbzR/mWOPAE1lPao2x8r uwNhKlqktO2qbjc9DFRpBUvpVVNQsgPmg+4YCnjxPdsqxM12fNYjAWZgAWe79d2Udqtp mJt67LWe9klrhNet6eHJ4IQJN4vILwyxSoEqls1wSIkpQtBB8sW3sBpCV5PO/45yWc7t pjY+ULWA3G4l89hAKE07kuh7p5HnIQu4mxkn9YmD60lE2/bkdqPsfY+/bjQ49zGOrwpJ IyWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="cc/+VoBv"; 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 k35si2684797pgm.225.2019.01.15.00.52.29; Tue, 15 Jan 2019 00:52:45 -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=@nifty.com header.s=dec2015msa header.b="cc/+VoBv"; 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 S1727931AbfAOHVI (ORCPT + 99 others); Tue, 15 Jan 2019 02:21:08 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:46279 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726055AbfAOHVH (ORCPT ); Tue, 15 Jan 2019 02:21:07 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x0F7JTTt025896; Tue, 15 Jan 2019 16:19:29 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x0F7JTTt025896 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1547536770; bh=08AbJJ8hBVDBXX2UF9mFjcRwzLGQ7QhyPVH8V6BPlIc=; h=From:To:Cc:Subject:Date:From; b=cc/+VoBvxW4OZPcv2ix8I5JuxXptMd/3lF5mNIh5YELemVL1guzdqCSdqtZ1o8t9/ bi56yFu2Q+LvL4cacgvMAfVg6bFOseR4SJ9XDvvBb/Uynov0dsdYpZueuMekdaKJMK VE2zw6LIg/Rn1xzkzIhTAZCmRi42bi2NiOPEfDo9HkI+xI23PgEEWhE+nbVwU3fdbO jg3bnzwB25WmVBN5NVJQcb4yxrnl8TDXDlXEGPRrV2QZ5Y+AnGzOOPJMSFqUN/QDgr PTgg3eRb6Og435J+KADBC8w+QfjAS1U7EuAmPjMpJib1PA4t3YMT4JI8IVMcggQr6C dahgHqucL4exg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ard Biesheuvel , Samuel Holland , Alexey Kardashevskiy , linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Masahiro Yamada , "linux-stable # v4 . 20" , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH] kbuild: mark prepare0 as PHONY to fix external module build Date: Tue, 15 Jan 2019 16:19:00 +0900 Message-Id: <1547536740-1572-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit c3ff2a5193fa ("powerpc/32: add stack protector support") caused kernel panic on PowerPC if an external module is used with CONFIG_STACKPROTECTOR because the 'prepare' target was not executed for the external module build. Commit e07db28eea38 ("kbuild: fix single target build for external module") turned it into a build error because the 'prepare' target is now executed but the 'prepare0' target is missing for the external module build. External module on arm/arm64 with CONFIG_STACKPROTECTOR_PER_TASK is also broken in the same way. Move 'PHONY += prepare0' to the common place. Make is fine with missing rule for phony targets. I minimize the change so it can be easily backported to 4.20.x To fix v4.20 for external modules of PowerPC, please backport e07db28eea38 ("kbuild: fix single target build for external module"), and then this commit. Link: https://bugzilla.kernel.org/show_bug.cgi?id=201891 Fixes: e07db28eea38 ("kbuild: fix single target build for external module") Fixes: c3ff2a5193fa ("powerpc/32: add stack protector support") Fixes: 189af4657186 ("ARM: smp: add support for per-task stack canaries") Fixes: 0a1213fa7432 ("arm64: enable per-task stack canaries") Cc: linux-stable # v4.20 Reported-by: Samuel Holland Reported-by: Alexey Kardashevskiy Signed-off-by: Masahiro Yamada --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 499b968..789b332 100644 --- a/Makefile +++ b/Makefile @@ -955,6 +955,7 @@ ifdef CONFIG_STACK_VALIDATION endif endif +PHONY += prepare0 ifeq ($(KBUILD_EXTMOD),) core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ @@ -1061,8 +1062,7 @@ scripts: scripts_basic scripts_dtc # archprepare is used in arch Makefiles and when processed asm symlink, # version.h and scripts_basic is processed / created. -# Listed in dependency order -PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 +PHONY += prepare archprepare prepare1 prepare2 prepare3 # prepare3 is used to check if we are building in a separate output directory, # and if so do: -- 2.7.4