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=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable 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 4CD7DC04AAA for ; Thu, 2 May 2019 21:33:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1E8A02081C for ; Thu, 2 May 2019 21:33:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="RQWf4Str" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726280AbfEBVdN (ORCPT ); Thu, 2 May 2019 17:33:13 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:55544 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbfEBVdN (ORCPT ); Thu, 2 May 2019 17:33:13 -0400 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZXqnuo0JSIuRggTcqyOSAvcyo1xhZ/4jSajZfdhhW24=; b=RQWf4StrNHmwEF6NAVXxFPJ2s Sxzl51CDrOJuvMAA+fYwI41eZ3d7WnH69VgOI8/coS6GZjyfBkyouvMkqz0y4EFDW6C90it/y+BMI lstFwapGleV7DCIkgIZCWUp78icSvdsGnF5QiJREea/5Sw6MNdWEEGOIFUwkl15Yx1+ai0jlv3w91 +yrUGaP4xHamqYJCQa6ZPGC0dYo1uWWJGS+rA8yjN4/fPvrYV9Wu2PDu4v0yjn4rk7OzEJt25cg7C nC1O8DHz7/yJdbKdhlfmTV8mChs6Kt8K8AGEb7fQWqMw48YUjfCXSTLGkvupy9TvKXNgjlIhJmEXi 1/2p9Dl+A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hMJJq-0004Nq-5V; Thu, 02 May 2019 21:32:42 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 69A4F209A1C85; Thu, 2 May 2019 23:32:39 +0200 (CEST) Date: Thu, 2 May 2019 23:32:39 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Steven Rostedt , Linux List Kernel Mailing , Ingo Molnar , Andrew Morton , Andy Lutomirski , Nicolai Stange , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , the arch/x86 maintainers , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Shuah Khan , Konrad Rzeszutek Wilk , Tim Chen , Sebastian Andrzej Siewior , Mimi Zohar , Juergen Gross , Nick Desaulniers , Nayna Jain , Masahiro Yamada , Joerg Roedel , "open list:KERNEL SELFTEST FRAMEWORK" , stable Subject: Re: [RFC][PATCH 1/2] x86: Allow breakpoints to emulate call functions Message-ID: <20190502213239.GA2623@hirez.programming.kicks-ass.net> References: <20190501202830.347656894@goodmis.org> <20190501203152.397154664@goodmis.org> <20190501232412.1196ef18@oasis.local.home> <20190502162133.GX2623@hirez.programming.kicks-ass.net> <20190502181811.GY2623@hirez.programming.kicks-ass.net> <20190502202146.GZ2623@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 02, 2019 at 01:49:29PM -0700, Linus Torvalds wrote: > We *could* also make this kernel-mode-only do_int3() be a special > function, and do something like I think I prefer the variant we have now. The int3_emulate_*() things work uniformly and as expected on 32 and 64 bit (it would even work for userspace if it weren't for SMAP). So while the 32bit kernel entry is 'special' all the INT3 handlers can uniformly prod at pt_regs in a natural way and have it work. Making it special -- just for 32bit, seems like the wrong thing to me.