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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62366C41513 for ; Mon, 14 Aug 2023 14:11:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231405AbjHNOLO (ORCPT ); Mon, 14 Aug 2023 10:11:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232110AbjHNOKz (ORCPT ); Mon, 14 Aug 2023 10:10:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFED810DD for ; Mon, 14 Aug 2023 07:10:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8F143614F0 for ; Mon, 14 Aug 2023 14:10:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5D20C433C7; Mon, 14 Aug 2023 14:10:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692022254; bh=wIRU+TKzPDX43UA4ILBFZUuV1O5dayyLhaNRehSdSh4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Ijde4UN2V3AV/c24wpWM5FOL39Qn01/lNwOuvLp8ohbBcp1tBpLAGyQafEPrMdxaM QgHY7AHFFdwwVt0O+lIHb+biM7vOoZl66UAcllbgPjrUDobrEioI9RtPknBmraXZhU o0jb/TnoAH+I5tYWfshb8xa/klZ6wAYktAwC63q6m6A7FMODQ07ZlLQO7oqPl4/we3 8NI5uALn3hGTr7rmgdiBtmiF8SAwWFpGz8nJThXHvIHVsfAYiUfTWd2bPdgRi0JSs2 smYo2Y6+UcPLyIiTno2f5M/ulsBvlgx5XzQO3zQVozn5n/eyUn/39iHMFIJkZ1wHh6 lTkY0IMQFWadQ== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Nam Cao Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: test code for kprobe In-Reply-To: References: <87il9hg65g.fsf@all.your.base.are.belong.to.us> Date: Mon, 14 Aug 2023 16:10:51 +0200 Message-ID: <87a5utg1ec.fsf@all.your.base.are.belong.to.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nam Cao writes: > On Mon, Aug 14, 2023 at 02:28:11PM +0200, Bj=C3=B6rn T=C3=B6pel wrote: >> Nam Cao writes: >>=20 >> A RISC-V specific kprobes test -- much welcome! >>=20 >> Please add a proper commit message here. >>=20 >> > --- >> > drivers/test_kprobe/Makefile | 3 + >> > drivers/test_kprobe/test_kprobe.c | 265 ++++++++++++++++++++++++++++++ >> > 2 files changed, 268 insertions(+) >> > create mode 100644 drivers/test_kprobe/Makefile >> > create mode 100644 drivers/test_kprobe/test_kprobe.c >> > >> > diff --git a/drivers/test_kprobe/Makefile b/drivers/test_kprobe/Makefi= le >>=20 >> Architecture specific test code usually reside in "arch/$ARCH" >> (arch/riscv), and is part of Kconfig.debug. >>=20 >> Have a look at: >> * grep for ARM_KPROBES_TEST in arch/arm >> * grep for KPROBES_SANITY_TEST, and in arch/powerpc grep >> test_emulate_step >> * grep S390_KPROBES_SANITY_TEST > > Sorry that I wasn't clear with this: I just wanted to show how testing wa= s done. > This is not meant to be merged. > > I do have plans to clean this up and send upstream in the future, but not= with > this patch series. Please do! A RISC-V specific kprobes test would be nice. Bj=C3=B6rn