From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932728AbbLNVk1 (ORCPT ); Mon, 14 Dec 2015 16:40:27 -0500 Received: from terminus.zytor.com ([198.137.202.10]:60897 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932382AbbLNVkZ (ORCPT ); Mon, 14 Dec 2015 16:40:25 -0500 Subject: Re: [PATCH] Fix int1 recursion with unregistered breakpoints To: Jeff Merkey , linux-kernel@vger.kernel.org References: <20151214210320.GA20856@localhost.localdomain> Cc: Thomas Gleixner , mingo@redhat.com, x86@kernel.org, peterz@infradead.org, luto@kernel.org From: "H. Peter Anvin" Message-ID: <566F371A.3090207@zytor.com> Date: Mon, 14 Dec 2015 13:39:38 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151214210320.GA20856@localhost.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/14/15 13:03, Jeff Merkey wrote: > Please consider the attached patch. > > I have reviewed all the code that touches this patch and have > determined it will function and support all of the software that > depends on this handler properly. I have compiled and tested this > patch with a test harness that tests the robustness of the linux > breakpoint API and handlers in the following ways: > > 1. Setting multiple conditional breakpoints through > arch_install_hw_breakpoint API across four processors to test the rate > at which the interface can handle breakpoint exceptions > > 2. Setting unregistered breakpoints to test the handlers robustness > in dealing with error handling conditions and errant or spurious > hardware conditions and to simulate actual "lazy debug register > switching" (which does not work BTW) with null bp handlers to test the > robustness of the handlers. > > 3. Clearing and setting breakpoints across multiple processors then > triggering concurrent exceptions in both interrupt and process > contexts. > > This patch improves robustness in several ways in the linux kernel: > > 1. Corrects bug in handling unregistered breakpoints. > > 2. Provides hardware check of dr7 to determine source of breakpoint > if OS cannot ascertain the int1 source from its own state and > variables. > > 3. Actually allows "lazy debug register switching" to function, which > until recently has apparently never been actually seen on live > hardware or actually tested. > This is all fine and good, but you are missing one of the most important parts of a patch: a patch description, describing in detail the problem that it solves and why. This description needs to be comprehensible not just for people already initiated but for someone doing code archaeology a decade from now. Thanks, -hpa