Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp1294961ybs; Mon, 25 May 2020 12:05:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg3Ss3vbCkR/5YSuVcH9EyYT27QWy/G+jBsC7Xm1fb/t49onpqwn3RePKBP4FpvptQ2ToW X-Received: by 2002:a17:906:51b:: with SMTP id j27mr19001443eja.246.1590433545549; Mon, 25 May 2020 12:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590433545; cv=none; d=google.com; s=arc-20160816; b=TPcnTvtUDiplQjuJQLFt/+ncI+CfKuTImD6NsnYqoZQbrV/NSQmNBV1izv2NPcfIKo 0K5npXTmq7k1GstpAjuJrKLACyxmpKsGjh9TMiy6uPsNa1kqXyrX8CfxeD1k1hDbSqEP WB3dvWgwYXt0KrSNhh9U7i5V3GBhTfb5XtaZ0ULhmz/+VRlVrEuRwkG4P3SdhY0JtlOP dANhshDdpZ3hE1f6cJr2uLHmT/50NJiJs8fxFirncvctGuAKacD2xtYiImdQDFb4OYhG 2BbFVgHhiPk8radcjMau7cnaDa9zr7zFO9u+1agWviztS9wJxzZFVAr+x1IZ4ApoL81k UoFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=sIUI+YPLgD2hagR/iJQt63IkQVxKJY9bIci/+8x+1dk=; b=qVmwulf5iO8LjaiSnU6JmDJOfr6yW0wiKDYlX6UpVLcD9dB+9Hq2X7YLxHbC9iWRki yaUtpC1+s7sb90cfZXFl58834oJqWGFm5/Ow0X77p+fOaGoiQV3EHdleeOlbPSN7+Zk6 h6xuooBYS8n4gMwC/aB8qIg5mepa5oaU8U1631addc3wR6/ebosQOoQ6iBkroGhtzvKp B4gcnUx/MYpjcFuhEdzoC8CRe3ML887zV3GWE4OGksUM05Ho4C5gXBAz5lSlnyqVA5Lc BFi/qK3YAagS9nnwPx7mOkmXxp13HaarJmZRJl7Gp8Tzd50bAr3qWmGzO3Gkeo2CBNUC 1jlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Vj94z+hZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ox11si9389116ejb.61.2020.05.25.12.05.21; Mon, 25 May 2020 12:05:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Vj94z+hZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389874AbgEYKkp (ORCPT + 99 others); Mon, 25 May 2020 06:40:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389720AbgEYKkp (ORCPT ); Mon, 25 May 2020 06:40:45 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59340C061A0E for ; Mon, 25 May 2020 03:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; 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=sIUI+YPLgD2hagR/iJQt63IkQVxKJY9bIci/+8x+1dk=; b=Vj94z+hZdyKBPeRdZwlWWDAU6x N2qUL8WOfOY0c4eGSqrpuaktGUf95PbOJF6lWgO/Y02ZYBQ7o7KmHgDF+Cjy1xgqaE2Jbxs13B1M0 MOD/vuyB+EupihuS7Y2H6EjEUJrWlF0UyPDkJj+sKNVqyxtKVhyaeu6a8I0/YYfLI9ikA7IpYUFjL kOC3+wmAo9kLVUIGcf+t8CcTBHm29FfL17gRg5UBW+D/9VQgMks7p8su9cEyP1R/PM/J3IyXnBvXU WjPLgl3XkMBjUaOwyOVRC5JMxfa3kMO16TKUzY/PlIsw98dGRlksNcBOdkdK3ldm4QDfY5hIwtpU4 XY1YLb8A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jdAXB-0002T9-0c; Mon, 25 May 2020 10:40:41 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 0E5D730018B; Mon, 25 May 2020 12:40:39 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id EE510286BFC17; Mon, 25 May 2020 12:40:38 +0200 (CEST) Date: Mon, 25 May 2020 12:40:38 +0200 From: Peter Zijlstra To: Rasmus Villemoes Cc: Andy Lutomirski , Thomas Gleixner , LKML , X86 ML Subject: Re: [RFC][PATCH 0/4] x86/entry: disallow #DB more Message-ID: <20200525104038.GC317569@hirez.programming.kicks-ass.net> References: <20200522204738.645043059@infradead.org> <20200523125940.GA2483@worktop.programming.kicks-ass.net> <20200523213235.GB4496@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 25, 2020 at 12:02:48PM +0200, Rasmus Villemoes wrote: > Naive question: did you check disassembly to see whether gcc threw your > native_get_debugreg() away, given that the asm isn't volatile and the > result is not used for anything? Testing here only shows a "mov > %r9,%db7", but the read did seem to get thrown away. Argh.. no I did not. Writing it all in asm gets me: [ 1.627405] XXX: 3900 8304 22632 which is a lot worse...