Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2669383pxp; Mon, 7 Mar 2022 22:17:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJytijri+2qN61yAWI3Ls/fT32Z5WUrAERBp27CMKtfRwv7/FidrOvNE0iooFxQAZIWJs0jB X-Received: by 2002:a63:f40e:0:b0:380:6a04:4335 with SMTP id g14-20020a63f40e000000b003806a044335mr4724518pgi.523.1646720231803; Mon, 07 Mar 2022 22:17:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646720231; cv=none; d=google.com; s=arc-20160816; b=niRwRxcfDDdC0czQjCedhV8rWmzWW17WB9Yzs248ZGGT8ZwvorCP5gBo0JM1qx/3oh gUx4H66A8RyydHCWEWw/49c8Ve+qWYC9wHGyt/oQHS0mffPydhMz++JopwkI3TimYrNA 1MBcQlT06JwlMJfojUWsMQ2XHshLZrVa2rFPdmA4LbEPLfCU3elGA+UtjuLANO0MFGqP UfylKchApb4osnZfdWBNkzQweGYS5zazm+bqiDFi74elQS0YdbZE2ivIlO4xJ2W9Qx1p +s35ANoFp29Nq0c3yDkJiBF5pfK4/2wNzq2KJe5ERG4kz4ksbW+C3Zq5qHuevEkPpbok +xrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=im5+bsd9s5skhnSYiAe5pbNY0a8NT5CwXBovwXV7lNU=; b=UB7kU7RpAEOk0SuLewQx+Vyd+oO4aFobYaMDiabdwkeAfzFTHj1mho8Do6THx2Ga7k hepJq2DlG/4DuwfW1XslIuAYM1G1DUROqIZ4eFnPqEJ+OxUSEDmLyzJHpI1HAmfvF2G+ WPmB+QoRGaNCfFd15Dptp+UPX8sF4fQCzH87778mGK6CvPDKHAnS5E1HPGACYu5IsCz9 j9ez20J4G1VOfvBsNSMXXxPJvHb2+2dtvq68fCsv8iIeKFPwM2CgENId5QfpODUv/3Mu VV5xB3Qw+hbyToJEU0S8QcFaqWnFTAEYZ96YLN38E9Ysen/CXUWAT8wq11HT3d55D7VT qdOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t69-20020a638148000000b0037c996f5056si11785063pgd.735.2022.03.07.22.16.33; Mon, 07 Mar 2022 22:17:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233934AbiCGWW4 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 7 Mar 2022 17:22:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245596AbiCGWWv (ORCPT ); Mon, 7 Mar 2022 17:22:51 -0500 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 039D58CDBE for ; Mon, 7 Mar 2022 14:21:55 -0800 (PST) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-165-8y9FGRZFPriMZfq4Jpk07A-1; Mon, 07 Mar 2022 22:21:53 +0000 X-MC-Unique: 8y9FGRZFPriMZfq4Jpk07A-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Mon, 7 Mar 2022 22:21:49 +0000 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.028; Mon, 7 Mar 2022 22:21:49 +0000 From: David Laight To: 'Mike Rapoport' , Andy Lutomirski CC: "Edgecombe, Rick P" , "bsingharora@gmail.com" , "hpa@zytor.com" , "Syromiatnikov, Eugene" , "peterz@infradead.org" , "rdunlap@infradead.org" , "keescook@chromium.org" , "0x7f454c46@gmail.com" <0x7f454c46@gmail.com>, "Eranian, Stephane" , "kirill.shutemov@linux.intel.com" , "dave.hansen@linux.intel.com" , "linux-mm@kvack.org" , "adrian@lisas.de" , "fweimer@redhat.com" , "nadav.amit@gmail.com" , "jannh@google.com" , "avagin@gmail.com" , "kcc@google.com" , "linux-arch@vger.kernel.org" , "pavel@ucw.cz" , "oleg@redhat.com" , "hjl.tools@gmail.com" , "bp@alien8.de" , "linux-doc@vger.kernel.org" , "arnd@arndb.de" , "Moreira, Joao" , "tglx@linutronix.de" , "mike.kravetz@oracle.com" , "x86@kernel.org" , "Yang, Weijiang" , "dave.martin@arm.com" , "john.allen@amd.com" , "mingo@redhat.com" , "Hansen, Dave" , "corbet@lwn.net" , "linux-kernel@vger.kernel.org" , "gorcunov@gmail.com" , "Shankar, Ravi V" , "linux-api@vger.kernel.org" Subject: RE: [PATCH 00/35] Shadow stacks for userspace Thread-Topic: [PATCH 00/35] Shadow stacks for userspace Thread-Index: AQHYMlUnLgOMkkzJIkGC5fp7CqAYeKy0fYyg Date: Mon, 7 Mar 2022 22:21:49 +0000 Message-ID: <776fb081217145f4a488f7bca3e16eab@AcuMS.aculab.com> References: <8e36f20723ca175db49ed3cc73e42e8aa28d2615.camel@intel.com> <9d664c91-2116-42cc-ef8d-e6d236de43d0@kernel.org> <5a792e77-0072-4ded-9f89-e7fcc7f7a1d6@www.fastmail.com> <05df964f-552e-402e-981c-a8bea11c555c@www.fastmail.com> <40a3500c-835a-60b0-15bf-40c6622ad013@kernel.org> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Mike Rapoport > Sent: 07 March 2022 18:57 ... > > The sigframe thing, OTOH, seems genuinely useful if CRIU would actually use > > it to save the full register state. Generating a signal frame from scratch > > is a pain. That being said, if CRIU isn't excited, then don't bother. > > CRIU is excited :) > > I just was looking for the minimal possible interface that will allow us to > call sigreturn. Rick is right and CRIU does try to expose as little as > possible and handle the pain in the userspace. > > The SIGFRAME approach is indeed very helpful, especially if we can make it > work on other architectures eventually. I thought the full sigframe layout depends very much on what the kernel decides it needs to save? Some parts are exposed to the signal handler, but there are large blocks of data that XSAVE (etc) save that have to be put onto the signal stack. Is it even vaguely feasible to replicate what a specific kernel generates on specific hardware in a userspace library? The size of this data is getting bigger and bigger - causing issues with the SIGALTSTACK (and even thread stack) minimum sizes. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)