Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1623742iob; Sat, 14 May 2022 15:00:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMaXcFdL49wKqYJpXJxOyCTFsNxRLjEllz1UpNsepvao1UpYATbmKUjsREd0IIf/E2G635 X-Received: by 2002:a05:6000:1681:b0:20c:5aa2:ae14 with SMTP id y1-20020a056000168100b0020c5aa2ae14mr8769222wrd.443.1652565618486; Sat, 14 May 2022 15:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652565618; cv=none; d=google.com; s=arc-20160816; b=x/Uonuo+TY6SpXGNfX2WyLP07aO1lAU57xKlvqoO1GyLfvhhlmePIRlVprG2TgI4cd o8ATAOX42r52wRZbCWWq+dB74XqcLLufpe4BQH7ARnPICAFz/+8DzEpOpHD9VCnC8Q7G Q6/v0hMEMZibeKEQX6/KkNxunWh2RaMPwKz5UY8cE1ibbEsA076+MEM8IWihIY09/gql x0OSGRR8Xb8x5E31qABUrI45KRTLQqGGKk2txAIwVHn65rEQjqG8RL+AwkAOCwZKJAkP rX4Qb9LgLeoai8Sputil/ZeLJ2Ycih4qGH3QAte/gFWVaR7OoMuOWD239JZsqNqhJqTL NW2Q== 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=1kwcy74YlztxWF5D6kkYQbaOPu8Yx3i8Twa6E2rtWI4=; b=reQVFHDYvqc8fnN88V/SAv0nyvlIl8+Os+/hLlTRUCpymijBYWB1yl8q4ss8eioTg3 fYqmj0zRPHJW/RemSowC6TDPOlLe/f7wjkjaOpY1mvflOs8j7iwtru88LDTC8qUruQv4 L+Em9a0xmGW6UI9Z8t5J5urKxAR67YJCNr2K+6/TwYffyukhkYbk/bbNRtAVtn6mBWkY kiaZ7YEb4e7z604V7csbzq7Dg2qzSgOgMOXGHAzvQQdzBJCheHxlBiqNHZ9CLptIYimB u1dJxwYY8YS85GrvYa5WdSz2tuEsalpDJHLAVfVswpbrLkzM+JHoBz2D5kkIKwjXZas0 WBEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=heJeUZ0X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b3-20020a05600018a300b0020a7de72f77si8417704wri.510.2022.05.14.14.59.48; Sat, 14 May 2022 15:00:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=heJeUZ0X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235308AbiENVoq (ORCPT + 99 others); Sat, 14 May 2022 17:44:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233724AbiENVop (ORCPT ); Sat, 14 May 2022 17:44:45 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEA0C18399 for ; Sat, 14 May 2022 14:44:44 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id gg20so963475pjb.1 for ; Sat, 14 May 2022 14:44:44 -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=1kwcy74YlztxWF5D6kkYQbaOPu8Yx3i8Twa6E2rtWI4=; b=heJeUZ0XTY4GUls4GZuegGii5t/VwuhS1ZpQ37mLZwfCDKDm207g1xsj8JBCk2bIrS aNjlGwo9LlONQauWo+z/yeNmUVPWAY1F26BDhdC/o/qVf3CI2gOFdgEkH/GZhaehv6/3 Dmfe/noGcr5iWvP/+oMw+4wEkUZvgRyFHIKFg= 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=1kwcy74YlztxWF5D6kkYQbaOPu8Yx3i8Twa6E2rtWI4=; b=wQCSTcixIS+rPXuMaVeFNTPGOn2a6i3l//i4WmGpdF2w7JbD2h73EAEPWqp5TZoieR 1pcI99rXC/G4pM2umHInNMaL3RiswJDGXpNVTjefGKeEvHKjV9akplM5fU4bggQGlG+m YqpXnJg2/eBiAaIPUSXlnvn3NjUAUzN2qfmQcQoB1t0HktJHzxTEeGBRONMQeNFwfUWo +LWlB7dq0fKHbOYqZfm8ziHPlsqq034cjSPjYtvybMVJyWz0QAgPYAyOhAd/q1QWKENT X7qeGm9uDgCCLkbvK3w+AT7wprZYt3J/ch0aSleI0inqf8DuHgVQJoQ7hFrj5SgWcx0U Bufw== X-Gm-Message-State: AOAM533E5kQiA36euUbabuOwsB4xFzUtRyIKxZfMJ9MVNJnDjKpEWSAU 7cLJI4vPsrHoq7R22yixA6ksPA== X-Received: by 2002:a17:902:e746:b0:15e:b4f3:72e7 with SMTP id p6-20020a170902e74600b0015eb4f372e7mr10953716plf.8.1652564684488; Sat, 14 May 2022 14:44:44 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id x12-20020a170902a38c00b0015e8d4eb1d2sm4121582pla.28.2022.05.14.14.44.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 May 2022 14:44:44 -0700 (PDT) Date: Sat, 14 May 2022 14:44:43 -0700 From: Kees Cook To: Sami Tolvanen Cc: linux-kernel@vger.kernel.org, Josh Poimboeuf , Peter Zijlstra , x86@kernel.org, Catalin Marinas , Will Deacon , Mark Rutland , Nathan Chancellor , Nick Desaulniers , Joao Moreira , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [RFC PATCH v2 05/21] cfi: Drop __CFI_ADDRESSABLE Message-ID: <202205141444.0C1A3ABD1@keescook> References: <20220513202159.1550547-1-samitolvanen@google.com> <20220513202159.1550547-6-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220513202159.1550547-6-samitolvanen@google.com> X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 13, 2022 at 01:21:43PM -0700, Sami Tolvanen wrote: > The __CFI_ADDRESSABLE macro is used for init_module and cleanup_module > to ensure we have the address of the CFI jump table, and with > CONFIG_X86_KERNEL_IBT to ensure LTO won't optimize away the symbols. > As __CFI_ADDRESSABLE is no longer necessary with -fsanitize=kcfi, add > a more flexible version of the __ADDRESSABLE macro and always ensure > these symbols won't be dropped. > > Signed-off-by: Sami Tolvanen These macros were so fun to build, though! ;) Reviewed-by: Kees Cook -- Kees Cook