Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1251622rwb; Thu, 10 Nov 2022 13:26:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf7QSK6mETSopIBmTfmhhgqLy7Lvv+Xm/TpNqEml3Ql7pjQSzy1/jhrE9lfgG26TU/CBBjcn X-Received: by 2002:a63:fc21:0:b0:473:e501:8c03 with SMTP id j33-20020a63fc21000000b00473e5018c03mr868020pgi.539.1668115572796; Thu, 10 Nov 2022 13:26:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668115572; cv=none; d=google.com; s=arc-20160816; b=wVGQ/vPZGhsnZyqmMBKTDSSaEJIU65HxJJIXZ5aHlguRfmD2RWdzdirUhZvrxJcGbS qqrFrnWQkrC4RVIgK5rELME9ueo6N6nGVWcfDsl3kTcrDuE0UvsFUe2K7hzLbhLWpbV3 TUJ11/2O/XCCh2UFTMxn+i4Sc9mcSHvR5zm4vSyXjuYaWQJxHYi22on7+k6ytq6gVpX8 s0HQYOMhpazArUnB2fOCBEwS3p524lyy2pRlT5zU/xAtUUTcj3AuSkRSqleBJJQR+hHZ cDqiSn8mCI8bdbGOJbpt1Z2Zg/c7NwMGSJ+NP1bYipoCBZtUZ+MQXZNoMneboUdYJUEL 6LZA== 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=4iW4PeVgjsT2ol/p/kM8VxFidzT9F1Kk/WXbHaTrdco=; b=CEvnqLKINkEBX0mp9ZyH/iaFrOVpvKsb+9C2QgGI62sbgdQAfwNKjrwu11YrmXPIe6 LlBgyZGKxK7FIeQOQ8rz29QYUi0/DxOXZ7wi+WRKA2JewThmLxb5CGgg0ufTluhn2Wor 0ZBU0/vFw5ahbbu6D3ZnnbzW9/raog55GfI1mNv6xY/kn+VQubYcdGSAuQosMANqRfiR gqvP5PUvlON2LK5ynv2OwZA8d78SVrFvMQiTK9pZodxwuGwIAmixp04s2rmiCrMbS67+ uzSQKDaSN6/bV+vL+iB1nY5n1GWeBW37jVgci0p1kMriA45FcIg7bJy0VUYmkv+J+4tK S7+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pzS5Vq9q; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h189-20020a636cc6000000b0046086f8f5cfsi231959pgc.383.2022.11.10.13.26.00; Thu, 10 Nov 2022 13:26:12 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=pzS5Vq9q; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232225AbiKJVNI (ORCPT + 93 others); Thu, 10 Nov 2022 16:13:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231702AbiKJVNB (ORCPT ); Thu, 10 Nov 2022 16:13:01 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A5E358BC7; Thu, 10 Nov 2022 13:13:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id ACC6FCE24C6; Thu, 10 Nov 2022 21:12:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B99FFC433D6; Thu, 10 Nov 2022 21:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668114776; bh=hlxx+8EYpls14cLcfzrM8Xzl08ejjMlEeB2I7xYIzPY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pzS5Vq9qWmnCmxwsvgQtlCzwrk+6gqG9oprabqE2TRR6xtCdTsP7/lb/IieSfiaB9 BDxRR3W/HgfhcM5Sbbh4JqwOA67Q9mpibxXAGur5r33rfK1xhcSlFIwyxlljj0qlwT ms1V1LYXzBs+fVd1oFuqAZsv2hFlQww2coacf0QsRM2e3D/acisrCmesj62OyCzXds lciqfR9JGQmYwJKtuOmrAnMyEhbbZFZgNz0LptzyQCvOMAbkfOjUcREkinJ2gff0yn ulzqgu53TzRzv+/BlZKEhc1gRMqiOoQ6QIAML63HomJY79uR5Q4UhNxtptTZ5GXx9f ej7O1wi0FiI6g== Date: Thu, 10 Nov 2022 14:12:53 -0700 From: Nathan Chancellor To: "Li, Xin3" Cc: Peter Zijlstra , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "kvm@vger.kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "hpa@zytor.com" , "Christopherson,, Sean" , "pbonzini@redhat.com" , "Tian, Kevin" , llvm@lists.linux.dev, "Gustavo A. R. Silva" , Kees Cook Subject: Re: [RESEND PATCH 2/6] x86/traps: add a system interrupt table for system interrupt dispatch Message-ID: References: <20221110061545.1531-1-xin3.li@intel.com> <20221110061545.1531-3-xin3.li@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Thu, Nov 10, 2022 at 08:36:30PM +0000, Li, Xin3 wrote: > > > > +#pragma GCC diagnostic push > > > > +#pragma GCC diagnostic ignored "-Wcast-function-type" > > > > > > How does this not break CFI ? > > > > I wasn't aware of it, will check. > > CFI needs $(cc-option,-fsanitize=kcfi), which, reported on LWN on Jun, 2002, > had not yet landed in the LLVM mainline (I'm using GCC). So looks we are > replying on people keeping an eye on it to make sure it's not broken? Well, the entire point of the warning that you are disabling here is to catch potential CFI failures at compile time, rather than run time :) Clang also has -Wcast-function-type-strict, which Gustavo and Kees are working on getting enabled, so that even more CFI failures can be caught at compile time. https://github.com/ClangBuiltLinux/linux/issues/1724 https://lore.kernel.org/all/?q=-Wcast-function-type-strict Cheers, Nathan