Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2885981ybt; Fri, 3 Jul 2020 23:41:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/Pd5i973p8BJBN7lRukoERYnIRkg7WMxpOJYbwh94ozr7eziUwpOKJi0JOO67w2YNTllx X-Received: by 2002:aa7:c450:: with SMTP id n16mr40068855edr.53.1593844908710; Fri, 03 Jul 2020 23:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593844908; cv=none; d=google.com; s=arc-20160816; b=AE/oD8rKIDBr/H+Q1JRD9a0B9LJPx4ypUVSFCEH5XL6RVftMP7zTqFVc4D05YiNfy0 qEjH5uTUHq/kWqXXPIpt7VqKu4OVc0vA6j+HsUW/AlQ18R70puXidAbMx0ErEAtyMbZj QurPGnJI0AL6ofnK7hmf3oE89oON+lBvkUJdbIspXNRyyIrXzMGdo21K97Ins01wOJtt fZZKwRHK9WamaJxDWhPsTABCvoACqMNhzIWhunnFsctwQ7+Cn79bYy5+25qNs5xGc3Xb wFLzvQ+Ma5epuN4qh870tHBZ3P0hZ3o17zg04YnYRyPobzkWKAqixic7+jLEStX6Mjr1 tc5g== 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=3fbem6xgsUHpQEkkr1bl021QDup9/jlYvisDm0Lh+SY=; b=mknE5wULxDTyFf0y4VqqhFEvTp4JS+V/vZkeo8N3m2Gs0Z2tJpgIepmvVI4n2MtGJj DlOrnNPSYYtkWsuOkQVc+lRZO5YmlEW+ANbYAF4i1VplpYuNXTeshCQ8XVAUuiLJV/Fu nsLdQuLzvlTMkJz/1CcVn+UbBH2Zf7/U3+bsv7Z+K75TJRTLPAffnSFIbF4E//0VuVH9 /tnbLTOjFhZnM5lu3z3IRR87DeBWV0aQ3xS1/tAitcBOTSvOE9snAXrkqnK9ZXQO6blQ vbX5Zf0lRF/qH7j74DaUmv+pykc8Oest1NrgDtofQTMsGIJurxir9KFL7wbgdr59aHNm 3WYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gdNwr1QZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lz14si9421523ejb.65.2020.07.03.23.41.25; Fri, 03 Jul 2020 23:41:48 -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=@gmail.com header.s=20161025 header.b=gdNwr1QZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727097AbgGDGkH (ORCPT + 99 others); Sat, 4 Jul 2020 02:40:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726178AbgGDGkH (ORCPT ); Sat, 4 Jul 2020 02:40:07 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 520C2C061794; Fri, 3 Jul 2020 23:40:07 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id z63so30552858qkb.8; Fri, 03 Jul 2020 23:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3fbem6xgsUHpQEkkr1bl021QDup9/jlYvisDm0Lh+SY=; b=gdNwr1QZAC91+OD3FOIx7q1FSHbrZ7YbJPutNryHLdnGL2EaDZXgg1zzgnIYPTYV4q AAbRJOeNvsOa4+McC/gP+Vq/x1uKRcc4b5DSU2mpHbVBiKbsPQX+1napYFZ55jeaHpV1 YQu9Gnn0oySDE+iCddiHSRxkpdnWbKC60kBf4dVFWKvEF8SQlM1PYcgYMSyuzngjVOWV AjtZ2fZDImi88LBn5niGQdzZK6/Ue4VjB383dhWSwHXeNIoU5Lpl42xqU9yY3Lz37g94 kSBboDMTJn+JGwhchUz/w8fBVekEtuEUQmG9fUl4dGeQTHQBcuyuMWxybtFDwxof3X7J yHlQ== 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=3fbem6xgsUHpQEkkr1bl021QDup9/jlYvisDm0Lh+SY=; b=GmtbmfkzZVY4BYYzq9/oIYVBnUR2iq29XWF97dG6AQ9GkbDqYXa9SjTCkoHavOsacw esRYK45hSzlyUO/gpraAceH4tCuKZooX+vyj1W/p8y0t639V/G2XejdilZAPd7sLZ6eh MpRW6zX3okYf7SUZSP1cjGg77Gy4cBY7Oy7sDwC+1FWBot4P4dnflud8UrJNMhQWukVI JLjbWfxteQrbCD/36lWiP1gfQrhM0u3njs3t5f+aCJfT8TRNh9JXlq7jca3YDli43KbZ XsKZhmbAtEaHM+ZHvYvP1VuaJ0m0uUSuWQQosiLSTeY/A5nRSse2BD+9LKDoTo/zZbxD dIUg== X-Gm-Message-State: AOAM533iv9kQsm1nrHFmjAJHYb/R0FEHpnfReacltKGsmsYAQKlply1s i4MjRjlHB+A7N5lcWa1lRp6zEO7Wp8kjlQMIrnQ= X-Received: by 2002:a37:4289:: with SMTP id p131mr8989609qka.28.1593844806613; Fri, 03 Jul 2020 23:40:06 -0700 (PDT) MIME-Version: 1.0 References: <1593833659-26224-1-git-send-email-guoren@kernel.org> In-Reply-To: <1593833659-26224-1-git-send-email-guoren@kernel.org> From: Pekka Enberg Date: Sat, 4 Jul 2020 09:39:50 +0300 Message-ID: Subject: Re: [PATCH V1 0/5] riscv: Add k/uprobe supported To: guoren@kernel.org Cc: palmerdabbelt@google.com, Paul Walmsley , Anup Patel , greentime.hu@sifive.com, zong.li@sifive.com, me@packi.ch, bjorn.topel@gmail.com, atish.patra@wdc.com, linux-riscv@lists.infradead.org, Guo Ren , LKML , linux-csky@vger.kernel.org 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 On Sat, Jul 4, 2020 at 6:34 AM wrote: > The patchset includes kprobe/uprobe support and some related fixups. Nice! On Sat, Jul 4, 2020 at 6:34 AM wrote: > There is no single step exception in riscv ISA, so utilize ebreak to > simulate. Some pc related instructions couldn't be executed out of line > and some system/fence instructions couldn't be a trace site at all. > So we give out a reject list and simulate list in decode-insn.c. Can you elaborate on what you mean by this? Why would you need a single-step facility for kprobes? Is it for executing the instruction that was replaced with a probe breakpoint? Also, the "Debug Specification" [1] specifies a single-step facility for RISC-V -- why is that not useful for implementing kprobes? 1. https://riscv.org/specifications/debug-specification/ - Pekka