Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp487872yba; Wed, 3 Apr 2019 12:44:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzN28f7OlCKDnancex+nOrRph1mjX1XY+4PezcbV/eYqZmpTY/aiCtRVkh+NFAusVlIOHun X-Received: by 2002:a17:902:70cc:: with SMTP id l12mr1912446plt.10.1554320675307; Wed, 03 Apr 2019 12:44:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554320675; cv=none; d=google.com; s=arc-20160816; b=XStFTiSF90mDX/iRn2NQ6ra7aMvHYk3gb2lXDS8A/RcGOvfr4TD/VU8tQVZRbfwOsb xJm6/sVTSyvE3UDA0kT6xuPYW2O/QQ3wTVEmu2hwVpNjGD9EIpjAHns+tZP9q3C3cZ4d RuTnMSi8bkwFWILv56b4YFH9L0AUfbKMDLFVp3Pg2MNPz0J6HMyz3g131KIt50ITEV4s GXPucg/3RboyHtiAnNmqwSLeN8yKjkoEDXJzhIcRMcj/Zklv6hnxap4zT/SEGUccu9C7 bdfibRMYrTcBYL91cqJkocGjJzWPUi+sLWvBj4fdqJUNbmxddgRiDo1PLlze4R1j4pA2 e5+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date; bh=zp2xkXEsHD60EH0Ih9F9YXSFf7V8UTmxyN9nS524GdU=; b=fpP5zxkRTQsdmaqqSNzHRBkQjJZ8rLXgpsgxNKTTevfEWJrUTibvHELgwyKRNh7Ypp tV5IkrNhXr/NFVIQzscbQEkkBoUuGhXO4xWvV1arbfM5opBiWap7oKguSPXBxvfuOIxw Om0WfyF/laDkrhFPDZgmjZfRdGSiAWiiPoQfPT43ojpLwC9jg1tiN9hUPT7K6KyxCRCn TLsfNFFbnQoQADGBOY4iXD95Xvkl0Ds9zPwL/GlQ1N4TU6P7w9T3Zhd8TJe/vriYrHhD /cP1tCEVoxT2RqElkqtgbQT+27M/7CBswbfvcorzEhlYm3QfvSFJaiNOEh7CksKML4eN sv9A== ARC-Authentication-Results: i=1; mx.google.com; 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 i3si14659654pgh.458.2019.04.03.12.44.19; Wed, 03 Apr 2019 12:44:35 -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; 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 S1726605AbfDCTmq (ORCPT + 99 others); Wed, 3 Apr 2019 15:42:46 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:42647 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726064AbfDCTmp (ORCPT ); Wed, 3 Apr 2019 15:42:45 -0400 Received: from p5492e2fc.dip0.t-ipconnect.de ([84.146.226.252] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hBlmU-0007ql-Lj; Wed, 03 Apr 2019 21:42:42 +0200 Date: Wed, 3 Apr 2019 21:42:41 +0200 (CEST) From: Thomas Gleixner To: Andy Lutomirski cc: Josh Poimboeuf , LKML , x86@kernel.org, Andy Lutomirski Subject: Re: [patch 15/14] x86/dumpstack/64: Speedup in_exception_stack() In-Reply-To: Message-ID: References: <20190331214020.836098943@linutronix.de> <20190331215136.039902969@linutronix.de> <20190402154329.scp7i7uqevubgwrz@treble> <7789E14E-C623-4DB7-B076-76B931957C9C@amacapital.net> <6205D576-694A-4C7D-B1B7-A9FF2E1F9E77@amacapital.net> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-1964072614-1554316784=:1833" Content-ID: X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1964072614-1554316784=:1833 Content-Type: text/plain; CHARSET=ISO-8859-7 Content-Transfer-Encoding: 8BIT Content-ID: On Wed, 3 Apr 2019, Thomas Gleixner wrote: > On Tue, 2 Apr 2019, Andy Lutomirski wrote: > > > On Apr 2, 2019, at 1:29 PM, Thomas Gleixner wrote: > > >>> How about a much better fix: make the DB stack be the same size as all > > >>> the others and just have 4 of them (DB0, DB1, DB2, and DB3. After all, > > >>> overflowing from one debug stack into another is just as much of a bug as > > >>> overflowing into a different IST stack. > > >> > > >> That makes sense. > > > > > > Except that we just have two not four. > > > > > > It needs some tweaking of the ist_shift stuff in entry_64.S but that's not > > > rocket science. Famous last words.... > > > > > > > The ist_shift mess should probably be in C, but that?s a big can of > > worms. That being said, why do we have it at all? Once upon a time, we?d > > do ICEBP from user mode (or a legit breakpoint), then send a signal and > > hit a data breakpoint, and we?d recurse. But we don?t run user debug > > handlers on the IST stack at all anymore. > > > > Maybe we can convince ourselves it?s safe? > > Maybe. Need to think about it for a while. What about kprobes. It has nasty reentrancy stuff as well... Thanks, tglx --8323329-1964072614-1554316784=:1833--