Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp3561ybm; Tue, 26 May 2020 09:19:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFhBJSNu9fb5/eUJmd1FvY45FfW8BdZWtjT7DPXusEaF1sw6168Hs+6iLCwemcojr2uE5G X-Received: by 2002:a50:de03:: with SMTP id z3mr19965394edk.50.1590509984981; Tue, 26 May 2020 09:19:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590509984; cv=none; d=google.com; s=arc-20160816; b=u1dPVHLlak8yeWvuHdK4dsg+L+nnsl5/B4entSMaq2X6puGeNcYIkroWymqUNSiZMh vckVwULXxjNhft3y5Zapa+NU/IkNl3n/DvBIrYm9VmGwQSUEOqADJIjY+IgkXyxeCygS hZmklXR3uhbFqGCCq3V8LZ+BstYuuUc1UeTt5ATCckAIhDNbsixRwgK35kTZjK5BF3Mv MQRh4N1AjQ5g/l5TzZPbMtxepL8VuiscqkuCodkZh+sy0T5E7d7Ta9SiNj8BK2l5MSNS pLyjk73+4MygKDzg8yZQLKd+Xpl7qQ//kW3nPMPfFqguc6CiF2+BEQyWvVpAZIMIaPtv vgDQ== 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=QAvGGfTFG25ElrhD3qboczTVRvpcoz4/MxDPrOFLyQc=; b=OkfQCtIEgqBuRmVs2uorr9RDF4Oz5tyzLIrowDqgS8QuWKQilcl1J8rGc0BXaBvAj7 3memRvHcr2fK7HgJ5a3ISbZDCw+s75vz3HqpgTQyC/j2jEovrmGR5jwYJHZB4uYoaW2h zWCQIDm7zW9cHA3MPmiuWaa8kD76GlvooDIsYIE2wcUl5BNSS6M5BeFVAqzJUlXpuFAF e4mcu7bfbsIdrxLoZMhMaydNJh9QJmW0gkFrmOZk6Sayhu+urH9pgI5vmatdnOJ7w8Hu 6uz8uchzUOARCccK1to8KMh5jn0av4LdEEYlTAsBfliPS2caawzIxDNaTqbes1pzYzP/ IKjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="jUQs/+Xr"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y43si175890ede.404.2020.05.26.09.19.21; Tue, 26 May 2020 09:19:44 -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=pass header.i=@linaro.org header.s=google header.b="jUQs/+Xr"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729666AbgEZQQ1 (ORCPT + 99 others); Tue, 26 May 2020 12:16:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728361AbgEZQQ0 (ORCPT ); Tue, 26 May 2020 12:16:26 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DDABC03E96D for ; Tue, 26 May 2020 09:16:25 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id j10so5381630wrw.8 for ; Tue, 26 May 2020 09:16:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=QAvGGfTFG25ElrhD3qboczTVRvpcoz4/MxDPrOFLyQc=; b=jUQs/+XrgKVA+BxYtYwJ9+JuBcKfqE7sTotIk1cJwTjNDdph4q8//KIKCWFWJXjuqF bNvHT1mXU4vgLFZtgKfBQQ9XcnIDBptu/akIqUTWHm0cOtz2BEJS1ruk4/MNa1eH4klt ZuFTkQLr8+q2ITQVc1NPo2IdaUCyWjFec4BlJyZFu2utsBGt4sDUF8vR2Fhu2Czulcg3 05T0h5z1DCFPvdQ5za1lUYlAooFdl+a+ZXRSnTlenUopOjd9D60o6A+qkKmbBYHacvu7 pAgh6ITLIy49AYE+6r1dZg7eAuTHLpX0avsd1ygJ2UgVJBrR1haYqXWV9/vSq/g2zOtc 35YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=QAvGGfTFG25ElrhD3qboczTVRvpcoz4/MxDPrOFLyQc=; b=LRpL1kwwdCFD7o0NoIrmT1uL/N3joosYFKEg4R8umYezI9KlZ7wXPdVBLjX/Ec1j13 IjdM7fAsBIhCaOppRLnYlhufVI8v2CtFreXQJdICE3ZnM6TYGIVX+fLU+CQCyS6zAez2 9sqnmXLMB7yzL3ZDeGo/EEmODkCz303DFzCG/Wq+aTBeFBiv0zybXPodN7jeEJPaXLCe /X3nTkTsi9NoTT3hYEHs43c0pqy4qXpI6hmkRnu6KjbLaIhVF9UAfP8rln/wEQRwgDfg +ivr54MPLwLT6G6keimCnJb5zU3Ziz7X3sSGdKmbnOrwhZrEL5O3q6rLCrE3Pd+WkTc2 DTSQ== X-Gm-Message-State: AOAM5333NpYyS+P0pPW6enWD60JqY1YUAyLXsmzpQUOlCj1mjU7nbw0D NQQrYmpIqrHso9B74S/iTycphw== X-Received: by 2002:a5d:5585:: with SMTP id i5mr17353654wrv.112.1590509783661; Tue, 26 May 2020 09:16:23 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id q13sm268377wrn.84.2020.05.26.09.16.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2020 09:16:22 -0700 (PDT) Date: Tue, 26 May 2020 17:16:21 +0100 From: Daniel Thompson To: Peter Zijlstra Cc: x86@kernel.org, sumit.garg@linaro.org, jason.wessel@windriver.com, dianders@chromium.org, kgdb-bugreport@lists.sourceforge.net, linux-kernel@vger.kernel.org, pmladek@suse.com, sergey.senozhatsky@gmail.com, will@kernel.org Subject: Re: x86/entry vs kgdb Message-ID: <20200526161621.7ucj5jn6rm5yednb@holly.lan> References: <20200525083605.GB317569@hirez.programming.kicks-ass.net> <20200525091832.GE325303@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200525091832.GE325303@hirez.programming.kicks-ass.net> 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 11:18:32AM +0200, Peter Zijlstra wrote: > On Mon, May 25, 2020 at 10:36:05AM +0200, Peter Zijlstra wrote: > > Hi! > > > > Since you seem to care about kgdb, I figured you might want to fix this > > before I mark it broken on x86 (we've been considering doing that for a > > while). > > > > AFAICT the whole debugreg usage of kgdb-x86_64 is completely hosed; it > > doesn't respsect the normal exclusion zones as per arch_build_bp_info(). > > > > That is, breakpoints must never be in: > > > > - in the cpu_entry_area > > - in .entry.text > > - in .noinstr.text > > - in anything else marked NOKPROBE > > > > by not respecting these constraints it is trivial to completely and > > utterly hose the machine. The entry rework that is current underway will > > explicitly not deal with #DB triggering in any of those places. > > This also very much includes single stepping those bits. Which KGDB > obviously also does not respects. For breakpoints there's already a pre-poke validation hook that architectures can override if they want to. I can modify the default implementation to include checking the nokprobe list. Stepping is a bit more complex. There are hooks for some of the underlying work but not pre-step validation hook. I'll see if we can add one. Daniel.