Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4586024imu; Tue, 15 Jan 2019 02:35:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN7EaXyQrel/Vc45NCZcJ85PYBUMQB6291ARKhAmCEOCFPJwJzj4FNOxXoORPDVZzkGLNm// X-Received: by 2002:a62:1043:: with SMTP id y64mr3368031pfi.78.1547548501322; Tue, 15 Jan 2019 02:35:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547548501; cv=none; d=google.com; s=arc-20160816; b=NeV4eqbOqY3SpkaN2GHSNQcmgTevz6k2EMMEA0vs9rgUHDfsqo4onLdXnEZ5pTlnGh ZYgYf+JCB0AOXZXPFe9f65+LXK2YuKveqWikcfWdOAl9NtulurfUXJXjVIWW0cc1Uiwu 4RTfk9b8EVL+89ct+Tf1UxIvmUEa8LXn1IAXmV2C+Za4gdOLpa+BDV6WMPlWK4KBZwGg 63jlVZbqqtC3dNVV59cpktJ2kK+fr/TQvd1Nlcsmzog5rS8Pi6j0MPe/EY7K9yjsp2A8 ylbzcnaaGgTypxyrC0ZFLouIdnIACiwt11UeviG0UAFQZfrB6syLQffriMtHnrmePAYa xjiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=UjacMVaKe7gKCUAo5GYMDTY1231tcICtfSoeSrw3PH0=; b=Fy+tCJvhejCodg7EpuIZ2WDVyDXiBKamiMHxmex2IXk5oDBMZjV7NHibrs/ibjLBRh gUXJc6W2IRVbE8oqiF2B8I3Mi95s7A89x+dsW5t6XKOaB3tPOtZEH1zcgdQf1fyZdfDb j2BpxJiEsUz8cDgo54CG+lfDHGz1eYm2XpSEG5iBePqqaHm12LoeOsD2icglj87My50/ +/4CA7d/gz0DGy8Vnw61vHHX/f4KL0CKWnFd2PXcKFhF9+tFPU0dw7qtVN3qBL2V04LP js+2vzE7eGp6qtkBzPuhOKH8/58Sx4wdf7O/Jpa1u4aQlWz+XejMNSyp3e/c44qMpdOF mEvQ== 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 x33si2998226plb.43.2019.01.15.02.34.45; Tue, 15 Jan 2019 02:35:01 -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 S1728935AbfAOKdd (ORCPT + 99 others); Tue, 15 Jan 2019 05:33:33 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:34680 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728919AbfAOKd3 (ORCPT ); Tue, 15 Jan 2019 05:33:29 -0500 Received: by mail-oi1-f193.google.com with SMTP id r62so1754670oie.1; Tue, 15 Jan 2019 02:33:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UjacMVaKe7gKCUAo5GYMDTY1231tcICtfSoeSrw3PH0=; b=Ep8guZkOMgxiSKU/LSEdlXEuJSD8SACvDlNdiOhnO6UH8K0Sm3XpxTYWPIOhLWValw 2AjPGbAGfbZPiAM4vOjfgDLwkvghaSTh2EhR8qJNo1cRBzgSAFZgYaqRlWyoNDoppLOx ZQKT2GWZ/+CdQpayRNyUlPx/IxYJyb2F5vsgSixii2ZeWqHIfUuR4F3wIP7IaZyAkhtf f17hrpQf6EVWNhlENfEuNSRyGPm9mSlExvkS3Fe5//MRxd1idRt4o1H8KYHBd6GRmNSb d7Wa7soInuBGIFz/xlYsUYe3hZTpSIfdftoI3nOgk/NxqPg+aq2AEdxbMOBGj8hA85vw g9BA== X-Gm-Message-State: AJcUukcHQoI6/eMjQqvHdtQlDXe5gYviqjwc/GkpHRa2QN7HPKrkNDma /Z9iwpyxqHRtIaeOtJUlJbnJVpnR1RrY9sKFwZE= X-Received: by 2002:aca:cf54:: with SMTP id f81mr1691651oig.16.1547548408672; Tue, 15 Jan 2019 02:33:28 -0800 (PST) MIME-Version: 1.0 References: <1547536740-1572-1-git-send-email-yamada.masahiro@socionext.com> In-Reply-To: <1547536740-1572-1-git-send-email-yamada.masahiro@socionext.com> From: Mathieu Malaterre Date: Tue, 15 Jan 2019 11:33:15 +0100 Message-ID: Subject: Re: [PATCH] kbuild: mark prepare0 as PHONY to fix external module build To: Masahiro Yamada Cc: linux-kbuild , Michal Marek , Samuel Holland , Alexey Kardashevskiy , Ard Biesheuvel , LKML , "linux-stable # v4 . 20" , linuxppc-dev Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 15, 2019 at 8:22 AM Masahiro Yamada wrote: > > 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 The above comment may need to be tweaked a bit > -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 >