Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2352654pxb; Sun, 31 Oct 2021 13:48:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+UUSp3OlCOhdjEv6skihdBSwub3sc6MlXTUYu0xYkiJGaYf0YrTi+oGA8w4JorXg/20pa X-Received: by 2002:a50:9b07:: with SMTP id o7mr35173040edi.104.1635713336518; Sun, 31 Oct 2021 13:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635713336; cv=none; d=google.com; s=arc-20160816; b=r8Q0G3DHm8CLYS88OAftrj+DyJDWE24JEK9RN+qLnvfTLvABtl9p8h0IQlls3RZjbE hxVM9fq4dlmgb6gQA+YEzRnGR3EZtLKuVZkJ4usxYvO9GqgwNgHchQGO4zy6GWI5clvD ThZKWl1bdmHSTuvw8RMeMutAjHOW1RyM1G5qbzwkMaLtxHm/9hQBAhhF+u/RrBwPfDBc TqgjI1MWQMiejnBSDO9FshQjtGiUeB4o3kAbrmUX6Gu0MxxNzBdn15i153vQnsskeT9a BDJAZI7k2ZigWC9a5yTqIExIkWnPpQJzdJwi3BMRTqTAhSdpVbE8BKKrb7xw5PonSLYr ANkA== 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=b0tZ34w3Ic/Z3fpfctU3wLrlrqGfXpeSj1s0iMzBRVU=; b=RanJoPmhSG7uT9GxzCM7xiOG/T+mlb6NldEfXjh2yddozUs0oazOLLA+B46v4gyh4P Wm4o8/SdH7I8bEBjpPH7hylluLgpZC5XGw8KBQErqXQnCRYtbcm7oPOdzOGKxi4HTfXP WBn3ePA9bU9tCyiUmeZLrtUpRPKZbIKmdg3JezCycOqpsQIvOItYFUTVh8sHWtyyIrTW 6ZWWglMf83bKLTsWWRwvezPgu03JY6EKnprsePEPZe2tL0FdU/r+aE/qEKGjkn+jdsey XFdVUi7jUmH7agyxFo7uThKNHkGBNNCnoAWwXiRWBkSMT0enNx+oLua5gB4q/hoA+Ujp 2Ziw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=i6BkDMLz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si21069659eje.21.2021.10.31.13.48.32; Sun, 31 Oct 2021 13:48:56 -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=@infradead.org header.s=desiato.20200630 header.b=i6BkDMLz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230185AbhJaUry (ORCPT + 99 others); Sun, 31 Oct 2021 16:47:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229946AbhJaUry (ORCPT ); Sun, 31 Oct 2021 16:47:54 -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 E6B5FC061714; Sun, 31 Oct 2021 13:45:21 -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=b0tZ34w3Ic/Z3fpfctU3wLrlrqGfXpeSj1s0iMzBRVU=; b=i6BkDMLzyKLvVbr1i4NEQhkLZ9 82XSy4Uu1ZTFMpMyViuLzQnbslUjAE+ckAW5MITXbBrdWMlIzTgty+2xvDlk/OXfI6W6f86lIMljF ++G7icrzNSeblisrIdgxsWtqLJvjFHPB9+ztuBZxIfljJW4aZV0q/hqvLoaaYSnMD4uI3IrMC2LXf ps3h6kkpNMSV4MkNPijnUCps+cjhxWe6R9CNYjmAcEzNSTx13wdJHMt90X4gWsqtAQi+5xA9baXTM MlcQ90iuCbP1tgI8wrLQ1AlEDtaZFRF8roAvtpW8gtFjfq2CSWs4J35ra6BB5+f6SrjQuCKMMFjPB u9uk3HZg==; 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 1mhHhC-00DRyA-Ee; Sun, 31 Oct 2021 20:44:51 +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 (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 1C936300243; Sun, 31 Oct 2021 21:44:48 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CCD8B2057F811; Sun, 31 Oct 2021 21:44:48 +0100 (CET) Date: Sun, 31 Oct 2021 21:44:48 +0100 From: Peter Zijlstra To: Ard Biesheuvel Cc: Sami Tolvanen , Mark Rutland , X86 ML , Kees Cook , Josh Poimboeuf , Nathan Chancellor , Nick Desaulniers , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, Linux Kernel Mailing List , llvm@lists.linux.dev Subject: Re: [PATCH] static_call,x86: Robustify trampoline patching Message-ID: References: <20211029200324.GR174703@worktop.programming.kicks-ass.net> <20211030074758.GT174703@worktop.programming.kicks-ass.net> <20211030180249.GU174703@worktop.programming.kicks-ass.net> <20211031163920.GV174703@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 31, 2021 at 09:21:56PM +0100, Ard Biesheuvel wrote: > That means we can support static calls on arm64 now without breaking > Clang CFI, and work on a solution for the redundant jumps on a more > relaxed schedule. Yes, arm64 has a 'problem' with having already merged the clang-cfi stuff :/ I'm hoping the x86 solution can be an alternative CFI scheme, I'm starting to really hate this one. And I'm not at all convinced the proposed scheme is the best possible scheme given the constraints of kernel code. AFAICT it's a compromise made in userspace.