Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4154449imm; Mon, 18 Jun 2018 10:01:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLSIS9EtoBNPuG52F4+EL0rRb2LKLEuooEd0CexmSFgyIeGGQnk9OpM9yI6ik+/naKiKCn5 X-Received: by 2002:a63:61d6:: with SMTP id v205-v6mr11742048pgb.432.1529341260307; Mon, 18 Jun 2018 10:01:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529341260; cv=none; d=google.com; s=arc-20160816; b=kjJ+Pp8Ct1j2xvQXVKcgYam1ZInRgrR/JCWalgiQDricMtDL24YIQpL7TksoqL0p7C AG72XqF4kSfnU8veD2RdDPcfObGjToa6YLnrgsBZojLJ5M/jt23cz9i86UYQRwdcOSad n6m2RvnxnVOBBWvZAbAA4hmnNegZbyoklEKuDkQtnwSYLpMgP/Wb9WF83P3bW1CjDK3C FqnbbMipghi+DVfAVu2iRIiUC84vuauuMckeBRO/oqaBm0ec5dyRk0py80gOHvXq3FeC rBUY0MpZ7eFO/1rGBaxNbTgG7Q0bIk5+baeLA6BOS55Q2TRgqa88S1sE6BNPHRkwv3l2 rvPg== 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=M9HbRtWXQxEsxsMnMVZ+wxyQAd1PpEhRhjBU9Mulc3Y=; b=VO4MU76fc97MVCf7GBih+S66ID0KMjtJUVlRnxrxKL64xY8G5c87nm0c2DldxJJRqd TIJ2o0ES96srZBfgq+abUIRRLdwc4IOeukDU0ohheA6V4k4tLB0SX0cPv2J9bf/0Ktdc U8+zllPtPyhr8az4208HOeAucS9KA2dtCWJY1AFDGRWmI5dE2ispwhbjJalWKOVOT8I8 /ASV7zIUet7q/ixj+LK/Urwm8zi2ueychztwyLEklH+OgOwixU333HxYHKRisREakXGF 55yMEMLy97mPyroUwnrizyNxE81A7P1aWYaTQXH+qO5RfRsiKOoYXwBa1QBhP1rNrqNE yyKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@firstfloor.org header.s=mail header.b=dMv4CDyW; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si11495283plb.331.2018.06.18.10.00.45; Mon, 18 Jun 2018 10:01:00 -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=@firstfloor.org header.s=mail header.b=dMv4CDyW; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934807AbeFRQ6o (ORCPT + 99 others); Mon, 18 Jun 2018 12:58:44 -0400 Received: from one.firstfloor.org ([193.170.194.197]:52028 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932870AbeFRQ6n (ORCPT ); Mon, 18 Jun 2018 12:58:43 -0400 Received: by one.firstfloor.org (Postfix, from userid 503) id 0E9AF86A14; Mon, 18 Jun 2018 18:58:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=firstfloor.org; s=mail; t=1529341121; bh=dSKRAFAqpvfIBE+Sz5sw6CwGtWpMwKnIao7qYcg2NkQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dMv4CDyWLdfXPizwi7yk42bM72Q+wlwD6ies+Qnxn2CQHbnDcYjYMQiDDZMtHI7Q2 yG4OI523VosdT1F2R0hibQZ8hK4EcEjq3b2YEum/zZnE9kGm3zE1dlXb59cNTZDm5F 3oW+40NryFiIaG6HiKj/SuHmueGCizck9KLoGiuE= Date: Mon, 18 Jun 2018 09:58:40 -0700 From: Andi Kleen To: Keno Fischer Cc: Andi Kleen , Linux Kernel Mailing List , Thomas Gleixner , Ingo Molnar , x86@kernel.org, "H. Peter Anvin" , Borislav Petkov , Dave Hansen , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Kyle Huey , Robert O'Callahan Subject: Re: [RFC PATCH] x86/arch_prctl: Add ARCH_SET_XCR0 to mask XCR0 per-thread Message-ID: <20180618165840.gikljqhaxtiiw27x@two.firstfloor.org> References: <1529195582-64207-1-git-send-email-keno@alumni.harvard.edu> <20180617163530.rvwf7fcukmoletgo@two.firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Unfortunately, that is insufficient. Almost difference in CPU behavior > between the replayer > and the replayee. In particular, the problems for rr here are > 1) xgetbv, which can introduce differing register contents (and if > code branches on this, > potentially differences in control flow). So you're saying that software checks XGETBV first before checking CPUID? That seems broken. Without AVX XGETBV may not exist. You always have to check CPUID first. And then it should just branch around the XGETBV. So we're talking about a workaround for broken software. The question is how wide spread is it? > 2) xsave writing more memory than the trace expects, causing > divergence in the memory > contents of the process. Do memory contents which are never read by the application matter? -Andi