Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5012202imu; Tue, 15 Jan 2019 09:36:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN6x6mLyz77jbfOEc7ZjIEMRjdvuEhxxKZc8QP1HIW7qy+wd415c+EkptofyIwGC4MrBJd1K X-Received: by 2002:a62:d005:: with SMTP id p5mr5138951pfg.175.1547573812761; Tue, 15 Jan 2019 09:36:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547573812; cv=none; d=google.com; s=arc-20160816; b=OKnLbbAQxCnHq85FhZTUMV7b0OVvRBSTf0nWdE1u8nuVFsDNqAg/g5ffMdypRftudi FBs+JJr74tbcvLuJMbyQu0sSub+LGnT9eA6qYvs35kYSNQ54IGxzsmhBmhZv2XE7Wvfc rHvwurO6uLeqMQlHKuGPR9VmLH8v7C1sHmHqRF4B6CMKxwJqD+Qb4Q/YkP/ODM3pA8V9 Fef9mNU/TtDXR1/MhENY7eitypxsJLQ5IUAyxftwyf/AKXWBB2UkMjaQe29H6zhoOxLL uWO0Y5tY7yWc3azYTl6yf350Kl75NADfFqSzTsVGJuF5IJKKXIn/BKeNxztnWteIPJgj FkUQ== 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:dkim-signature:dkim-filter; bh=8UDmBSl+gjzoSWclaFcvO3xDYwUdpY9ay/TXvDz5OEM=; b=JkOOYvq0zKyRgdyPUzohuysS/aWCsaTvXkjQ97FuTn0AkEy/s9Ry+Xt8jpV6w62E1J boT5w8y+//7BX3sa00Bqjoff3X8HNEZfsflNHS9E6xqGZSQiFj6W073VQOjpCpmgMKCr nC1qKM3d6uQLssgqYWEU0CbixqCY8V93irYZnSZ7VoGwv+sR5604Gyn8v+rC13wDxeak 6PjQy3+tBgNkXx+QejbdEgpmaHjBrq1nBNJO83HJaW77lnTm34c85LqhNKJyEAP0vNmh Cf3RHwgqBbBmsBBpJh2+jIBqwcvTEVHTCZxl+Ztdz3d81bl3vVKcEFLeEEclqssKxO5Q /YEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=y6LjAJFc; 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 c17si4023645pfb.81.2019.01.15.09.36.33; Tue, 15 Jan 2019 09:36:52 -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=y6LjAJFc; 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 S1730535AbfAOO7G (ORCPT + 99 others); Tue, 15 Jan 2019 09:59:06 -0500 Received: from conssluserg-04.nifty.com ([210.131.2.83]:43898 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727307AbfAOO7G (ORCPT ); Tue, 15 Jan 2019 09:59:06 -0500 Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com [209.85.221.182]) (authenticated) by conssluserg-04.nifty.com with ESMTP id x0FEwelM014392; Tue, 15 Jan 2019 23:58:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com x0FEwelM014392 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1547564321; bh=8UDmBSl+gjzoSWclaFcvO3xDYwUdpY9ay/TXvDz5OEM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=y6LjAJFcPAOXNvCm5WIxLGO/FoW3ZcPy2YXBYrMXY5HxNMwPZUaxpAHXTyy5Dud9j j//GPp8jtJZxZoQCvWz0CeneAlXC9cljgtWhSafPY9punWcOc70oLO1mkbElO3k/Wk iCzLasb5Ssxy3jZjvA8uzTtQFNtzXOt6HwYGtBAXgFKkdA2Z56HbuB1eKm9QaK89o2 sKy5mODeQGlhnkE69rFtpVe58MnQSmg+nRR0skpg8VTvt9D8s0db9nLRG/QMwvJuKI C5ceXamv/fzCcoF9rH9QE/Ykgg/ZoqcXxhWYh/l90JbOqJ4Xe/JBcrQJDNg4lY+j/G Kfe+C/rfAzArA== X-Nifty-SrcIP: [209.85.221.182] Received: by mail-vk1-f182.google.com with SMTP id 197so660379vkf.4; Tue, 15 Jan 2019 06:58:40 -0800 (PST) X-Gm-Message-State: AJcUukc+WSOHMJG4iFxdsA3vYdtgZ6LqrV7dukSX8/So5W1FI2m1rId6 8RZTpSY41l7O/M6Ez2kGz8ZqCXebnSfwZ5KPjXc= X-Received: by 2002:a1f:4d47:: with SMTP id a68mr1640605vkb.34.1547564319674; Tue, 15 Jan 2019 06:58:39 -0800 (PST) MIME-Version: 1.0 References: <1547536740-1572-1-git-send-email-yamada.masahiro@socionext.com> In-Reply-To: From: Masahiro Yamada Date: Tue, 15 Jan 2019 23:58:03 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kbuild: mark prepare0 as PHONY to fix external module build To: Mathieu Malaterre 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 7:35 PM Mathieu Malaterre wrote: > > 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 The comment is wrong irrespective of this patch, and less important. Do you have any suggestion how to tweak it? > > -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 > > -- Best Regards Masahiro Yamada