Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp228506iob; Mon, 2 May 2022 17:51:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNMWeFKSbmhLPAMx0w45Cih7X2+Z7ISmF7GzVc4O/c4XtAc1fyZGb2r46dQ7hCAvNu8AS9 X-Received: by 2002:a17:90b:f03:b0:1d9:a8e9:9e35 with SMTP id br3-20020a17090b0f0300b001d9a8e99e35mr2087393pjb.48.1651539103769; Mon, 02 May 2022 17:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651539103; cv=none; d=google.com; s=arc-20160816; b=fdq4g9TDpRHcFzz1AiPwkaSdqMJsVXLO/Yrl6CJ5AJmU1/2GV7acLtSMTgxoYM2+ci zzgFbTYaZusoUskT2dsOnlXITP/9v+Nppu8+0t+4hUf3W4cyML5c7njFEw3wUc6Lguup ajyWiKlA8QE6u+83EXzQ2Gj9xRjS72Era5AJLCNEHiGEjkKU/Z1getNVNO7EeBDQ5GdA 5VxBWK+T9zSj0DyYf2ws65ewrZqlFShlhrBafOIMFA9BbmNw9Vj6jfu0fC5IXROU5N6Z nKHmtIh1cqsA5M1wpRexe9boCwlZm2o663Nv5HvWwShHaAceYLxugk6N1XrdJf2VFKPS MgwQ== 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=mYYa7YhSPmVPESGC3WBfSUVLu7/5dL6ovKiS3tnTNxc=; b=O1yocm+GqzycC8pXDHr2TIYCbGvbv//SiYa1ZeeNfLpZZIHNeV3wzTccCFYMlgD8I1 3eye6LDTUn2LPWu9YEB2kUvJ+k7T07WG8taIbSLtmd+mQ5jELJXBK71beNY2gvm19/Fl KxITVxg8l4ww2W3786uuplwErZeoXxvm0J3rZVsF6+TU7XjNfc8q6LNl9RDEUTDHg/aR o8Garr26PlA0rjg6FHXhJXhXMlTiU5FPAchacNpsfx1lTyK6gQ9jmneA5P8di654v1Bn jb6PU5TkFY2YjRSFx3JlTK7titwB/lyW50O/gz0GvRr08jDyJkj49MroT+9jidsIaJQf OWNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=X7JjkI1e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id li11-20020a17090b48cb00b001d984c76f9asi741630pjb.127.2022.05.02.17.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:51:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=X7JjkI1e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 156D45004A; Mon, 2 May 2022 17:39:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234040AbiEBT70 (ORCPT + 99 others); Mon, 2 May 2022 15:59:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbiEBT7V (ORCPT ); Mon, 2 May 2022 15:59:21 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15D11BC39; Mon, 2 May 2022 12:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=mYYa7YhSPmVPESGC3WBfSUVLu7/5dL6ovKiS3tnTNxc=; b=X7JjkI1eS+hZwlLL/I9p7ec0h2 UeIxqvrdiJt3meq6ElbsNEDYIxW+qZz/j2FrSu6coXltcfr4QtTMMPFDzslv9IR5A31jl1ddBKnH9 c2qsGdbgoQzF9iywxqp5QHtMYcYLEB3+RVk8mUsIOTnJ93L7VRDhLz56q/kJE1S8EfyygaZ+EPJH4 +lUKye+VxqZ8KUh1eKBescSHXrCybAweDQoUoV1TG8LbXYRpZEdQGzvMqMTJ67eTO75Z/LyqmGrAJ WIdEZp2LKR7NJxMrEW0UmH4MNpVWroXNW+J0b79QIxFrPP2W8RHSAR29nZiASkc9sS+Ga1qVVPW+d 6RQX6kKQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlc8m-00AZWD-7z; Mon, 02 May 2022 19:55:28 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 772E030017D; Mon, 2 May 2022 21:55:25 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5223120288CEB; Mon, 2 May 2022 21:55:25 +0200 (CEST) Date: Mon, 2 May 2022 21:55:25 +0200 From: Peter Zijlstra To: Sami Tolvanen Cc: Kees Cook , Mark Rutland , Josh Poimboeuf , Will Deacon , Catalin Marinas , Nathan Chancellor , Nick Desaulniers , Joao Moreira , Sedat Dilek , Steven Rostedt , LKML , X86 ML , linux-hardening@vger.kernel.org, linux-arm-kernel , llvm@lists.linux.dev Subject: Re: [RFC PATCH 00/21] KCFI support Message-ID: References: <20220429203644.2868448-1-samitolvanen@google.com> <202204291545.47C6A97EA2@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Mon, May 02, 2022 at 08:22:57AM -0700, Sami Tolvanen wrote: > > Anyway, I think I hate that __builtin, I'd *much* rather see a variable > > attribute or qualifier for this, such that one can mark a function > > pointer as not doing CFI. > > > > I simply doesn't make sense to have a builtin that operates on an > > expression. The whole thing is about indirect calls, IOW function > > pointers. > > I also thought an attribute would be more convenient, but the compiler > folks prefer a built-in: > > https://reviews.llvm.org/D122673 That seems to mostly worry about C++ things (overload sets, template specialization, name mangling) we kernel folks don't seem to much care about. I'll stick with saying type system makes more sense to me though.