netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
  • * Re: [PATCH v2 bpf-next 0/5] ftrace: host klp and bpf trampoline together
           [not found] <20220602193706.2607681-1-song@kernel.org>
           [not found] ` <20220602193706.2607681-4-song@kernel.org>
    @ 2022-06-06 22:57 ` Song Liu
           [not found] ` <20220602193706.2607681-6-song@kernel.org>
                       ` (2 subsequent siblings)
      4 siblings, 0 replies; 36+ messages in thread
    From: Song Liu @ 2022-06-06 22:57 UTC (permalink / raw)
      To: Steven Rostedt
      Cc: Networking, bpf, lkml, Alexei Starovoitov, Daniel Borkmann,
    	Andrii Nakryiko, Kernel Team, Jiri Olsa, Masami Hiramatsu,
    	Song Liu
    
    Hi Steven, 
    
    > On Jun 2, 2022, at 12:37 PM, Song Liu <song@kernel.org> wrote:
    > 
    > Changes v1 => v2:
    > 1. Fix build errors for different config. (kernel test robot)
    > 
    > Kernel Live Patch (livepatch, or klp) and bpf trampoline are important
    > features for modern systems. This set allows the two to work on the same
    > kernel function as the same time.
    > 
    > live patch uses ftrace with IPMODIFY, while bpf trampoline use direct
    > ftrace. Existing policy does not allow the two to attach to the same kernel
    > function. This is changed by fine tuning ftrace IPMODIFY policy, and allows
    > one non-DIRECT IPMODIFY ftrace_ops and one non-IPMODIFY DIRECT ftrace_ops
    > on the same kernel function at the same time. Please see 3/5 for more
    > details on this.
    > 
    > Note that, one of the constraint here is to let bpf trampoline use direct
    > call when it is not working on the same function as live patch. This is
    > achieved by allowing ftrace code to ask bpf trampoline to make changes.
    
    Could you please share your comments on this set? 
    
    Thanks!
    Song
    
    > 
    > Jiri Olsa (1):
    >  bpf, x64: Allow to use caller address from stack
    > 
    > Song Liu (4):
    >  ftrace: allow customized flags for ftrace_direct_multi ftrace_ops
    >  ftrace: add modify_ftrace_direct_multi_nolock
    >  ftrace: introduce FTRACE_OPS_FL_SHARE_IPMODIFY
    >  bpf: trampoline: support FTRACE_OPS_FL_SHARE_IPMODIFY
    > 
    > arch/x86/net/bpf_jit_comp.c |  13 +-
    > include/linux/bpf.h         |   8 ++
    > include/linux/ftrace.h      |  79 +++++++++++
    > kernel/bpf/trampoline.c     | 109 +++++++++++++--
    > kernel/trace/ftrace.c       | 269 +++++++++++++++++++++++++++++++-----
    > 5 files changed, 424 insertions(+), 54 deletions(-)
    > 
    > --
    > 2.30.2
    
    
    ^ permalink raw reply	[flat|nested] 36+ messages in thread
  • [parent not found: <20220602193706.2607681-6-song@kernel.org>]
  • * Re: [PATCH v2 bpf-next 0/5] ftrace: host klp and bpf trampoline together
           [not found] <20220602193706.2607681-1-song@kernel.org>
                       ` (2 preceding siblings ...)
           [not found] ` <20220602193706.2607681-6-song@kernel.org>
    @ 2022-07-11 23:55 ` Steven Rostedt
      2022-07-12  5:15   ` Song Liu
           [not found] ` <20220602193706.2607681-2-song@kernel.org>
      4 siblings, 1 reply; 36+ messages in thread
    From: Steven Rostedt @ 2022-07-11 23:55 UTC (permalink / raw)
      To: Song Liu
      Cc: netdev, bpf, linux-kernel, ast, daniel, andrii, kernel-team,
    	jolsa, mhiramat, Josh Poimboeuf, Jiri Kosina, Miroslav Benes,
    	Petr Mladek, Joe Lawrence, live-patching
    
    I just realized that none of the live kernel patching folks are Cc'd on
    this thread. I think they will care much more about this than I do.
    
    -- Steve
    
    
    On Thu, 2 Jun 2022 12:37:01 -0700
    Song Liu <song@kernel.org> wrote:
    
    > Changes v1 => v2:
    > 1. Fix build errors for different config. (kernel test robot)
    > 
    > Kernel Live Patch (livepatch, or klp) and bpf trampoline are important
    > features for modern systems. This set allows the two to work on the same
    > kernel function as the same time.
    > 
    > live patch uses ftrace with IPMODIFY, while bpf trampoline use direct
    > ftrace. Existing policy does not allow the two to attach to the same kernel
    > function. This is changed by fine tuning ftrace IPMODIFY policy, and allows
    > one non-DIRECT IPMODIFY ftrace_ops and one non-IPMODIFY DIRECT ftrace_ops
    > on the same kernel function at the same time. Please see 3/5 for more
    > details on this.
    > 
    > Note that, one of the constraint here is to let bpf trampoline use direct
    > call when it is not working on the same function as live patch. This is
    > achieved by allowing ftrace code to ask bpf trampoline to make changes.
    > 
    > Jiri Olsa (1):
    >   bpf, x64: Allow to use caller address from stack
    > 
    > Song Liu (4):
    >   ftrace: allow customized flags for ftrace_direct_multi ftrace_ops
    >   ftrace: add modify_ftrace_direct_multi_nolock
    >   ftrace: introduce FTRACE_OPS_FL_SHARE_IPMODIFY
    >   bpf: trampoline: support FTRACE_OPS_FL_SHARE_IPMODIFY
    > 
    >  arch/x86/net/bpf_jit_comp.c |  13 +-
    >  include/linux/bpf.h         |   8 ++
    >  include/linux/ftrace.h      |  79 +++++++++++
    >  kernel/bpf/trampoline.c     | 109 +++++++++++++--
    >  kernel/trace/ftrace.c       | 269 +++++++++++++++++++++++++++++++-----
    >  5 files changed, 424 insertions(+), 54 deletions(-)
    > 
    > --
    > 2.30.2
    
    
    ^ permalink raw reply	[flat|nested] 36+ messages in thread
  • [parent not found: <20220602193706.2607681-2-song@kernel.org>]

  • end of thread, other threads:[~2022-07-15 21:50 UTC | newest]
    
    Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <20220602193706.2607681-1-song@kernel.org>
         [not found] ` <20220602193706.2607681-4-song@kernel.org>
    2022-06-06  8:20   ` [PATCH v2 bpf-next 3/5] ftrace: introduce FTRACE_OPS_FL_SHARE_IPMODIFY Jiri Olsa
    2022-06-06 15:35     ` Song Liu
    2022-07-14  0:33   ` Steven Rostedt
    2022-07-15  0:13     ` Song Liu
    2022-07-15  0:48       ` Steven Rostedt
    2022-07-15  2:04         ` Song Liu
    2022-07-15  2:46           ` Steven Rostedt
    2022-07-15  2:50             ` Song Liu
    2022-07-15 17:42               ` Song Liu
    2022-07-15 19:12                 ` Steven Rostedt
    2022-07-15 19:49                   ` Song Liu
    2022-07-15 19:59                     ` Steven Rostedt
    2022-07-15 20:21                       ` Song Liu
    2022-07-15 21:29                         ` Steven Rostedt
    2022-07-15 21:48                           ` Song Liu
    2022-07-15 21:50                             ` Steven Rostedt
    2022-06-06 22:57 ` [PATCH v2 bpf-next 0/5] ftrace: host klp and bpf trampoline together Song Liu
         [not found] ` <20220602193706.2607681-6-song@kernel.org>
    2022-07-06 19:38   ` [PATCH v2 bpf-next 5/5] bpf: trampoline: support FTRACE_OPS_FL_SHARE_IPMODIFY Steven Rostedt
    2022-07-06 21:37     ` Song Liu
    2022-07-06 21:40       ` Steven Rostedt
    2022-07-06 21:50         ` Song Liu
    2022-07-06 22:15         ` Song Liu
    2022-07-06 22:29           ` Steven Rostedt
    2022-07-07  0:19             ` Song Liu
    2022-07-07  1:18               ` Steven Rostedt
    2022-07-07  2:11                 ` Song Liu
    2022-07-11 23:55 ` [PATCH v2 bpf-next 0/5] ftrace: host klp and bpf trampoline together Steven Rostedt
    2022-07-12  5:15   ` Song Liu
    2022-07-12 13:36     ` Steven Rostedt
         [not found] ` <20220602193706.2607681-2-song@kernel.org>
    2022-07-13 23:18   ` [PATCH v2 bpf-next 1/5] ftrace: allow customized flags for ftrace_direct_multi ftrace_ops Steven Rostedt
    2022-07-14  0:11     ` Song Liu
    2022-07-14  0:38       ` Steven Rostedt
    2022-07-14  1:42         ` Song Liu
    2022-07-14  2:55           ` Steven Rostedt
    2022-07-14  4:37             ` Song Liu
    2022-07-14 13:22               ` Steven Rostedt
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for NNTP newsgroup(s).