Received: by 2002:a05:7412:46a4:b0:cf:ab72:ee0d with SMTP id z36csp2696383rdg; Mon, 14 Aug 2023 07:51:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkg0605x9A0r5r4MiFr4oqJpvLp8atRd2006PwE+umlsEWZnLPYV/3xljh/HfibO+ifWGM X-Received: by 2002:aa7:c30f:0:b0:523:6c47:56f8 with SMTP id l15-20020aa7c30f000000b005236c4756f8mr7732518edq.18.1692024700204; Mon, 14 Aug 2023 07:51:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692024700; cv=none; d=google.com; s=arc-20160816; b=CEYjurkA40U81e4/rRTWMNdCXNLy6AN/E2vRS0VfhVzwlXWoRJqQRKJ+VoX3Ce7RKL gUpqKysUFmD0mdyL6Ue9TLzgXMaxQNLt413Ysx+N4zTMA+P17XJzwrDjiZTSd4uKOo1P fOHk3sYIeyaMSuszGp2vG7ttb4SSLWRcZ6gQxdw8LV6yt0MogffxWUOyOsl7OJ8sQG61 KIRKuYmAV7MjQarzBgtwGFoH1wpg5CHtMeRnfpSDozt8GNcgLkB8Tr+LSPsF+rAQh/eM 1BDrbWfdLpz9K39vdH+IQ1bcMpB5uyhNLmdtu7zH0ulCD4eEKeYed5Mw3Z7qvSWVDmJE 6kwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=Yb07NbgBuf51H8cjFZP0ppjlqBkZ34IpxkxzjRa4FC0=; fh=VPRtN1Gt7bnRnEk/cmZXTyRaQgfq+tyRrNO61utzOlQ=; b=QYWh+z0T+R7+nmQ98YXdybeoRxCx+GAfPBaC1E2OVmCYC2OtkLEjGAaAYmJR25Moo+ AOGZHnCtpvRTstNU3lr71toWFbTqTgDeRyQbmpvZRvjfz7bCd6bAszqBpOFvb7j2wSjc IwjQkBY7QyTpBje9rr6+ayfMjCgfxM0ik4jV31SXkoSJhzZ+lWKr3N5XDA7jV66hKcGj h+KPMKAwbnPyU5tv+eE/kul3jOkWGF02IXjMKa6S6DlR6QBl22MLpvg1FRJPp5Qw5pS3 J4MpsDxbHq403jbd7jGdj73V0t0jpYJL43dOjLwJXw+3TJWm0eyZGcC3rrT1UnmhuYC9 cnFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ijde4UN2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020aa7c684000000b0052340601105si7911733edq.604.2023.08.14.07.51.15; Mon, 14 Aug 2023 07:51:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ijde4UN2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229994AbjHNOLN (ORCPT + 99 others); Mon, 14 Aug 2023 10:11:13 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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