Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2328575ybh; Fri, 17 Jul 2020 15:42:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5iknWXPaTWh/jYJatSeCQ2+SsQk6dEcBtdrjnjdTkzfIo1ZO/5RmMBXpGWRxUJ2gZI31P X-Received: by 2002:a17:906:f2c4:: with SMTP id gz4mr10561646ejb.484.1595025751708; Fri, 17 Jul 2020 15:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595025751; cv=none; d=google.com; s=arc-20160816; b=tI7S9i4bxAzdodl2qL3gB4H1tAFvNGdjrp+0r1FyiYfeOV5uPnuU8qDvVTEKf1+qiX 6WBPLAkyNGQE46udqxf/IdPv0NHH3sSpgi5uhjvZu7f7scqryFTSx0m9LOi1TDgV+eni mYqWNyVZqtySHUL0aeM1jnBrlQvCCyIc3Y7Cg/+L63tvrLgisLNjwxpzgzAW0abh7cGQ pqdKQ56OUmfDDqdXdXzeGAYKH9no4jKYl2i3iitzsznyYGGfJZwFYuLFlsuWgVCxnlHA 40RmrDyqrdSceHJFY0WAaHx0F2POdDI26yNMoOR7fMWLmOkMr0sXwvWQoHj3maXxg9Mb idJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=SZyZ467hIccQl/fLPtGOgJ9GVjmNV0nRkM5JSKZ0eUA=; b=PLkmTN47kXS+Jim/6iu3M9w3rr5MBPFhGV2EdnlOKNSL1vKem4UVkHFGOH3WY7f+bG UR8P3vS3oiAN7dpVCE5C9BX6FVRwLLjyTiU0YrtHFk2H6e1JCnbIBuq6I9ZYZboTQ2fc IFbkLxCpfwFgA2pWdg8obB5OsKPGGSMQ5VWhjtw6Jmpj6Yne/+JrjYvQoCOM08+oolVe h6VsQITvSTeveiHk8SkZMRcc9qEsdjCRfHDHxTprct8r+QE8i0rWs1rjDuqNuV9qK8yJ oU6EOMBLtbRoqlS5dxcWP5zAE9z14/L+b7kDAFAHNOR6b22VIh+6XgM66fCnCVg+3TOD Phtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GomICRb5; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si6115958edq.493.2020.07.17.15.42.08; Fri, 17 Jul 2020 15:42:31 -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=@chromium.org header.s=google header.b=GomICRb5; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727844AbgGQWkO (ORCPT + 99 others); Fri, 17 Jul 2020 18:40:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726569AbgGQWkN (ORCPT ); Fri, 17 Jul 2020 18:40:13 -0400 Received: from mail-ua1-x944.google.com (mail-ua1-x944.google.com [IPv6:2607:f8b0:4864:20::944]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E7C0C0619D2 for ; Fri, 17 Jul 2020 15:40:13 -0700 (PDT) Received: by mail-ua1-x944.google.com with SMTP id j21so3347129ual.11 for ; Fri, 17 Jul 2020 15:40:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SZyZ467hIccQl/fLPtGOgJ9GVjmNV0nRkM5JSKZ0eUA=; b=GomICRb5nZ9AfMHvPuoZI9Nbna9nrEcMfyotbsXbKTOwiWbdxkGc31o4K3DmBKnVFs USNTnZSIRmtmhCioWNZiPbRNJC4rBkfzRD+++dw3AYRbKw9mQl2l4jech0vRweiL1/bj ck9javutd1dlNYxF5oD3KtwdU5fnN2jzWtBV8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SZyZ467hIccQl/fLPtGOgJ9GVjmNV0nRkM5JSKZ0eUA=; b=oGft5hkADvQBCQhfGBDbVVuMU+ZI72urHg6Ma95HTCE1NNAwa88tkibkZJZgB4mSjE nmhGsJb06CVfMUFtSyJF09VL+YeX3TNru3sghYP6b9BJX9/SIJcjCQv5RuY2BlE/3atE bR+YlV1objQfowqLswn2x11BP39vJkHg29vqHcEtn+Cc0zYKkv7B7rih/HzHnTQM04uj VnJLMYUqIEqVkGVSprTC//vy/ujYHvxTM8FZVn2edfsPo1CFidMOUrE224vltjaItG2e ZV4TRdckKUWKHE71OLzKvkknuWa8jDsXkdkJCWx/B+oM2pZp0kNGbgoN8rzyqbTUyngK 61Ug== X-Gm-Message-State: AOAM530oS+04jfWUsQaYJj4qVEP6aUOAD58E+uC/3QdeuANc2BQPH8my JWV7DIj3th0z74BCmGEOaDeAKehQu8I= X-Received: by 2002:ab0:5ea5:: with SMTP id y37mr8863910uag.71.1595025611352; Fri, 17 Jul 2020 15:40:11 -0700 (PDT) Received: from mail-ua1-f54.google.com (mail-ua1-f54.google.com. [209.85.222.54]) by smtp.gmail.com with ESMTPSA id f7sm1194431vso.5.2020.07.17.15.40.10 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Jul 2020 15:40:10 -0700 (PDT) Received: by mail-ua1-f54.google.com with SMTP id n4so3351365uae.5 for ; Fri, 17 Jul 2020 15:40:10 -0700 (PDT) X-Received: by 2002:ab0:150c:: with SMTP id o12mr9192504uae.90.1595025609920; Fri, 17 Jul 2020 15:40:09 -0700 (PDT) MIME-Version: 1.0 References: <20200716151943.2167652-1-daniel.thompson@linaro.org> <20200716151943.2167652-4-daniel.thompson@linaro.org> In-Reply-To: <20200716151943.2167652-4-daniel.thompson@linaro.org> From: Doug Anderson Date: Fri, 17 Jul 2020 15:39:58 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/3] kgdb: Add NOKPROBE labels on the trap handler functions To: Daniel Thompson Cc: Jason Wessel , Peter Zijlstra , Sumit Garg , Petr Mladek , Sergey Senozhatsky , Will Deacon , Masami Hiramatsu , kgdb-bugreport@lists.sourceforge.net, LKML , Patch Tracking Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Jul 16, 2020 at 8:20 AM Daniel Thompson wrote: > > Currently kgdb honours the kprobe blocklist but doesn't place its own > trap handling code on the list. Add labels to discourage attempting to > use kgdb to debug itself. > > These changes do not make it impossible to provoke recursive trapping > since they do not cover all the calls that can be made on kgdb's entry > logic. However going much further whilst we are sharing the kprobe > blocklist risks reducing the capabilities of kprobe and this would be a > bad trade off (especially so given kgdb's users are currently conditioned > to avoid recursive traps). > > Signed-off-by: Daniel Thompson > --- > kernel/debug/debug_core.c | 8 ++++++++ > 1 file changed, 8 insertions(+) I could just be missing something, but... I understand not adding "NOKPROBE_SYMBOL" to generic kernel functions that kgdb happens to call, but I'm not quite sure I understand why all of the kdb / kgdb code itself shouldn't be in the blocklist. I certainly don't object to the functions you added to the blocklist, I guess I'm must trying to understand why it's a bad idea to add more or how you came up with the list of functions that you did.