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 11C9BC433EF for ; Fri, 25 Mar 2022 02:41:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357799AbiCYCms (ORCPT ); Thu, 24 Mar 2022 22:42:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232525AbiCYCmp (ORCPT ); Thu, 24 Mar 2022 22:42:45 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC69186E35; Thu, 24 Mar 2022 19:41:12 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id jx9so6333671pjb.5; Thu, 24 Mar 2022 19:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YhbHvKOe3R9wr4WqHvvvMBja08hCbQeffvIT8N9J4tY=; b=lSD69GpG3fScXZeIiFhxLUpG7zr6II06PDD3LiZ/yFNZpViixqk1oVGH+ZIv9YsmFF JuD0HVFNEkKEKGmFjXBEHItS29+7VHjlEpcZHBbR35jvTZFNQ9q+ohKHhbAAU4hOZs1u esCibAlKYdQDmXnnGixMs07Ow6L8iVgfqAzon9mdbzl11CpCR8deFFfotcFePhlTELFY M97urpuWR79ToiJ4Ni6RaX1ezlCJp5vhp4aowfkBgT3tvDFAdCskFtxT72gGy9+WTi/Q Zslw1aCnM9yovxGWFx3pEr23MOknGo8M7r4pHYgiR9RGy+ALNpYQXL+sX1A9KCZlDMRN Xvnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YhbHvKOe3R9wr4WqHvvvMBja08hCbQeffvIT8N9J4tY=; b=TZ+JuPG/17QaPc0MiWt91R4apW4ijXneVC1tSfLa6AhzT3lDI/rLA5V2M3dvUBH/V1 WTs5jhyNEB/lbNYkSHA98PUvYE+/ss7ZYt7R5PO/sRkZ2asv3Grqav3qta8Tr/CAuouf UJYYs+223F6xl0tld8KETVYq+UDoRHBziDOkpq/8qIvOIvO5Od80AgUei/hXhYx11or+ ArwVBgOQQ4OuU+DIVV3jIgJkKz32a2MHD16/gBuBPSl4t9V+WgboDjCjZUV5KBCqg0j5 jGrNh49YOWyqIy5ZTTWX1NVuZdePVJaR96J2rkGqZC3BhaTgNlY1LXLLthQcD+azHuwE eSMg== X-Gm-Message-State: AOAM533G39ZFTAsN/nZoFV68jumivdQSG3oM56mf5wgYT/HoceY2yJd5 ZaJ4wRmBr7v3lo61NH3W4VEswJlGLaRko1romUA= X-Google-Smtp-Source: ABdhPJz6WZrBEX0skuDL82D0kkGisFThl7BLfGbFbH6DvyzjO9DwCGSj4rIRO8W4F4hWkqTxSnDM8yhN8EcCWa7+bJ0= X-Received: by 2002:a17:90b:1a81:b0:1bc:c3e5:27b2 with SMTP id ng1-20020a17090b1a8100b001bcc3e527b2mr21991347pjb.20.1648176072202; Thu, 24 Mar 2022 19:41:12 -0700 (PDT) MIME-Version: 1.0 References: <164800288611.1716332.7053663723617614668.stgit@devnote2> <164800289923.1716332.9772144337267953560.stgit@devnote2> <20220323204119.1feac1af0a1d58b8e63acd5d@kernel.org> <20220325112114.4604291a58ee5b214ee334da@kernel.org> In-Reply-To: <20220325112114.4604291a58ee5b214ee334da@kernel.org> From: Alexei Starovoitov Date: Thu, 24 Mar 2022 19:41:01 -0700 Message-ID: Subject: Re: [PATCH v13 bpf-next 1/1] rethook: x86: Add rethook x86 implementation To: Masami Hiramatsu Cc: Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , X86 ML , Jiri Olsa , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Andrii Nakryiko , Network Development , bpf , lkml , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Steven Rostedt , "Naveen N . Rao" , Anil S Keshavamurthy , "David S . Miller" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 24, 2022 at 7:21 PM Masami Hiramatsu wrote: > > On Thu, 24 Mar 2022 19:03:43 -0700 > Alexei Starovoitov wrote: > > > On Wed, Mar 23, 2022 at 4:41 AM Masami Hiramatsu wrote: > > > > > > On Wed, 23 Mar 2022 09:05:26 +0100 > > > Peter Zijlstra wrote: > > > > > > > On Wed, Mar 23, 2022 at 11:34:59AM +0900, Masami Hiramatsu wrote: > > > > > Add rethook for x86 implementation. Most of the code has been copied from > > > > > kretprobes on x86. > > > > > > > > Right; as said, I'm really unhappy with growing a carbon copy of this > > > > stuff instead of sharing. Can we *please* keep it a single instance? > > > > > > OK, then let me update the kprobe side too. > > > > > > > Them being basically indentical, it should be trivial to have > > > > CONFIG_KPROBE_ON_RETHOOK (or somesuch) and just share this. > > > > > > Yes, ideally it should use CONFIG_HAVE_RETHOOK since the rethook arch port > > > must be a copy of the kretprobe implementation. But for safety, I think > > > having CONFIG_KPROBE_ON_RETHOOK is a good idea until replacing all kretprobe > > > implementations. > > > > Masami, > > > > you're respinning this patch to combine > > arch_rethook_trampoline and __kretprobe_trampoline > > right? > > Yes, let me send the first patch set (for x86 at first). great > BTW, can you review these 2 patches? These are only for the fprobes, > so it can be picked to bpf-next. > > https://lore.kernel.org/all/164802091567.1732982.1242854551611267542.stgit@devnote2/T/#u Yes. They look good. Will push them soon.