Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4484701imu; Tue, 15 Jan 2019 00:25:56 -0800 (PST) X-Google-Smtp-Source: ALg8bN67AD+ae/rnyRPHaX71/EygxiLfewvnrNz3e4OgTPKWh9GPBibFWM6gcuyzCPA9Qbi09Bwd X-Received: by 2002:a17:902:6683:: with SMTP id e3mr2746159plk.93.1547540756640; Tue, 15 Jan 2019 00:25:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547540756; cv=none; d=google.com; s=arc-20160816; b=OQsQDFQ9Duao4nAYSuS92mAY37EkGv83jcD2BUhyScw8VkzkpXa79mJ6Og//SilXn6 0TpksMsyKNWkeRKQKl2nAGGtsCSkEeEbJwWs222nqGlN5Kiz2HNMj+ixzfJX7awapxTl m76+W69fMpGu9fjCWFXj5GV84RIPTaeP++fmPDnsfkvKqeRT4bJ/tN9oz+iz8vGFBicW WOp2kfIPkAqgQ24wXO8uLeytk6Q3n/mh+NcaKZVxV9hQqjws2j5JdrHN+2gPSJZVjbtF UTiwtMom55qOgSRyO5D0kqnUJu0eD2XoJL1JNd3OZUGF369sf0LM6Y9K3w7IDogfjBzC +ElA== 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; bh=McN6moR7y88+4bHZhsA4IJdl2dXNtxu73L8Cv6c8vJo=; b=A4FX5/dAPwUjPU1XOFFFeDX9jkAbPQNmyrhe2EKZHHfMmwjCmaV1usH4pv6HOC6snz OEj55/T4f/6SDAuPbf2MRBDk/yhx3t72St6SiU6Sxzl0bcwu5CyoFBHxJZmKZW2M+YOZ J6DSlwJS8qaw+h7BzLRLEQArZ07RjHDWd2Fvqv33H2kdmhUXTS4Uja3sSK/PmMTDDK3/ JDmDzpS8JlEHmi5bD4VPrgSzCVj28SPI+25L79eqK+/8x/y2k7H+jX8pFUFkrB4X2yP0 gUs5/arGOumoKrr85a3tPE1fIgIDxcR9UkPZ/uTv1XcZn+2Em/oDihYIgCxkgankauyr OuyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BMCemkgF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gn20si2558041plb.98.2019.01.15.00.25.27; Tue, 15 Jan 2019 00:25:56 -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=@linaro.org header.s=google header.b=BMCemkgF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728358AbfAOICw (ORCPT + 99 others); Tue, 15 Jan 2019 03:02:52 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:46963 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725869AbfAOICv (ORCPT ); Tue, 15 Jan 2019 03:02:51 -0500 Received: by mail-io1-f65.google.com with SMTP id v10so1325597ios.13 for ; Tue, 15 Jan 2019 00:02:51 -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=pVHHte4NdqtdKRhmbHtK3qc24ZF7/LLGt9p02tISnqzhff2rdMKjeq/9ck/5MaTNHf ZWO+XdZBoBG/gmkV/z6ZVxiu89Shtz+sb8PjmYL+AH531BBbxPawH4jpD1JLXfcYLjrA U6olLRauEjy7jBeyHjXvug+FJpFBSXGslcZ9DtKKDCHE92tOU7EdgCZkHxme/W8xkwMu jy5vKALDP4DVZkAPSwMe4jX+8Y3zYgIKx17Glb2VgrWbgoI0Qkzzm9ni+q5Ki9dE53NS BPO+9JmNTpJOaLr1G/TZtEnaHaK7vMJuqQrFSfEtNif96nIYLMLqj1kLUGj8rHJ6HV78 fuOA== X-Gm-Message-State: AJcUukfQEFehA9zx9aH6s4UJIqD1GhKYTQAQBoJoi+IQYh3gSb8VO99n BWvruNPiP+l6LLpVApPfFLWpIWAwonpPyfqFNHy/ag== 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 Cc: Linux Kbuild mailing list , Samuel Holland , Alexey Kardashevskiy , linuxppc-dev , Michael Ellerman , "linux-stable # v4 . 20" , Michal Marek , Linux Kernel Mailing List 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, 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 >