Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1404444pxj; Fri, 21 May 2021 13:26:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUio73kQddDDuVKSCrCe3SxpQhv6b8PQxuXJBg4e4kcdf5XmLzAp1cSx2P4szSifxv6tWT X-Received: by 2002:a6b:6c0b:: with SMTP id a11mr659417ioh.37.1621628784342; Fri, 21 May 2021 13:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628784; cv=none; d=google.com; s=arc-20160816; b=k8x093fvKM+SfynIV6IyzOFoIRYvz3VCJeoh/jHqbvBZg22TGedOYQl3i5vIeCn1oM o/wU+NGjgmmKDu7NsCB0PvOn1rnbtoo/pRQy4Dewszgk8hh94s4yFZpS1wf7GpfPhUfm zBn8OjOuIvrCznBN3bk1dtcXsCfBEBz9Y6QFlOEYqruFxuWT306cJvDCDLmwoyrgSw8N xRjYloL1M8kBUvzi2ubd4RqFViinWw+PEUt64PEos49pVXGycmTnmbPOqeEPKY32pQeL Q9wOG4Z5+2H7TSiThvwURtcJDydjtMQq0RtGDtijTbxu03H0kz5O+WKs5vzlCzfUC26E uOXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WvnbS4IVZhECF51z6O+EfBBe87ZTqf6cbpg5WnJxJSc=; b=oyEYASVosIcGQrdTJjZbwmZwAIR3k1gukW8CqKXWBVKQCEa2LoqFDvvl3gb8a9Ac5v 6KpE6itGfMrv/1IcGVF8ox74B8bW0/dvqHWFPEqGho7LPtCW/RAaIDMVistVPXkVdZmO ICMKy/8UjPiYX4DujmRFTe7YciSNCnYgEm0WMUaprsLHyz1cIgh/WeB4NDdXpHrO90Wh MJMZFLUF+Kjclf8BqEbTK3jAhsVkQyHSqvHF4U8bhj3Dn4evzvJqCPjD5R2j59eUtQ+X r0o+GUUJPqhunRMxOLontnUloRdMiLr61cwwNy4ttdlNow/xHfX6nsKyaM1HFA2ZKKM4 mIWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dRa+q4dj; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z89si6596602jah.125.2021.05.21.13.26.12; Fri, 21 May 2021 13:26:24 -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=@chromium.org header.s=google header.b=dRa+q4dj; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231531AbhEUSBJ (ORCPT + 99 others); Fri, 21 May 2021 14:01:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232931AbhEUSBI (ORCPT ); Fri, 21 May 2021 14:01:08 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 551D4C0613CE for ; Fri, 21 May 2021 10:59:45 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id gb21-20020a17090b0615b029015d1a863a91so7758984pjb.2 for ; Fri, 21 May 2021 10:59:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WvnbS4IVZhECF51z6O+EfBBe87ZTqf6cbpg5WnJxJSc=; b=dRa+q4djh2zWgsZsG80B8J00y/BYlEh4KnODAALlDl6ALDWnGO2ZWZvDRGfrs948mW IdQF3TyoEgErcIHsHN/PQIcBxYgYdxfvYktPTaZJ6arZDaRW7Wxqid4ZxuyunuxU39Kk rsYiltUpO/o400ktq/z/L2SyyiawsfLpXN4xg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WvnbS4IVZhECF51z6O+EfBBe87ZTqf6cbpg5WnJxJSc=; b=EhNmbdTTY8XsyyJhu6SYEGghIqKcUJ8Tm5bPeZWZcfHiHEecEHRz5IkhkfFwIuVApF irw93uwCJUQqZGoQl4vPwxgBAB3S7XE9gly/rGuaWu0K9J+Uypw3KBl/rUQjflR56x/W AETYRGfhdlK5gZK1LSWX20u+2lOdTbOWpqtsCmTiMwMJ2rPYRKGvOVM9vBdvCip4RryQ SCtIl8Em7dFX1bPru6Djy4U8+d1lCrjRatjo6NUD50TfOZsDKBlTJG1+UHDzoAmpous2 nkZZK8MPPoB68bp+rsYf9L2Jfwwy0WwVXqsAc/rdNunUgY7cUvIC7AAI4ZJO7c+wNLhK YgVA== X-Gm-Message-State: AOAM530tg12ZlZny0BHjJX7a05HKedL/jjT9o0rIlY6KvMR1iQbzpiiD O6Hhk3Khg5elaptAaZmG7zYaDg== X-Received: by 2002:a17:90a:9d88:: with SMTP id k8mr12209792pjp.64.1621619984833; Fri, 21 May 2021 10:59:44 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id s5sm206280pjo.10.2021.05.21.10.59.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 May 2021 10:59:44 -0700 (PDT) From: Kees Cook To: x86@kernel.org, Sami Tolvanen , Nick Desaulniers , Nathan Chancellor , Thomas Gleixner , Ingo Molnar , Borislav Petkov Cc: Kees Cook , 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 Date: Fri, 21 May 2021 10:59:10 -0700 Message-Id: <162161994470.2028902.331062863146834934.b4-ty@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210518190106.60935-1-nathan@kernel.org> References: <20210518190106.60935-1-nathan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- Kees Cook