Received: by 10.223.176.46 with SMTP id f43csp3258111wra; Mon, 22 Jan 2018 10:57:36 -0800 (PST) X-Google-Smtp-Source: AH8x225jEHEcH7gpbvaJB3zFRF/wJREHwsZUSkn2PPaFpvYmmKfcok5V71hkTk3ilR/EmHKZoXBG X-Received: by 10.36.0.209 with SMTP id 200mr9034125ita.4.1516647456238; Mon, 22 Jan 2018 10:57:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516647456; cv=none; d=google.com; s=arc-20160816; b=XDqi8OYcT1ve5yKl0YNEd+2yHbASXQTNEDeRJwE1jY7uLFzcRYACQRz229+lH8Kg83 7wRdzU+/38g14pSYnZG3RpWAu+DkHdSIS2ycaPvtaFq91licdb0iyhYfJhGThUoXFPdZ jpT7OvTW3qVJeexe2KcmqFZiiYy6Sv8CHlamozpMkRSDcVKSd0U6EREVYI5fXLFY8uog Khi8b7s7EdJToM+xjhPevTx0g3WwsP/Wfv/N+LTh6r7jOL1dHrw9ZDfJ/CqZKlLwCCNv qU1gW/wDwoOfgs+lMQu5fUXj9SyEkjAi4y5um05Wmf5OD5AvLtmrHmU0Kln//lmCd7qu 0XBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=93p++0+w0bokA6XJav3oVRdBa4WQVw5Mw+KgMfpu6Lg=; b=Dv+N3ZzZH+X/EAuUY+4Y6uvUk8RDsv3PuEc6XLTH+XLJxOmVSxLsGsiZMcJRLeSHTF HnFihOUxGBj0k5zog6N7jnq1uMNBo/PYVPD7UhQYQt3979jMbEwLKeu80+ppRY7SokSe BJZX8JI3wdLCtXUWRIydOMOFBmRRFMzD/ntvaKPOPUSXjlMaM8zrjB/p9W7YSkvlGfwB lTGAOZMdsMrw+9+gTAmLqKx15Hm6tqf6JgwF54n+WZp/3fZ3+uMCAL5AgUZ24DDYg1r/ +1/iZs9P+P/8XJzhP6idZMZa5zMTiefS4pgNtEC07/eL/apPFFWYOYYaHkwa8f/OdRZE 9LcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ay8k3C+p; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c187si6763171ith.149.2018.01.22.10.57.23; Mon, 22 Jan 2018 10:57:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ay8k3C+p; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751663AbeAVSzg (ORCPT + 99 others); Mon, 22 Jan 2018 13:55:36 -0500 Received: from mail-it0-f44.google.com ([209.85.214.44]:44917 "EHLO mail-it0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751116AbeAVSzd (ORCPT ); Mon, 22 Jan 2018 13:55:33 -0500 Received: by mail-it0-f44.google.com with SMTP id b5so11048881itc.3 for ; Mon, 22 Jan 2018 10:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=93p++0+w0bokA6XJav3oVRdBa4WQVw5Mw+KgMfpu6Lg=; b=ay8k3C+prpHP0RG/V4ePbq20CbSjkQ/W+dAEpadh403c0a3gbWY8f0+sJ/o9YEdHbv 6dtAYoekaxTFzszPEpcRZAO+zbTDVTKr0aUSlQbw1VdhFr3aOXGjYsc8RH2XE03drk8d p168IFfYGkae3KA8AjFNWZ3xFCH+yK2K1PypdxrP+RR5vqJRx7P6HY63EHeGL8H+ZBmf z+dz49aXHA+2Iydk//dz1pjJ52UVexIyqroG89JKohkjZuOCL2U2LlHL15IPHmFucGxR b5yw414HXYBMZB+Z1XqseSKeDnqvnp8vr8v7vf8zQFB3i5yxkzZvg+2+wVQ64vmYJ2KN zMtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=93p++0+w0bokA6XJav3oVRdBa4WQVw5Mw+KgMfpu6Lg=; b=Pbf6Oe8jagCyXPjOPOlonXIqB37F26t73PrTIfZtMt5hzT1p7j+wofoXikpve1sCBi zY8qMruKJgUN08euyAijSHqn7zwuKFzjX37O8x/DyXQ8V3pZi1B0L1JMioukftyA+yAG ZhL0ILXIazwayqFq69o/yc1Nxlb1+CKlL1sfhM3SyaIAvz/l2NEjdaUFZGAEEAB4OdGf hC/5iLbHpkLZ+pbQR7JK9AM6jw7/h/NsjCPkbVp/loBdW6KQZapj28cAQeolSMkEeYDj SgBMUf1LiClLZLwXa+xaxiKTSbXHryeK9nbGXbZTBgfHOOdhTroXTbOEPgsljJmnfIKn XjsQ== X-Gm-Message-State: AKwxytcTp23uO64BUiHfGe6F1b990ej6AzMt+XJDVxpz7ta/O4+abYzQ BsQr6GqfsT91FCWxbPL3wYrS8e1WD5kTEFO/Q6o= X-Received: by 10.36.248.134 with SMTP id a128mr9346543ith.152.1516647332948; Mon, 22 Jan 2018 10:55:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.59.196 with HTTP; Mon, 22 Jan 2018 10:55:32 -0800 (PST) In-Reply-To: <503224b776b9513885453756e44bab235221124e.1516644136.git.luto@kernel.org> References: <503224b776b9513885453756e44bab235221124e.1516644136.git.luto@kernel.org> From: Linus Torvalds Date: Mon, 22 Jan 2018 10:55:32 -0800 X-Google-Sender-Auth: dNW3PAYdAvdM9Eg1h13w2tshZBE Message-ID: Subject: Re: [PATCH] x86/retpoline/entry: Disable the entire SYSCALL64 fast path with retpolines on To: Andy Lutomirski Cc: "the arch/x86 maintainers" , LKML , Greg Kroah-Hartman , Alan Cox , Jann Horn , Samuel Neves , Dan Williams , Kernel Hardening , Borislav Petkov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 22, 2018 at 10:04 AM, Andy Lutomirski wrote: > The existing retpoline code carefully and awkwardly retpolinifies > the SYSCALL64 slow path. This stops the fast path from being > particularly fast, and it's IMO rather messy. I'm not convinced your patch isn't messier still.. It's certainly subtle. I had to look at that ptregs stub generator thing twice. Honestly, I'd rather get rid of the fast-path entirely. Compared to all the PTI mess, it's not even noticeable. And if we ever get CPU's that have this all fixed, we can re-visit introducing the fastpath. But this is all very messy and it doesn't seem worth it right now. If we get rid of the fastpath, we can lay out the slow path slightly better, and get rid of some of those jump-overs. And we'd get rid of the ptregs hooks entirely. So we can try to make the "slow" path better while at it, but I really don't think it matters much now in the post-PTI era. Sadly. Linus