Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2531670pxa; Mon, 24 Aug 2020 17:34:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywmLqPiK2/uVnritimLFKvxDMyLhjlM6cTNHDwxj7cEGbWATsvA9Th0IEAwzCLnppeax8L X-Received: by 2002:aa7:d5d5:: with SMTP id d21mr8065946eds.229.1598315682207; Mon, 24 Aug 2020 17:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598315682; cv=none; d=google.com; s=arc-20160816; b=RaGdRn9iB5/WA6QSVr2zImBvtK2KgIvrW/4G9Y2u5d7lErP7pR5P9WHUP55smj/wfP tkNq8I0WqN/E3+Ca9xt0/ah53IKy8H9O42+maNr+nLzfQW8BoExTZF2FBqHWE3Z20r4n APkppZk14Q2njfWOoiDDH/lfaujXS450SQcJQxFCv40gogjrDulPloSlzUSphkPm5LWr at4bT6qmtIeXYS19gG7DhlmwE7LcpgN0yYOZVPNEV5uv2DaK1bHQOyh5ExEf4z7812dM 8DfupPKN+gveYMbFPVq3yKq7e92AX+iiMP9pQB1N6elcLWqED24LJoJmsUIBGuQI9DkD QhkQ== 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 :in-reply-to:references:mime-version:dkim-signature; bh=LmeTMjwxx7Y+NJP7WB0TfJ6pLsPBZ/UtuY70XT5vNWk=; b=uYaSTxBnhYK7T1AEQL/9k29Dt0MHIR3fd3KndFAhWImz9EUkGaxksjJinMPWSB4h4m H2JdqRqWNArg1XzHhoh6oaRQZ5ctNAsUMkrkwwyRITEoKiO5Uyby1RqU1bX70CkGBfPR qpFNstF23sf+R+J0zPtDI6hkj4k4bphP4EMQWBFNMosCFxov4x1zF7Y0J3J0P98rZ9O2 pNomqvA49tTlkRMrqDvT2fNtjCDP+zYIY36shId76X8TdmgOJTepP6tcs1eCB8dY/ZcS Jj6duNAxY53JeJrfAxHpwKiwbfOZ2DZRYf379BACPtiLlJov59vssLjSphKWcdfhfARN xQ2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="uRWu1h/p"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d5si8032548ejt.102.2020.08.24.17.34.19; Mon, 24 Aug 2020 17:34:42 -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=@kernel.org header.s=default header.b="uRWu1h/p"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728437AbgHYAcw (ORCPT + 99 others); Mon, 24 Aug 2020 20:32:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:41582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728439AbgHYAct (ORCPT ); Mon, 24 Aug 2020 20:32:49 -0400 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0684D22BEB for ; Tue, 25 Aug 2020 00:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598315569; bh=HzNRSUeUL6OriNoi411G8DjwqUuqi7JFl1V+hmvfPWg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uRWu1h/pRTe38+cnhWVoUjMTGyUxj4FX6LHXPmQOHohc0UiMAuVFXRFfGvQuUXiFU x0m9GY1EjwLb2Vn/RymkjG2w7e8cfbzAb7e02+yOOlT1W3LXR000Pr7kw4RnV+6ZXj WrQB1im2A7usG0ceNRnrso4/XUttJEJC2aZHtYTM= Received: by mail-wm1-f42.google.com with SMTP id t14so588261wmi.3 for ; Mon, 24 Aug 2020 17:32:48 -0700 (PDT) X-Gm-Message-State: AOAM5326/J6Ldwqtoh3Z7okUS0CYSEJ56a90LPTh0BhAMNjdEbwuUMUW 4xMbjZeKAY57Npzt8LWcN9s1QIV6JmuFdokcSzqkPg== X-Received: by 2002:a7b:ca48:: with SMTP id m8mr1581098wml.36.1598315567552; Mon, 24 Aug 2020 17:32:47 -0700 (PDT) MIME-Version: 1.0 References: <20200825002645.3658-1-yu-cheng.yu@intel.com> <20200825002645.3658-10-yu-cheng.yu@intel.com> In-Reply-To: <20200825002645.3658-10-yu-cheng.yu@intel.com> From: Andy Lutomirski Date: Mon, 24 Aug 2020 17:32:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v11 9/9] x86: Disallow vsyscall emulation when CET is enabled To: Yu-cheng Yu Cc: X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , "open list:DOCUMENTATION" , Linux-MM , linux-arch , Linux API , Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , Weijiang Yang 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, Aug 24, 2020 at 5:30 PM Yu-cheng Yu wrote: > > From: "H.J. Lu" > > Emulation of the legacy vsyscall page is required by some programs built > before 2013. Newer programs after 2013 don't use it. Disallow vsyscall > emulation when Control-flow Enforcement (CET) is enabled to enhance > security. NAK. By all means disable execute emulation if CET-IBT is enabled at the time emulation is attempted, and maybe even disable the vsyscall page entirely if you can magically tell that CET-IBT will be enabled when a process starts, but you don't get to just disable it outright on a CET-enabled kernel.