Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1792883pxb; Wed, 9 Feb 2022 04:44:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzWj0M5BZwBBrWZtIrkfP+9BYhqRG+86epnQQAQnD/RXLqO7mfBOrCFBiLnvCcNbC9778go X-Received: by 2002:a17:90a:a616:: with SMTP id c22mr2381351pjq.68.1644410696842; Wed, 09 Feb 2022 04:44:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644410696; cv=none; d=google.com; s=arc-20160816; b=yxyaDqKtBTToZCdi7c1n3+B5CG74AIVvcFkejwXVadbrVNrx9uBv7UMihyYsL9kgzc PJrkMIld2pS82ay55dzcg0RvPoqHUW6tnXhfC19Hn7kcq4aMSZ1Cp+R3QzaBs1liPQK7 F64WVXIGozoEGfSrpiTCoNziC21jlSConHbIlJPidHh/gUW+X/Paq4VYiGcKcnlCcf2A +ZrIGFPgLRbJANddipDRLjzQ0pMCuXp2QPxJPYmmwbxJfNtBX30Kloh0X0uduIwW0MyN M75yPuCw1m+7U8B0jOX/YX9AqXw36YzggbSDhdepWW21a59J4R0ZYE0IggPnvKZ2el09 D09A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qWz9q7D5W23mIWnyiOa6dx/TNUHhgX78pIzzQmVSN4E=; b=Js/vPW5sw/tKfWRDuf1JUDamswmBWdlQdzQU3/vx/nXJRMAIpWOMNx3kyyDXnrJJSS aKi4cDOQId8I1V+6or72+cgExtjDtSHK0wtN7vMM+C2xtjFUINKYDn2OQX/Kji0QBQq0 SCHXvZXYivXOswpYeFSCvI2espmoLnXj0XgR/qTAbRGWSSD6ohpW7BfZwPPvWbS9NiGD RX/ApM69gylQzk4TCT+HaWHYjXnWsv4KsgWllGt4wEi30q4tJ35axL2C9fCmVVYDx4Mw RSd2TmJ6GLXlIUxm7+G0wORXrBtGmfLKjzwMm/nYRpdsQdFQJBPnK5s7wQU8DcMbHF5i enMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=h7Y3VPrL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q144si15478837pgq.59.2022.02.09.04.44.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 04:44:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=h7Y3VPrL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 86243E12F68B; Wed, 9 Feb 2022 02:27:37 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234550AbiBIGpr (ORCPT + 99 others); Wed, 9 Feb 2022 01:45:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230011AbiBIGpn (ORCPT ); Wed, 9 Feb 2022 01:45:43 -0500 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF444C0401C7 for ; Tue, 8 Feb 2022 22:45:47 -0800 (PST) Received: by mail-wr1-x42a.google.com with SMTP id i15so2302232wrb.3 for ; Tue, 08 Feb 2022 22:45:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qWz9q7D5W23mIWnyiOa6dx/TNUHhgX78pIzzQmVSN4E=; b=h7Y3VPrLX/7F8A+Wd+mTD+J8MLqn3UErPb3rzT3syRfetXnJo1ITBYCt/JERTucrO0 AfeylxeUwoP8KuWEWhv3Ed2N4VLES8M3zS+33p5y+KF6pCWDNBkQB2Dm2vrr4BIFJjkf iNLUFZ1884XcFKlRDmMZ6MICCPa63f5LTlVpSkgwnutlBDoBl1/GITRsEjIwVsdllh8R XdxwMrhWSf6NvcO3XcAKjzSG9K51cwISRTj/wVvxqqtXb+woTCA26fsnzToQM1JGtwYO K4hJpayw50Ku2N4VT4MpJY/HWoBobX6+IEppR54ALJ9YgG0+L0UbA/pV4K3inE22kTqS Cfig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qWz9q7D5W23mIWnyiOa6dx/TNUHhgX78pIzzQmVSN4E=; b=hgcAzZdLLZpVeLNdxRabxIVWgtQwg4dZdvzT2JMYfKNZkFj2AoenIM3Juc9DRiO2G9 nQVrty9eQLgbtGK9pfqKz3U80+NZzj6Z6mgS/PaDPUBnFbVR1p4lordUllJ+lZ7cgQ/9 gwVgx9FrIdnz8U+7Np3hUdO/ixGNF3j4bNZeziFoyyRHUfyyKRi15T/RCzmrvN/gAtUF Eu4LE5/6c9HqtWlf49M0mr9wkHhz8DpH3kPhmlPuvK3IKX8gv1xvU4oua+MQ6rHdjfwF IFGD79ej0cvCoSzXPcKNsFTABcKMsG2HZpG6AgzHphld274ZRSo0qaN1mtKIOxz9s2Oq XHkQ== X-Gm-Message-State: AOAM530EzG8PRhjcbVtTf3W21mUVW1DhtSDEz7DmXScpnRL8FaJHf5v3 HwXx/pNRzNMUL0QNDrlGevnIyKmfglc= X-Received: by 2002:a2e:b042:: with SMTP id d2mr592734ljl.147.1644388674797; Tue, 08 Feb 2022 22:37:54 -0800 (PST) Received: from grain.localdomain ([5.18.251.97]) by smtp.gmail.com with ESMTPSA id q5sm160739lfb.70.2022.02.08.22.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 22:37:53 -0800 (PST) Received: by grain.localdomain (Postfix, from userid 1000) id EE1FD5A0020; Wed, 9 Feb 2022 09:37:52 +0300 (MSK) Date: Wed, 9 Feb 2022 09:37:52 +0300 From: Cyrill Gorcunov To: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Mike Rapoport , Dave Hansen , Adrian Reber , the arch/x86 maintainers , Thomas Gleixner , Ingo Molnar , Linux Kernel Mailing List , Oleg Nesterov , "Kirill A. Shutemov" , Andrei Vagin , Andy Lutomirski Subject: Re: [PATCH 00/35] Shadow stacks for userspace Message-ID: References: <20220130211838.8382-1-rick.p.edgecombe@intel.com> <8f96c2a6-9c03-f97a-df52-73ffc1d87957@intel.com> <357664de-b089-4617-99d1-de5098953c80@www.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.7 (2021-05-04) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 08, 2022 at 09:54:14PM +0000, Dmitry Safonov wrote: > [un-Cc'ed a lot of people, as the question is highly off-topic, so I > don't feel like the answer is of big interest to them, keeping x86 > maintainer in] > > On 2/8/22 17:02, Cyrill Gorcunov wrote: > >>> Probably a kind of latch in the task_struct which would trigger off once > >>> returt to a different address happened, thus we would be able to jump inside > >>> paratite code. Of course such trigger should be available under proper > >>> capability only. > >> > >> I'm not fully in touch with how parasite, etc works. Are we talking about save or restore? > > > > We use parasite code in question during checkpoint phase as far as I remember. > > push addr/lret trick is used to run "injected" code (code injection itself is > > done via ptrace) in compat mode at least. Dima, Andrei, I didn't look into this code > > for years already, do we still need to support compat mode at all? > > Cyrill, I haven't been working on/with Virtuozzo people last 5 years, so > I don't know. As you're more connected to Vz, your question seems to > imply that ia32 C/R is no longer needed by Vz customers. If it's not > needed anymore - I'm all for stopping testing of it in CRIU. Nope. I didn't see any sign that Vz is intended to drop ia32 suport. But Vz's criu instance is following vanilla's one, that is why I asked you and Andrew about ia32 support. This ia32 code snippet with stack manipulation simply popped out in my mind immediately when Andy asked how we deal with stack. Also we adjust stack in restorer code but I need some time to recall all thses details since as I said I didn't work with criu code for years already. Cyrill