From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2497FC433EF for ; Mon, 6 Sep 2021 10:30:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB56061050 for ; Mon, 6 Sep 2021 10:30:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DB56061050 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BKHZHwNMxQ2Cu5HCw4HFbsxDuEIsG4VZ3v+6cLtIKtA=; b=iwxVOh+ICJgAhnrzzMUdV2TtvC k78d4RHCR6jjFY6xkBOcevKcDLobFPjSqsRp4TvsLg9XXIaGD1SEqjl710DfEouNqIJdWOHxi+IO5 lYX8wtc03xeXUHv49LEA92Ybnn+NG6VccLzEQLWzEINiPelHTmEUqG3ndwh8XD2vqaB5uCITma8A2 fTq3MaevZfFproTqlLQOe1nB8ZHkbe2UoOXlOp80eMGBZEmurH/LO8/LoSOFH3sUI3SjxWJG5x/4X qgu1bibc6WJ3gBeku6sAW0deGEMY/W2HQEmuHA4kniysX5R8QiZq4fWE8kolijmufZdSQ4QXx4Wuh 2gK/720w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mNBrS-000WSX-T9; Mon, 06 Sep 2021 10:28:23 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mNBrO-000WRg-RY for linux-arm-kernel@lists.infradead.org; Mon, 06 Sep 2021 10:28:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630924097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=REmJl8s2nvMdTdbKRVVIcDfYVEbx2wjp9XTagCASYqs=; b=M0Tzz4taVNiDQ7O9U0tpdW1QbeRJ9elAmkEpqslUOUXBdmGj3whd/+ybivfoD9GN1i2m4T R5N7BcHNHfal9jq4A2i7oeL8XfzZ00iCopkW9hVuCjpWkVrzUftHACZQmahxOWuQhHKD1K F5TqTn1xqMSPQBbP3rrsS+tIOWbMg7s= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-219-7-hEgo0wOE-_oLKZ-boRJw-1; Mon, 06 Sep 2021 06:28:16 -0400 X-MC-Unique: 7-hEgo0wOE-_oLKZ-boRJw-1 Received: by mail-ed1-f70.google.com with SMTP id ch11-20020a0564021bcb00b003c8021b61c4so3329214edb.23 for ; Mon, 06 Sep 2021 03:28:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=REmJl8s2nvMdTdbKRVVIcDfYVEbx2wjp9XTagCASYqs=; b=aD3pylJFgZtoxlOTpfTpgZlac/Izqa/lHEDfKxM5Fix9KXbUSTw5n4znhrOn7jJHRM I7a4xeIYgN5B0+MpbJXoRdYngOci/DqTXVcxMJn1nnw3gqZuYtAGzsY0e4KuK2fmIcgz XqcnuKbBvOTK5lIxdjATVOvTF++NJox4ZYS7LG7gHKhvb3fJmlfJfqCKQqFOS2CUYE8x HhkF4RuHCGZsvVcRIQIBabvdmgjXG9EvITCO4Wgk5Z461JJg2M+rXeRgERe1K9TUuUSh FWxkgLle7LIpEvrsru3NZO430VQZwQ3U04SI6qZCvgMq2f2xL/ItzMPem5Q02CVaCqGy UinQ== X-Gm-Message-State: AOAM532NYIbuK4Y4VoRBkLdMKNK5bDF9cksY50w4k0u09CmQW0coxDds /YrMxLWK/dCA2EZT7cPdZTLH9mS8B5Jb1CCqz2ogJZ2u6CE7CvlE/T5g+p5vO0Rk94AjiCEMhqr RheO+FEM7rsrhHV/IWRVjfzVAOxMcPbDtJQY= X-Received: by 2002:a17:906:1d19:: with SMTP id n25mr13007249ejh.11.1630924095430; Mon, 06 Sep 2021 03:28:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7T8yPC7CUEnqP8Q5KGyfYQsTy7fdIFm0w0WX7OHu/0lN1pf6u81fhziGWQVchhgc+jbFRRA== X-Received: by 2002:a17:906:1d19:: with SMTP id n25mr13007231ejh.11.1630924095200; Mon, 06 Sep 2021 03:28:15 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id h7sm4431526edr.4.2021.09.06.03.28.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Sep 2021 03:28:14 -0700 (PDT) Subject: Re: [PATCH 1/5] KVM: rseq: Update rseq when processing NOTIFY_RESUME on xfer to KVM guest To: Mathieu Desnoyers , Sean Christopherson Cc: "Russell King, ARM Linux" , Catalin Marinas , Will Deacon , Guo Ren , Thomas Bogendoerfer , Michael Ellerman , Heiko Carstens , gor , Christian Borntraeger , Oleg Nesterov , rostedt , Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Andy Lutomirski , paulmck , Boqun Feng , shuah , Benjamin Herrenschmidt , Paul Mackerras , linux-arm-kernel , linux-kernel , linux-csky , linux-mips , linuxppc-dev , linux-s390 , KVM list , linux-kselftest , Peter Foley , Shakeel Butt , Ben Gardon References: <20210818001210.4073390-1-seanjc@google.com> <20210818001210.4073390-2-seanjc@google.com> <1673583543.19718.1629409152244.JavaMail.zimbra@efficios.com> <1872633041.20290.1629485463253.JavaMail.zimbra@efficios.com> From: Paolo Bonzini Message-ID: <425456d3-4772-2a1b-9cf3-a5b750b95c2e@redhat.com> Date: Mon, 6 Sep 2021 12:28:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <1872633041.20290.1629485463253.JavaMail.zimbra@efficios.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210906_032819_029127_7E71602D X-CRM114-Status: GOOD ( 16.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 20/08/21 20:51, Mathieu Desnoyers wrote: >> Ah, or is it the case that rseq_cs is non-NULL if and only if userspace is in an >> rseq critical section, and because syscalls in critical sections are illegal, by >> definition clearing rseq_cs is a nop unless userspace is misbehaving. > Not quite, as I described above. But we want it to stay set so the CONFIG_DEBUG_RSEQ > code executed when returning from ioctl to userspace will be able to validate that > it is not nested within a rseq critical section. > >> If that's true, what about explicitly checking that at NOTIFY_RESUME? Or is it >> not worth the extra code to detect an error that will likely be caught anyways? > The error will indeed already be caught on return from ioctl to userspace, so I > don't see any added value in duplicating this check. Sean, can you send a v2 (even for this patch only would be okay)? Thanks, Paolo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel