From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78458C43387 for ; Tue, 15 Jan 2019 08:04:52 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E4F9C20656 for ; Tue, 15 Jan 2019 08:04:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linaro.org header.i=@linaro.org header.b="BMCemkgF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E4F9C20656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43f2tn72rVzDqdb for ; Tue, 15 Jan 2019 19:04:49 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linaro.org (client-ip=2607:f8b0:4864:20::d43; helo=mail-io1-xd43.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="BMCemkgF"; dkim-atps=neutral Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43f2rc2SLSzDqWs for ; Tue, 15 Jan 2019 19:02:52 +1100 (AEDT) Received: by mail-io1-xd43.google.com with SMTP id x6so1352364ioa.9 for ; Tue, 15 Jan 2019 00:02:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=McN6moR7y88+4bHZhsA4IJdl2dXNtxu73L8Cv6c8vJo=; b=BMCemkgFqp7ogQxURcXpH3XZfZKctda5nI20RiZ3Fm7bOLETb5vXvC5VHveXVlQvhP ixzFM7NYkLtA7L+LaEysPMd5TEuMOhFuwjlF1CodHnDvEUVp8ND7FhpEkKfstJ4nlkHO 5FWeRvuFS1VnQRmxssBvcbXsjrvUEynuArx/4= 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=McN6moR7y88+4bHZhsA4IJdl2dXNtxu73L8Cv6c8vJo=; b=kFDa1rfgsB5Ud/MH6zuarA4jijw4ZgJ68zGa4UyOjKcor8SiYUHIhENA5L0q0rfYBB Nz/YPUqCLvR4KGdTa+tQEYtj2FbYllX22PwBJDPMpAZuzKX+YUei/cByn99qaaNnNrB9 dwFHGWxKQwW5zXChV8jAbVi/sHyHeXkfzjuRKS4qEbfeldu9K3XylyLMWlxTgHDVcnhG B/OLwDnAS0cplzZJoxXwei1coEkpbuZ2NnlbTFqw0d9Yv87TdIjRhCuJkCDiIx3NUBKL 1T3nWUUgR706GefxevK6pULvlpjv5ylq4Q3PJ2aPzlQO3YQID2wfxqLgRrJHjm5KDHK6 27nw== X-Gm-Message-State: AJcUukeWulNwl3sX1pRLhKJMxUnYAnl0yMhEf7YAGqH9SVOSPjyBkINc m5hexK0j+BdPVD4eaDfoZGCgAE1K/rAQhJ1yldviBg== X-Google-Smtp-Source: ALg8bN6ZZt8ErAyZptBe8Cm5A3zYjUNW+vcN8IJRFNgG99+6fjZJjifeqxiOqCUNzlxaydHre3MtoaZC738WVp7f9lc= X-Received: by 2002:a5e:c206:: with SMTP id v6mr1397349iop.60.1547539371093; Tue, 15 Jan 2019 00:02:51 -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: Ard Biesheuvel Date: Tue, 15 Jan 2019 09:02:40 +0100 Message-ID: Subject: Re: [PATCH] kbuild: mark prepare0 as PHONY to fix external module build To: Masahiro Yamada Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Marek , Samuel Holland , Alexey Kardashevskiy , Linux Kbuild mailing list , Linux Kernel Mailing List , "linux-stable # v4 . 20" , linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, 15 Jan 2019 at 08:20, 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 Acked-by: Ard Biesheuvel > --- > > 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 >