Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1404773pxj; Fri, 21 May 2021 13:26:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJwpc+E9P7duqSQJcfRLS7pchOPPjj5sq1F46ZHsWGrQUsIvMqPyo8W2n4sJrADLwxZuuX X-Received: by 2002:a05:6e02:1302:: with SMTP id g2mr616731ilr.259.1621628810281; Fri, 21 May 2021 13:26:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628810; cv=none; d=google.com; s=arc-20160816; b=bn7QMliRk0EjlDPNpTHMLP1Ar9blUT9fUhsl4xEbrQerhIFkd1WRk5KuPMSLNRWtiG jGb+EzctjIRv9vIKk4xckbBQc6489tEZ00DPUafQ8De7IHv0UbaFXPa8IvZCVmDG+UZC 7++Mh53UiaIls6R0ySV4VAJNX4km4ujQRhQLc+i0JyXlOtmBWy3ordEDBIXuYDsjY3v/ /w0rl7FTWa/rZ3Vf4qUiX+plgxex2dCXMDGzhJY5o7eBWn68XpHwbF7ZavzGmxHI9cd6 /Vm0CbpjJSVloh0Hc6TolHXOj+bnAWO9Cn3sMPBaYGDQ1xJCJocvX8QPp2vQ9NbYR5hn F5Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hr9ds5H/YWWjHgfy6+GSSCTpmIBu87QYMBOm6WDsaN8=; b=ZNlvYdT8hd5uCH3C0LikKEOczVclnXNPCzMEoZbAIt3YlC2uBIZ4rjQtF35uZsXlsa i1rLVwHl+vmGxBpzHm0jwj2C8ejcyreA/obeDffkxDB9cYJkM+GlO2M9/IoTw4JdoCpm m+KFGS5urnooy3qspAaAznplv5AT/k4tu4O+ruFv4isQo5bfqxvpyEhSjcHaRvVI1fUq 2dx8XwwVV8OFCfuoTQilTdegQdKMNAG1YkPAxJOJ1KPgDXz8odJB5TXgcAEv3cONPYbu jP3hwb5aWSE/yJtkJIqMpWM6A5SMCSpfX1/aMWZVuH3MiF7wDTCrHFWtq7xumpRoP46a AeMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="WceCxk/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si7608637ilg.93.2021.05.21.13.26.37; Fri, 21 May 2021 13:26:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="WceCxk/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235230AbhEUSdX (ORCPT + 99 others); Fri, 21 May 2021 14:33:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:41338 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232583AbhEUSdX (ORCPT ); Fri, 21 May 2021 14:33:23 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ACD8961163; Fri, 21 May 2021 18:31:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621621919; bh=W8ZFnZ6K3bOgQrFcSo55/C7NzWOnuNznfcybWALo6YU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WceCxk/9f5UBFse+HmJ7rgt0dcvUYp13RTHjPUudWyPk7YCNBXcPuhATDVj5Z7gRI iV7hmQftGvAjw0NVlzLYCyfhqMzH6lUJnFwvZ8UMHCnAx2AP3iPK0NvHzO7H+fH6cw 0PVz87hSFDKk91MYFK7ivhB3VXgi0ETkvpLRbV7udGegis+a5pXvfgbIOR8FDNamMP 6kVCT8Eny4Ty5cLaSWlUMcGNLx0uzG3pMvq3CsRCCQDUB4qu27NLyjuntc/vj0+BjK 00UqqRpuJtUUh8qkCaDg1QLBoWQa+r35pB0XPe8LMiHQMl9IjLhzVXcYbgcp2dO8fU HjTen3/t6nMRQ== Date: Fri, 21 May 2021 11:31:54 -0700 From: Nathan Chancellor To: Kees Cook Cc: x86@kernel.org, Sami Tolvanen , Nick Desaulniers , Thomas Gleixner , Ingo Molnar , Borislav Petkov , clang-built-linux@googlegroups.com, Anthony Ruhier , linux-kernel@vger.kernel.org, stable@vger.kernel.org, "H. Peter Anvin" Subject: Re: [PATCH] x86: Fix location of '-plugin-opt=' flags Message-ID: References: <20210518190106.60935-1-nathan@kernel.org> <162161994470.2028902.331062863146834934.b4-ty@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <162161994470.2028902.331062863146834934.b4-ty@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 21, 2021 at 10:59:10AM -0700, Kees Cook wrote: > On Tue, 18 May 2021 12:01:06 -0700, Nathan Chancellor wrote: > > Commit b33fff07e3e3 ("x86, build: allow LTO to be selected") added a > > couple of '-plugin-opt=' flags to KBUILD_LDFLAGS because the code model > > and stack alignment are not stored in LLVM bitcode. However, these flags > > were added to KBUILD_LDFLAGS prior to the emulation flag assignment, > > which uses ':=', so they were overwritten and never added to $(LD) > > invocations. The absence of these flags caused misalignment issues in > > the AMDGPU driver when compiling with CONFIG_LTO_CLANG, resulting in > > general protection faults. > > > > [...] > > (I've slightly adjusted the title.) > > Applied to for-next/clang/features, thanks! > > [1/1] x86: lto: Fix location of '-plugin-opt=' flags > https://git.kernel.org/kees/c/5d6c8592ee5f > Ingo picked this up in x86/urgent so you should not need to carry it. https://git.kernel.org/tip/0024430e920f2900654ad83cd081cf52e02a3ef5 Cheers, Nathan