From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25B6030E851 for ; Tue, 21 Jul 2026 12:48:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784638117; cv=none; b=YBF0n5Aozcj1wxcN3cu7FpdjW3CGXl4J1Xor41FGPGqZqkXWoocI77ouv7bCx/PawX2oRRRDf4Z2Pbs+TjIzjTmLaoBub125KlfLIZfcxqDZlWomTEo+iFLDmWBAp4Pb1DkJEBMzv26cRdojdjXkV0HjK68Hku/ASAHI/J3FsqI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784638117; c=relaxed/simple; bh=+3pPPzkN5vSN5uc06d/jwUE+LQ23KJmEngSIHcTZfSQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=IXd7yBiSudyEuzzwADz6zHY+K0aIfW6tJp5gHdr0JEi2SjJOvCPBB9yqsuFBH9SWPnZvm58Ipl2JZ/ouNU904veJubqSYOZEdVNdsQEgsHXzF0r63kT4A0l9xpd1Vv5jPayOBKJX4eNQ9Tue3R9r4OTGHJPqUmRkmMCf2NdHlPg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kyyZpskx; arc=none smtp.client-ip=209.85.210.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kyyZpskx" Received: by mail-ot1-f54.google.com with SMTP id 46e09a7af769-7ec3b429a3aso437384a34.1 for ; Tue, 21 Jul 2026 05:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784638115; x=1785242915; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=f9BdUyGIX1sBYdd4LfNbX4BHjyUWmMKKhhuvfWpGKTI=; b=kyyZpskxRIMFVzDhGWhVTDRIY3ucz1uBiZD5JhdQEBmfQtbVUuZfcpLhDbCnyAKW7r xgXNiSB1WFi3ZYQsbrh+SP/P+H4dS6YnluZ+vS3KqOeJcC0msl1TYlMbvZH4W8C20DBg ATMnMfrXr/+WBR8YpJ/chFVDDlBSE3Wfnf6hooPPflJ0zXYTOGvQmSdljeYvYYYw0t00 96SlYwx6DDckhfFKkP8M3wVdu8rT+x+cbnnzud2LQ/QcEf9rxB9YhwEKj5xs/MT8ftmH isWba7m8yk68idBUVVFN0IP4Q0/Xtfers/POhHJclHVznig4yLcd/s1yVCbT/Jj46y/W LUHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784638115; x=1785242915; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=f9BdUyGIX1sBYdd4LfNbX4BHjyUWmMKKhhuvfWpGKTI=; b=Op+zrcuqv1s8MzOhNvcbsnZ5GpZ499haMl5JX4TjIIE09uB1uTGLZJiS3wFjuEk9t0 7v3kPjAeCdViAkKxvvvCvz+lmYOVg6jwtDz8JVy+TM4upjcwZFxOC2ITkMhIGhxpsg4c mthBLRU0OVHnJFtpXlKE1Vs2TVa6CnQOP29OdEyKL4I9pH1vzaXAVSCOdLjLN6Sr+B/H hcB2Ju5KB1GpjMnBfJLY1MGGkLJPtCg/D4DBAdAULtXKDb0/A3AD2Od70mFeL7YsjwRU Wsd1P+zD9frmOYLa7b1sc7Mzql0fwjy4sExW4yGz/SkYcLaaG+K+o3vPQjNje/OlEijY 6B9w== X-Forwarded-Encrypted: i=1; AHgh+RqNLEfqdwIkbO8f8SxkmiSnJtgP3IvIZbsHDmDNcue8MAgkgAX3QTfrai2IenQ1ALyU4eESGvReq+FL094=@vger.kernel.org X-Gm-Message-State: AOJu0YwqPKD+cqyIpI+r7CS6uCz4OZhKoSsLqAlG2mtkdBCilXllAI5z MvPbx+OqKc3DKJhqBZkDgVTJotUzL2ilo0D8cx7ueS4hfP9DF47IlkHg X-Gm-Gg: AfdE7ck+yDR8NlBnWIguqnDnZbmQibucTPJquw19INWcpAl7twRMTLTUWduRWb8yFs+ /YHvi1ya3gf8ARc05ZSbzHeEuRsH6IMPIPUVlqOoAPlFduxNqCmuu8DSPtKvYyTuOJYHdDPazA8 H/kJ/HZif7BPWqx5naZfqlaxWIeEGxCgDAxjN9JB/D6ACGnrBnuJemKF8nNqqZfuCKeTIcqeKoY RHgPbhZOl7jUcmIFqCjsNzviY433LLYDhRUT66iIDiBijhLAzovB82eNHNY0SMmWYqLdNmQk4sk Uso/r4qQQbNDxnNyK1KsGTyK7eUdTWpFfOHhCK4U8GQJZMU03Ew9D1fN6fCT5N2I+5KAwrehRkH CH+zpvRyF/uneAE29vGma/j7sznEu7Xx+O2STYmdWcWfeogm+wSLtMhZ3RVYiec7zE4rEAc11Cg Uzyt7yWQ== X-Received: by 2002:a05:6820:f02f:b0:6a1:8cd5:c9d8 with SMTP id 006d021491bc7-6a536ada646mr9327016eaf.68.1784638114876; Tue, 21 Jul 2026 05:48:34 -0700 (PDT) Received: from [198.18.0.1] ([144.24.58.22]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4568e0bddefsm11251568fac.4.2026.07.21.05.48.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jul 2026 05:48:34 -0700 (PDT) Message-ID: Date: Tue, 21 Jul 2026 08:48:22 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v2 00/13] mm/kwatch: dynamic hardware watchpoints for hunting memory corruption Content-Language: en-US To: Dave Hansen , Andrew Morton , Peter Zijlstra , Thomas Gleixner , Steven Rostedt , Masami Hiramatsu Cc: Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , x86@kernel.org, Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Mathieu Desnoyers , David Hildenbrand , Jonathan Corbet , Matthew Wilcox , Alan Stern , Randy Dunlap , Alexander Potapenko , Marco Elver , Mike Rapoport , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-doc@vger.kernel.org References: <20260717125023.1895892-1-wangjinchao600@gmail.com> <91f3486b-3b85-4b43-b099-0a5325643352@intel.com> From: Jinchao Wang In-Reply-To: <91f3486b-3b85-4b43-b099-0a5325643352@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 7/17/2026 9:41 AM, Dave Hansen wrote: > On 7/17/26 05:50, Jinchao Wang wrote: >> 24 files changed, 2115 insertions(+), 63 deletions(-) > Reading this, I wonder how many kernel debugging features we need. I > don't even think we have a centralized list of them. They all just live > in their own silos. > > This one really seems like a super specialized tool. It has to be > enabled at compile time and specifically aimed at a specific function. > > Maybe this should live off on the side for a while. If folks end up > actually needing it, they can point their friendly LLM over to its tree. Thanks, Dave. I agree that adding another standalone in-kernel debugging facility of this size is not the right direction. The motivation was practical. I have encountered several silent memory corruption bugs for which I wrote similar one-off instrumentation to identify the writer. KWatch was an attempt to make that technique reusable instead of rebuilding it for each bug, and to reduce the same setup cost for other developers facing similar problems. This approach proved useful for localizing the dummy_hcd corruption: https://lore.kernel.org/all/20260714064829.172098-1-wangjinchao600@gmail.com/ It identified the copy that overwrote req->complete and recorded the writer's call stack. So I believe the debugging use case is valid, but it does not require a separate KWatch implementation. As discussed in my reply to Masami and Boris, I will stop pursuing the standalone KWatch series and work with Masami on implementing the necessary scoped watchpoint features in wprobe/tracing instead. Thanks, Jinchao