From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E757C433DB for ; Wed, 24 Mar 2021 07:13:00 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0CD5E619F5 for ; Wed, 24 Mar 2021 07:12:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CD5E619F5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8GGpaVLM7dYSLKg42IQeU2x2qIu+dANHj4dNbHinm70=; b=VZB9IBNkinKzQEFmadmK+t4hi 55cxPB/oTWGsVWaFKpLeMymFEI54wWUxqXxPyZiokz7d2NXKVDpOnYjsrnsFKTTdxDNSrkDSZDl/6 LHk0lmWk7w9KVwrYlzUiS2BqBYtXL8l/HIML7UW1p85f/m4GB+5I1IZO15tJrWEnIZZnwu/kaMt6f 6SO0HfefgjRAE5eSAQQQYno0Kd4ByRFqGgY1A71Y87UxRWxsZUnAyvYPI327Xp8uKOEtsYbnEkUpj MsT2+oy/tI3xu5T42cLXhW+kZ4YxqGCzEBjHs8XvB/Ke2N6PnE6VOxHckZuXwZ8azVcd4TWLquRKY dZXwLB6/Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lOxfq-00GSR6-SZ; Wed, 24 Mar 2021 07:11:27 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lOxfo-00GSQg-0R for linux-arm-kernel@desiato.infradead.org; Wed, 24 Mar 2021 07:11:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=54Qbh71jGibI/QTbfGG9/h5IL8C6wSLI2XHKlvis0eI=; b=gFRvzRpNXls/yy7upHczWVYAMN tOtlIgTyynn1qKZJTjKZf7gLY/ai8EAbFpatb1GSNXmIX9TGJBw0FFq8ULfEhfTXJRshV44Ji6SDD xmEdnsDTyOuEmKufKDbbEo/NztEPcL4cE4o1F3drnw0lpu9lIn4F1Fo2lheZpicyMkZRpCdezVpc7 R8ofDGz02Gbr6vVvgyHnT+/ODApGr/cWel/pFRc8o2BxNO3lvyfpHg9f8M2vmfdne64d5LRlHpquw nv3mMqN6vB2BSdEdR3oRlhsY771qgeKMtDHEqjKzzRzLpTtnwEo4HhZ0dBbzAidV8ejNIq/gjWEXx beublnGw==; Received: from hch by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lOxea-00B4xp-Ks; Wed, 24 Mar 2021 07:10:18 +0000 Date: Wed, 24 Mar 2021 07:10:08 +0000 From: Christoph Hellwig To: Sami Tolvanen Cc: Kees Cook , Nathan Chancellor , Nick Desaulniers , Masahiro Yamada , Will Deacon , Jessica Yu , Arnd Bergmann , Tejun Heo , "Paul E. McKenney" , Christoph Hellwig , Peter Zijlstra , bpf@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 09/17] treewide: Change list_sort to use const pointers Message-ID: <20210324071008.GA2639075@infradead.org> References: <20210323203946.2159693-1-samitolvanen@google.com> <20210323203946.2159693-10-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210323203946.2159693-10-samitolvanen@google.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 23, 2021 at 01:39:38PM -0700, Sami Tolvanen wrote: > list_sort() internally casts the comparison function passed to it > to a different type with constant struct list_head pointers, and > uses this pointer to call the functions, which trips indirect call > Control-Flow Integrity (CFI) checking. > > Instead of removing the consts, this change defines the > list_cmp_func_t type and changes the comparison function types of > all list_sort() callers to use const pointers, thus avoiding type > mismatches. > > Suggested-by: Nick Desaulniers > Signed-off-by: Sami Tolvanen Looks good: Reviewed-by: Christoph Hellwig _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel