Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3749876pxb; Wed, 13 Oct 2021 12:08:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFRpfCRi3z4kB7qAtaF8xYv/yShlibvR0rrSQ3zjBRZgImoUFx40BBnyAhT2XZ+Y7ko2rJ X-Received: by 2002:a17:906:1848:: with SMTP id w8mr1172893eje.485.1634152137122; Wed, 13 Oct 2021 12:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634152137; cv=none; d=google.com; s=arc-20160816; b=GfjdcMppjXLL4tJdsicvc4/QjDh8Tf/3qVYYVBeeFtICgbsyQEW6AoqrNM7z4dWZ2J CUIWC/oslx6SzqJMZIW+4vOXORNJwa6HBWo+8jTpdTDGhJ4JkMjJtPt8yWIwKD6H3f/4 Y4hjN0eRvmJvKtvkkK/S44APp32S/pL5lS2lGrzDt//gbWH6zxFEoM4J3gKUbGj1qKvO tT04bLEChF13w0r2yfwanrHRImzXZq7q/MrBMOMBEfZlOebPG49F2riQJTTpSU8Me5Fz fLa2Si9K3v0zO2uupsWW1h3twtguS5PlOJysn36cuqBmmDIJqsK66CYYSrXGUh+y9vu1 67qg== 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=nXWn+C65G2sncjtbdtLGu+sNNu6Ws1SqzBL/4RC9QLU=; b=lbljtWBsCQaOoYY26veLo5+9DkdSXf1jyklA60XsTguKG0ZeCX6kTTkcNabm+p5h0C fjVljc9ZuUqJfmtM81/nBC1sY1X8o9Q2iG6kNovtURKDHip7LgyEYhe7YEFGXEUzrips 9o8YNacZlAqZrOxSbL7tDLf60L8ofU0vT/SSfRI7vUsX7jiRN66PbyRD8Jz/jrF3lvs7 UxJLYLyTdIeZJWpuVfOD8xtZlYTqBUjsZq2wJleL6czZ7twoWsFEruwag/5KrKQpjpFV WdlTaOfO0hIedcsTWx1rqpY2B5iF+fAxEtCCn6sDzow0ylQzmgYB2UMD+XBbscAaMMVn BTEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=erKHCPbw; 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 g5si474648edf.557.2021.10.13.12.08.33; Wed, 13 Oct 2021 12:08:57 -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=erKHCPbw; 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 S234649AbhJMTIF (ORCPT + 99 others); Wed, 13 Oct 2021 15:08:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233600AbhJMTIE (ORCPT ); Wed, 13 Oct 2021 15:08:04 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0561C061570 for ; Wed, 13 Oct 2021 12:06:00 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id pi19-20020a17090b1e5300b0019fdd3557d3so2986611pjb.5 for ; Wed, 13 Oct 2021 12:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nXWn+C65G2sncjtbdtLGu+sNNu6Ws1SqzBL/4RC9QLU=; b=erKHCPbwnNJ+dbqyPQbIehybLasan69a6yMxEWXzryT+WjIUFwYywkEcbu3sK2q+sy B4xybss34Pz4s5MJQv6FtWcW/s4zV23O6TAK3lHCVve6FUWq6ON/yXJ7bVJmDYQv+KnY mvgU1s3Cf/SkHLYm5h2XUwvQO6CkkSvIVSm7Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nXWn+C65G2sncjtbdtLGu+sNNu6Ws1SqzBL/4RC9QLU=; b=5fa4oUkemQBb+dxNUPcqpYoBckZ8qhhCUPtRCyn7Ji2G8U1MNoWlWpg9HgEKRXtOxT BmEBBDqnHkpCSIJIhJ5ie34kRfW1i1SZnbalKL4ai/MG42az3UIuNyxWN+wHbip5DreS uyawT47S0bl6fVMKAxB6N0P+nrnVND/oR6hVBxbyKhF7nt0j3AgGvyqz0MNEobW45oFS sSEWxWUoifhWhKW6dYa1h9HGUfABajG9vPXG12ztYnQZEFLRVaZleMZsIkrvAtR3kF3c Nc+dEIuMC2PCr7EJR54zc3gPlBzMaLf8bV2abKKagljrr1baSe3Z2L6JFG5Lx2nwu1yj WUNA== X-Gm-Message-State: AOAM531esN7tY2MH+ZAEsAO6b99A19ZbIDSOhDj0TcJSDoAssNX92900 e2sTLljAQr/wxXzNEUUx9ViOMQ== X-Received: by 2002:a17:90a:708c:: with SMTP id g12mr15274111pjk.13.1634151960400; Wed, 13 Oct 2021 12:06:00 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id o72sm235042pjo.50.2021.10.13.12.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 12:06:00 -0700 (PDT) Date: Wed, 13 Oct 2021 12:05:59 -0700 From: Kees Cook To: Sami Tolvanen Cc: x86@kernel.org, Josh Poimboeuf , Peter Zijlstra , Nathan Chancellor , Nick Desaulniers , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v5 10/15] x86/purgatory: Disable CFI Message-ID: <202110131204.9978A005FC@keescook> References: <20211013181658.1020262-1-samitolvanen@google.com> <20211013181658.1020262-11-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211013181658.1020262-11-samitolvanen@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 13, 2021 at 11:16:53AM -0700, Sami Tolvanen wrote: > Disable CONFIG_CFI_CLANG for the stand-alone purgatory.ro. If there's a v6, this commit log might do well to have a "why" added. I assume it'd be something like: ... because purgatory is not running with a full kernel mapping with jump tables, etc... Reviewed-by: Kees Cook > > Signed-off-by: Sami Tolvanen > Reviewed-by: Nick Desaulniers > Tested-by: Nick Desaulniers > Tested-by: Sedat Dilek > --- > arch/x86/purgatory/Makefile | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/x86/purgatory/Makefile b/arch/x86/purgatory/Makefile > index 95ea17a9d20c..911954fec31c 100644 > --- a/arch/x86/purgatory/Makefile > +++ b/arch/x86/purgatory/Makefile > @@ -55,6 +55,10 @@ ifdef CONFIG_RETPOLINE > PURGATORY_CFLAGS_REMOVE += $(RETPOLINE_CFLAGS) > endif > > +ifdef CONFIG_CFI_CLANG > +PURGATORY_CFLAGS_REMOVE += $(CC_FLAGS_CFI) > +endif > + > CFLAGS_REMOVE_purgatory.o += $(PURGATORY_CFLAGS_REMOVE) > CFLAGS_purgatory.o += $(PURGATORY_CFLAGS) > > -- > 2.33.0.1079.g6e70778dc9-goog > -- Kees Cook