Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2290366pxp; Fri, 18 Mar 2022 07:31:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyglwII2XDyQ7CpXucT3gqJ98EtzLAaUUMmapkb3LLxLvZawBX9BpbjidwTUKGMMJizohRP X-Received: by 2002:a54:4719:0:b0:2ed:183b:27a7 with SMTP id k25-20020a544719000000b002ed183b27a7mr8207653oik.116.1647613869826; Fri, 18 Mar 2022 07:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647613869; cv=none; d=google.com; s=arc-20160816; b=w9klsVIIW3eZAlUGPDVxKL8J0M6a1HTT0GIj7Q5kMJ8kn7ozd4Bwq7aLCEC9Um4rx4 TLwV93177erXKk/nA2fnR2kwSPtIIQsV+QVgFR5KhKuui4Ww8DuqZcw+59bHvnVEy0ot GymMuCCV8dvjUcZLo83g+u60wOdZFEwldvkDiSZpwGuFutTnxWWOgiYzhKNRmrQsg9uc /bxdit6Lal2Mc0OpWKpTwZtXISg+Bekar+IpsgMGgDP4KIVNKLBPgnTR8ur4eJQhX9OJ yxFpmL7OslAx8I806+X2oO8DKDW7l1iRTGMHD5LqoPur2/X8CTT8VeMCcwi7j0YK1bCz A9uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=n4sggZm7p9DHCB8j1DhsXlfgy0Kx1nlnCjGo117hMd8=; b=I1dhFRuhHgN1SDpjtV9CMYtfFg27xlT9nBYg2pa2p+mjp7kK5O6eT5+tJgvGiYkrR4 2s5OUaUNwm6eqC88XSkz/YB/KmmRqqZHrOJv0KqhlsVS76110qYbonI1iqt6ZeopjaEc gQ8Y9+/z4pW0h/907q5MO8iXDQEj+eDSBTsgEzag9ARLrlCqLu/9AcGDBpUHwkYjaimH f7o+s9rg7AVFL6kETvaLkza2SeZS4i1y3re7rgUPwqwVS60qYTrBovJY0zOsZrtGm8a5 2qag65sOnoiFxjw3DSVZ0rj+uP8xz3MK3IojnJ3wG3/lKs1fK3BLudVqEpWBsBpizPwd a6/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=gJIrR7GS; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e3-20020aca1303000000b002ecbdc4aaa8si2934688oii.34.2022.03.18.07.30.56; Fri, 18 Mar 2022 07:31:09 -0700 (PDT) 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; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=gJIrR7GS; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235680AbiCRLNm (ORCPT + 99 others); Fri, 18 Mar 2022 07:13:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235663AbiCRLNi (ORCPT ); Fri, 18 Mar 2022 07:13:38 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B6171C390C for ; Fri, 18 Mar 2022 04:12:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=n4sggZm7p9DHCB8j1DhsXlfgy0Kx1nlnCjGo117hMd8=; b=gJIrR7GSInjIKr2YQpdNOQS4uW 890iA/I2AAQM4qOL03tOEJMb3I+Hg2RB+Zvzh1ZjdhtYR8gct24zzJ0TeHmOJ0nPw9X9fXzZTnWjT 2VtsT3S7FeUEq3yMWDOMkR5np1e6bXbbWFbNhRull7KduJIL7Q+Mrl7sZPX0riW7ZQz2fZQjKOpFK HX7jkHJassSxdLrfBUKDZJT3vw7y0LWbpESVOQZ8UnLr2G3XXKdoB0BqunIkGq3dk6DRI+SSjzfh/ fWJ1qKr2uhtUe+us1W+LUdwMuOOcXtQXvVK8VkTZPEfpRIwjWIy6zth58Qed1hSYWcz1yfI78XE7I WIq7i0ZQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nVAWb-002BxM-HA; Fri, 18 Mar 2022 11:12:05 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id D13F53001C7; Fri, 18 Mar 2022 12:12:04 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B31082D35E990; Fri, 18 Mar 2022 12:12:04 +0100 (CET) Date: Fri, 18 Mar 2022 12:12:04 +0100 From: Peter Zijlstra To: Lai Jiangshan Cc: LKML , X86 ML , Borislav Petkov , Lai Jiangshan , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" Subject: Re: [PATCH V3 3/7] x86/entry: Switch the stack after error_entry() returns Message-ID: References: <20220315073949.7541-1-jiangshanlai@gmail.com> <20220315073949.7541-4-jiangshanlai@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Thu, Mar 17, 2022 at 12:43:02AM +0800, Lai Jiangshan wrote: > On Wed, Mar 16, 2022 at 11:05 PM Peter Zijlstra wrote: > > > > > SYM_CODE_END(error_entry) > > > > So the new Changelog doesn't seem to help me much. But looking at both > > fixup_bad_iret() and sync_regs(), they both have: > > > > __this_cpu_read(cpu_tss_rw.x86_tss.sp0) - 1 > Yes, I can't read :/ Functions don't both use that. Your patch is correct, not switching the stack in between runs sync_regs from another stack, but the end result should be the same.