Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2971640pxa; Tue, 25 Aug 2020 08:10:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVH3q/SRz0QA48O48Q9Q22GEOmZPTHJuOGcHFXL048gvFxemaSC84iD6lER62KhxsxF8Qn X-Received: by 2002:a17:906:6b87:: with SMTP id l7mr10559323ejr.198.1598368217978; Tue, 25 Aug 2020 08:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598368217; cv=none; d=google.com; s=arc-20160816; b=09BY9hw/5glS+Mt+wIUtatU1lcO+bEiXrg+odVnD4mnWMpsK8/EETIplnVJ5xrhoVe gwF7qS6fx7wxYiyaXqAWxAFQArWWhUYvZzzSDubbU2gxjLCP1Ovx/xxdW6i2RyB4gTRq TZLSegSboir3fobhoMWq0xivWYrdapJiXnMtc2seD762ikee5r2yRRTQaWsRa7AS4wJR DJQdUzQBftdOXyWOUVVYzYXK+TpjoNV0kRcYGxImmHiwijPsuQRtpCxUWCQ/V+ApPyMk vKZ8xoevtPXSPCW5oIf2GcZHTMimIXhGcqBX4GvSC0/tC1WstI22TGDzvMnz8LHQZU5+ RQpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=hUI6lpxOXypQWjDGutvsdYtntEzx9fm90mKrz2i37F4=; b=YGe29asNkAdQmxTd1EEVD9ltQvaoKDy2GiSdHdRYIbl7OuKCUr+uWZMth8RmvwF8oj aeAyoo3D32N+UiBTOOUv3V7OGfPHGccjOTrV9j92caZg2AoNOT9PGl0Esap8ZIXleM4P 6uDLSTJWK83LDrOZIz/CWwEFvusC53GdeRTB1ZH+9LnLRXHsgNKcBqZWbrnkMBbTGrIC UYL80WYq6ItyvTT/dEegwV4LenCM15SwK+Ugxee8CuPzpxlASHL3K3/sdo6Nt48ed/+o CYNz9CcRM7sbkkgnxwOpxeisZhJWCVg5d463JIKoGoWD4NAKM8BQEyJR0liYlKZZjzLC w2qw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y27si3103519ejj.603.2020.08.25.08.09.55; Tue, 25 Aug 2020 08:10:17 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726706AbgHYPIw (ORCPT + 99 others); Tue, 25 Aug 2020 11:08:52 -0400 Received: from mga02.intel.com ([134.134.136.20]:37665 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726191AbgHYPIs (ORCPT ); Tue, 25 Aug 2020 11:08:48 -0400 IronPort-SDR: guzVyx3idWPZHQ5VBZqRCfFTGV/WD2RCbcdrkUFbBahs9vWSyxsXP2agiKOpdascBntNeOd7b6 zSFQNeTnnzEA== X-IronPort-AV: E=McAfee;i="6000,8403,9723"; a="143902232" X-IronPort-AV: E=Sophos;i="5.76,353,1592895600"; d="scan'208";a="143902232" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2020 08:08:47 -0700 IronPort-SDR: KSfTDtD6zIFJ3yrXC9mxYXKt6FSoJ4/pJ7BjhBsF4uQzI1x1YuiipAjh3Izwl0Vjlot+R7UVxg keo6AcrqrJ7g== X-IronPort-AV: E=Sophos;i="5.76,353,1592895600"; d="scan'208";a="322791026" Received: from yyu32-mobl1.amr.corp.intel.com (HELO [10.213.162.112]) ([10.213.162.112]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2020 08:08:46 -0700 Subject: Re: [PATCH v11 9/9] x86: Disallow vsyscall emulation when CET is enabled To: Florian Weimer , Andy Lutomirski Cc: X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , "open list:DOCUMENTATION" , Linux-MM , linux-arch , Linux API , Arnd Bergmann , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , "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 References: <20200825002645.3658-1-yu-cheng.yu@intel.com> <20200825002645.3658-10-yu-cheng.yu@intel.com> <87pn7f9jeq.fsf@oldenburg2.str.redhat.com> From: "Yu, Yu-cheng" Message-ID: <0e378792-7ac0-6c52-5607-e73de856d820@intel.com> Date: Tue, 25 Aug 2020 08:08:45 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <87pn7f9jeq.fsf@oldenburg2.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/25/2020 2:14 AM, Florian Weimer wrote: > * Andy Lutomirski: > >> 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. > > Yeah, we definitely would have to revert/avoid this downstream. People > definitely want to run glibc-2.12-era workloads on current kernels. > Thanks for catching it. > That makes sense. I will update the patch. Thanks, Yu-cheng