Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1028603imm; Fri, 8 Jun 2018 08:54:23 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLCK9vY7kIiwPwEqZmBVFq1mPhRZLJfOxFlWMmE7ZFzSM2+ciOfLitzplM2oMKyAJ7fkgzo X-Received: by 2002:a17:902:206:: with SMTP id 6-v6mr7113135plc.294.1528473263089; Fri, 08 Jun 2018 08:54:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528473263; cv=none; d=google.com; s=arc-20160816; b=voISiGl06du7ORFuqffToZBQX0vsXz3GdOYOYm8IQOTZDXiuiNB0K3+p5uUQoMBdoT xy6OUxO+QnAeHL6hn8PlhD4XqD38x47fbFc21Z+vHYkwrJHWnhul+dLFQ6UX4gj85p2J PA28bJuLuAayqLE3ZbcvFmlRbo20QdJ83WIxmtY/BDBo3BtSYacIhJ2UGm5+jYXlSLfR Ui2yJre1aDlCdR+ClqfYPeHaIGdaLLoNixBIsqby0NLJHFc79IeOOf1PSS/QzTESqJev ZGf671wJgQQ7kK7T2d0gFRUqAxATP0rJx3/Er3RC9bNC635bkv3RQ4nqUVdN4w8WOHT4 G6Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=vvWSbYkDe2lVue95quDAA1y7dzReA+azzvIC43o54Io=; b=CTjkBFk6R9k1YaHbO2e8yzudGYlsaiaorC4N8DxhzDA//89u8IyFcQ8z3KgA9+pkch YU8TTyC30tXklDICYkM89uCwBwSqFZtJAdErQ+oWRiOHHp8ZNLaDS5Tr/RTiZoyKKHDi oBD0XIferXgqMQD1Wuvi9Y2POgp5wSFgZZdpuEjMnhunOw1IZTMgy0g3SiQYq0p6JeLH VtpIVAvn/qgPTLIYtgUVz0EYBMtlqRgkt2V8sbQ75wvlMzb8ezJDMLs/EjNsj6vWzdl2 5+8nifXARKQSo/pQhpKs1/PLOF1UYVRcYixwF+pHtyOSZ9GT0I40jCj212lx2V69FuBs cb+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=teNO+Ve4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3-v6si25600989pgr.44.2018.06.08.08.54.08; Fri, 08 Jun 2018 08:54:23 -0700 (PDT) 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=pass header.i=@gmail.com header.s=20161025 header.b=teNO+Ve4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752777AbeFHPwa (ORCPT + 99 others); Fri, 8 Jun 2018 11:52:30 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:46705 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719AbeFHPw2 (ORCPT ); Fri, 8 Jun 2018 11:52:28 -0400 Received: by mail-lf0-f68.google.com with SMTP id j13-v6so20776284lfb.13; Fri, 08 Jun 2018 08:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vvWSbYkDe2lVue95quDAA1y7dzReA+azzvIC43o54Io=; b=teNO+Ve4gHSMlRozuEuseRTDb6j8eL+iw/8Wh3vY2YF8JXbQB62V+qMQYJxo0//ptm bzpnGRf44GhG0nC3iNiaLMEElvgg/QZkUZg3ZZ2MTzjyyXFHKtJZsN5M0iLUGSWL5IM6 ll1179L5xCNrCdyvc041UVIOCE7BlShFFD+H7wjZ5Q8vYf0TqrBXSWCdyLFn84ElvGKe MXn2DXsVEwgAKU2M1HFBu9Kl6wbnnki3zm2BEBfB8UyouZh/ThrwifRtbqpjy5EA9AHG ZPD347SEZclP2BVNA89pDasG1vhCGVzsNm46D9RHc5uCFkUrEybt39X5sE69wwKLDCKX fqHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vvWSbYkDe2lVue95quDAA1y7dzReA+azzvIC43o54Io=; b=VnvHgYWClNYqe8LtYXoiU9t0Us3O38kIEdLoVLwqi0aXvA3cUa0DSRPPspQlUCCcgt eDxblQx3LhxlLQrSLSAycly2Cy78xDrXmduW8oJYppdcxc/JtzVcoM7R8JbqucS2+/40 jK7LPCHc8wAEyQplI4q/gO9Ixu+CKFTK+y152jCOOXDgi/7yAodziDZ5JMpd1Z6HHzLd oJnChPEL6VTPYZyiReg9MTuouiTqaRopRCSO8VeH1HmeZMGjJAD/RIKfxyQn5hzvAmdY 53IwHDwSeGVLikmpYq3bSpuecczYfcp/RCOYGGs5qo5WYOpV3zZrXuDLo/duuv+1fBeb YHFQ== X-Gm-Message-State: APt69E1fIZpH+ky1tSyeeHtQwJ1/Tr7JQexegaRD0L7mKciB7LaUVULB RpB9mcjknZ0Mi2w/7ENwEsg= X-Received: by 2002:a2e:8605:: with SMTP id a5-v6mr3002011lji.43.1528473146844; Fri, 08 Jun 2018 08:52:26 -0700 (PDT) Received: from uranus.localdomain ([5.18.103.226]) by smtp.gmail.com with ESMTPSA id o82-v6sm3037554lfi.50.2018.06.08.08.52.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jun 2018 08:52:25 -0700 (PDT) Received: by uranus.localdomain (Postfix, from userid 1000) id 544C2460756; Fri, 8 Jun 2018 18:52:25 +0300 (MSK) Date: Fri, 8 Jun 2018 18:52:25 +0300 From: Cyrill Gorcunov To: Andy Lutomirski Cc: "H. J. Lu" , Dmitry Safonov , Yu-cheng Yu , LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "Shanbhogue, Vedvyas" , "Ravi V. Shankar" , Dave Hansen , Jonathan Corbet , Oleg Nesterov , Arnd Bergmann , mike.kravetz@oracle.com Subject: Re: [PATCH 06/10] x86/cet: Add arch_prctl functions for shadow stack Message-ID: <20180608155225.GC2525@uranus> References: <20180607143807.3611-7-yu-cheng.yu@intel.com> <1528403417.5265.35.camel@2b52.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 08, 2018 at 07:57:22AM -0700, Andy Lutomirski wrote: > On Fri, Jun 8, 2018 at 5:24 AM H.J. Lu wrote: > > > > On Thu, Jun 7, 2018 at 9:38 PM, Andy Lutomirski wrote: > > > On Thu, Jun 7, 2018 at 9:10 PM H.J. Lu wrote: > > >> > > >> On Thu, Jun 7, 2018 at 4:01 PM, Andy Lutomirski wrote: > > >> > > > > > > By the time malicious code issue its own syscalls, you've already lost > > > the battle. I could probably be convinced that a lock-CET-on feature > > > that applies *only* to the calling thread and is not inherited by > > > clone() is a decent idea, but I'd want to see someone who understands > > > the state of the art in exploit design justify it. You're also going > > > to need to figure out how to make CRIU work if you allow locking CET > > > on. > > > > > > A priori, I think we should just not provide a lock mechanism. > > > > We need a door for CET. But it is a very bad idea to leave it open > > all the time. I don't know much about CRIU, If it is Checkpoint/Restore > > In Userspace. Can you free any application with AVX512 on AVX512 > > machine and restore it on non-AVX512 machine? > > Presumably not -- if the program uses AVX512 and AVX512 goes away, > then the program won't be happy. Yes. In most scenarios we require the fpu capability to be the same on both machines (in case of migration) or/and not being changed between c/r cycles. ... > As an aside, where are the latest CET docs? I've found the "CET > technology preview 2.0", but it doesn't seem to be very clear or > entirely complete. +1