Re: [PATCH bpf-next 1/2] bpf: Introduce bpf_probe_write_user_registered()

2024-04-09 Thread Alexei Starovoitov
On Tue, Apr 9, 2024 at 1:11 AM Marco Elver wrote: > > On Mon, 8 Apr 2024 at 20:24, Alexei Starovoitov > wrote: > > > > On Mon, Apr 8, 2024 at 2:30 AM Marco Elver wrote: > > > > > > On Fri, 5 Apr 2024 at 22:28, Andrii Nakryiko > > > wrote: >

Re: [PATCH bpf-next 1/2] bpf: Introduce bpf_probe_write_user_registered()

2024-04-08 Thread Alexei Starovoitov
On Mon, Apr 8, 2024 at 2:30 AM Marco Elver wrote: > > On Fri, 5 Apr 2024 at 22:28, Andrii Nakryiko > wrote: > > > > On Fri, Apr 5, 2024 at 1:28 AM Marco Elver wrote: > > > > > > On Fri, 5 Apr 2024 at 01:23, Alexei Starovoitov > > > wrote: &g

Re: [PATCH bpf-next 1/2] bpf: Introduce bpf_probe_write_user_registered()

2024-04-04 Thread Alexei Starovoitov
On Thu, Apr 4, 2024 at 12:02 PM Marco Elver wrote: > > With all the known caveats, tracing BPF programs may directly write to > user-space memory with the bpf_probe_write_user() helper. Memory safety > is an obvious problem when using this helper, since it is too easy to > overwrite memory across

Re: [PATCH bpf v3] xsk: improve documentation for AF_XDP

2019-10-23 Thread Alexei Starovoitov
On Mon, Oct 21, 2019 at 1:57 AM Magnus Karlsson wrote: > > Added sections on all the bind flags, libbpf, all the setsockopts and > all the getsockopts. Also updated the document to reflect the latest > features and to correct some spelling errors. > > v1 -> v2: > * Updated XDP program with latest

Re: [PATCH bpf v2] xsk: improve documentation for AF_XDP

2019-10-20 Thread Alexei Starovoitov
On Sun, Oct 20, 2019 at 10:13:49AM +0200, Magnus Karlsson wrote: > On Sat, Oct 19, 2019 at 11:48 AM Alexei Starovoitov > wrote: > > > > On Fri, Oct 18, 2019 at 11:33:40AM +0200, Magnus Karlsson wrote: > > > + > > > + #include > > > + #incl

Re: [PATCH bpf v2] xsk: improve documentation for AF_XDP

2019-10-18 Thread Alexei Starovoitov
On Fri, Oct 18, 2019 at 11:33:40AM +0200, Magnus Karlsson wrote: > + > + #include > + #include "bpf_helpers.h" > + > + #define MAX_SOCKS 16 > + > + struct { > +__uint(type, BPF_MAP_TYPE_XSKMAP); > +__uint(max_entries, MAX_SOCKS); > +__uint(key_size, sizeof(int)); >

Re: [PATCH bpf] xsk: improve documentation for AF_XDP

2019-10-12 Thread Alexei Starovoitov
On Thu, Oct 10, 2019 at 1:12 AM Magnus Karlsson wrote: > > Added sections on all the bind flags, libbpf, all the setsockopts and > all the getsockopts. Also updated the document to reflect the latest > features and to correct some spelling errors. > > Signed-off-by: Magnus Karlsson thanks for th

Re: [PATCH v2 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-02-18 Thread Alexei Starovoitov
On Tue, Feb 19, 2019 at 01:14:11PM +0900, Masahiro Yamada wrote: > > I was able to compile it in-tree > but it makes the incremental build extremely slow. > > (Here, the incremental build means > "make" without changing any code after the full build.) > > Before this patch, "make -j8" took 11 se

Re: [PATCH v2 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-02-14 Thread Alexei Starovoitov
On Mon, Feb 11, 2019 at 09:35:59AM -0500, Joel Fernandes (Google) wrote: > Introduce in-kernel headers and other artifacts which are made available > as an archive through proc (/proc/kheaders.txz file). This archive makes > it possible to build kernel modules, run eBPF programs, and other > tracin

Re: [PATCH bpf-next v2 0/3] bpf: add boot parameters for sysctl knobs

2018-05-25 Thread Alexei Starovoitov
On Fri, May 25, 2018 at 06:50:09PM +0200, Eugene Syromiatnikov wrote: > On Thu, May 24, 2018 at 04:34:51PM -0700, Alexei Starovoitov wrote: > > On Thu, May 24, 2018 at 09:41:08AM +0200, Jesper Dangaard Brouer wrote: > > > On Wed, 23 May 2018 15:02:45 -0700 > > >

Re: [PATCH bpf-next v2 0/3] bpf: add boot parameters for sysctl knobs

2018-05-24 Thread Alexei Starovoitov
On Thu, May 24, 2018 at 09:41:08AM +0200, Jesper Dangaard Brouer wrote: > On Wed, 23 May 2018 15:02:45 -0700 > Alexei Starovoitov wrote: > > > On Wed, May 23, 2018 at 02:18:19PM +0200, Eugene Syromiatnikov wrote: > > > Some BPF sysctl knobs affect the loading of

Re: [PATCH bpf-next v2 0/3] bpf: add boot parameters for sysctl knobs

2018-05-23 Thread Alexei Starovoitov
On Wed, May 23, 2018 at 02:18:19PM +0200, Eugene Syromiatnikov wrote: > Some BPF sysctl knobs affect the loading of BPF programs, and during > system boot/init stages these sysctls are not yet configured. > A concrete example is systemd, that has implemented loading of BPF > programs. > > Thus, to

Re: [PATCH 0/3] bpf: add boot parameters for sysctl knobs

2018-05-21 Thread Alexei Starovoitov
On Mon, May 21, 2018 at 02:29:30PM +0200, Eugene Syromiatnikov wrote: > Hello. > > This patch set adds ability to set default values for > kernel.unprivileged_bpf_disable, net.core.bpf_jit_harden, > net.core.bpf_jit_kallsyms sysctl knobs as well as option to override > them via a boot-time kernel

Re: [bpf-next PATCH 0/5] bpf, doc: convert Documentation/bpf to RST-formatting

2018-05-14 Thread Alexei Starovoitov
On Mon, May 14, 2018 at 10:57:25PM -0700, Y Song wrote: > On Mon, May 14, 2018 at 6:42 AM, Jesper Dangaard Brouer > wrote: > > The kernel is moving files under Documentation to use the RST > > (reStructuredText) format and Sphinx [1]. This patchset converts the > > files under Documentation/bpf/

Re: [PATCH bpf-next v3 6/8] bpf: add documentation for eBPF helpers (42-50)

2018-04-18 Thread Alexei Starovoitov
_buff. Cookie belongs to the socket and generated for the socket. Would be good to explain that cookie is stable for the life of the socket. For the rest: Acked-by: Alexei Starovoitov -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH bpf-next v3 5/8] bpf: add documentation for eBPF helpers (33-41)

2018-04-18 Thread Alexei Starovoitov
el: > > - bpf_get_hash_recalc() > - bpf_skb_change_tail() > - bpf_skb_pull_data() > - bpf_csum_update() > - bpf_set_hash_invalid() > - bpf_get_numa_node_id() > - bpf_set_hash() > - bpf_skb_adjust_room() > - bpf_xdp_adjust_meta() > > Cc: Daniel Borkmann > Signed-off-by: Q

Re: [PATCH bpf-next v3 4/8] bpf: add documentation for eBPF helpers (23-32)

2018-04-18 Thread Alexei Starovoitov
; - bpf_skb_load_bytes(): Fix comment on current use cases for the helper. > > Cc: Daniel Borkmann > Signed-off-by: Quentin Monnet Acked-by: Alexei Starovoitov -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH bpf-next v3 3/8] bpf: add documentation for eBPF helpers (12-22)

2018-04-18 Thread Alexei Starovoitov
as a struct pt_reg. Remove > the long yet incomplete example. > - bpf_get_stackid(): Add a note about PERF_MAX_STACK_DEPTH being > configurable. > > Cc: Alexei Starovoitov > Signed-off-by: Quentin Monnet looks great. Acked-by: Alexei Starovoitov -- To unsubscribe from

Re: [PATCH bpf-next v3 2/8] bpf: add documentation for eBPF helpers (01-11)

2018-04-17 Thread Alexei Starovoitov
g notice when the helper is used. Edit example. > - bpf_tail_call(): Improve comment on stack inheritance. > - bpf_clone_redirect(): Improve description of BPF_F_INGRESS flag. > > Cc: Alexei Starovoitov > Signed-off-by: Quentin Monnet Acked-by: Alexei Starovoitov -- T

Re: [RFC bpf-next v2 4/8] bpf: add documentation for eBPF helpers (23-32)

2018-04-12 Thread Alexei Starovoitov
On Tue, Apr 10, 2018 at 03:41:53PM +0100, Quentin Monnet wrote: > Add documentation for eBPF helper functions to bpf.h user header file. > This documentation can be parsed with the Python script provided in > another commit of the patch series, in order to provide a RST document > that can later be

Re: [RFC bpf-next v2 3/8] bpf: add documentation for eBPF helpers (12-22)

2018-04-10 Thread Alexei Starovoitov
gt; > - bpf_get_current_pid_tgid() > - bpf_get_current_uid_gid() > - bpf_get_current_comm() > - bpf_skb_vlan_push() > - bpf_skb_vlan_pop() > - bpf_skb_get_tunnel_key() > - bpf_skb_set_tunnel_key() > - bpf_redirect() > - bpf_perf_event_output() > - bpf_get_stackid() > - b

Re: [RFC bpf-next v2 1/8] bpf: add script and prepare bpf.h for new helpers documentation

2018-04-10 Thread Alexei Starovoitov
On Tue, Apr 10, 2018 at 03:41:50PM +0100, Quentin Monnet wrote: > Remove previous "overview" of eBPF helpers from user bpf.h header. > Replace it by a comment explaining how to process the new documentation > (to come in following patches) with a Python script to produce RST, then > man page docume

Re: [RFC bpf-next v2 2/8] bpf: add documentation for eBPF helpers (01-11)

2018-04-10 Thread Alexei Starovoitov
ei: > > - bpf_map_lookup_elem() > - bpf_map_update_elem() > - bpf_map_delete_elem() > - bpf_probe_read() > - bpf_ktime_get_ns() > - bpf_trace_printk() > - bpf_skb_store_bytes() > - bpf_l3_csum_replace() > - bpf_l4_csum_replace() > - bpf_tail_call() > - bpf_clone_redir

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-09 Thread Alexei Starovoitov
On Mon, Apr 09, 2018 at 02:25:26PM +0100, Quentin Monnet wrote: > > Anyway, I am fine with keeping just signatures, descriptions and return > values for now. I will submit a new version with only those items. Thank you. Could you also split it into few patches? include/uapi/linux/bpf.h | 2237

Re: [RFC bpf-next] bpf: document eBPF helpers and add a script to generate man page

2018-04-08 Thread Alexei Starovoitov
On Fri, Apr 06, 2018 at 12:11:22PM +0100, Quentin Monnet wrote: > eBPF helper functions can be called from within eBPF programs to perform > a variety of tasks that would be otherwise hard or impossible to do with > eBPF itself. There is a growing number of such helper functions in the > kernel, bu

Re: [iovisor-dev] XDP (eXpress Data Path) documentation

2016-09-20 Thread Alexei Starovoitov
On Tue, Sep 20, 2016 at 11:08:44AM +0200, Jesper Dangaard Brouer via iovisor-dev wrote: > Hi all, > > As promised, I've started documenting the XDP eXpress Data Path): > > [1] > https://prototype-kernel.readthedocs.io/en/latest/networking/XDP/index.html > > IMHO the documentation have reached

Re: [PATCH 0/5] Networking cgroup controller

2016-08-25 Thread Alexei Starovoitov
On Thu, Aug 25, 2016 at 11:56:27AM -0700, Mahesh Bandewar (महेश बंडेवार) wrote: > On Thu, Aug 25, 2016 at 11:04 AM, Alexei Starovoitov > wrote: > > On Thu, Aug 25, 2016 at 08:54:19AM -0700, Mahesh Bandewar (महेश बंडेवार) > > wrote: > >> On Wed, Aug 24, 2016 a

Re: [PATCH 0/5] Networking cgroup controller

2016-08-25 Thread Alexei Starovoitov
On Thu, Aug 25, 2016 at 08:54:19AM -0700, Mahesh Bandewar (महेश बंडेवार) wrote: > On Wed, Aug 24, 2016 at 2:03 PM, Tejun Heo wrote: > > Hello, Anoop. > > > > On Wed, Aug 10, 2016 at 05:53:13PM -0700, Anoop Naravaram wrote: > >> This patchset introduces a cgroup controller for the networking subsys

Re: [PATCH 2/5] net: add bind/listen ranges to net cgroup

2016-08-16 Thread Alexei Starovoitov
On Mon, Aug 15, 2016 at 12:05:40PM -0700, Mahesh Bandewar wrote: > On Fri, Aug 12, 2016 at 9:29 PM, Alexei Starovoitov > wrote: > [...] > >> +static bool range_in_ranges(struct net_range *r, struct net_ranges *rs) > >> +{ > >> + int ri; > >> + >

Re: [PATCH 3/5] net: add udp limit to net cgroup

2016-08-12 Thread Alexei Starovoitov
On Wed, Aug 10, 2016 at 05:53:16PM -0700, Anoop Naravaram wrote: > udp port limit > -- > This property controls the limit of udp ports that can be used by the > processes in a cgroup. The controller manages udp statistics (usage, > limit, etc) for each cgroup. Every cgroup also keeps tr

Re: [PATCH 5/5] net: add test for net cgroup

2016-08-12 Thread Alexei Starovoitov
On Wed, Aug 10, 2016 at 05:53:18PM -0700, Anoop Naravaram wrote: > Created a file scripts/cgroup/net_cgroup_test.py that tests the > functionality of the net cgroup as described in previous commit logs. > > Signed-off-by: Anoop Naravaram > --- > scripts/cgroup/net_cgroup_test.py | 359 > +++

Re: [PATCH 2/5] net: add bind/listen ranges to net cgroup

2016-08-12 Thread Alexei Starovoitov
On Wed, Aug 10, 2016 at 05:53:15PM -0700, Anoop Naravaram wrote: > bind port ranges > > This property controls which ports the processes in a cgroup are allowed > to bind to. If a process in a cgroup tries to bind a socket to a port > that is not within the range(s) permitted by th

Re: [PATCH] bpf: doc: "neg" opcode has no operands

2016-03-28 Thread Alexei Starovoitov
On Mon, Mar 28, 2016 at 02:56:47PM -0700, Kees Cook wrote: > From: Dave Anderson > > Fixes a copy-paste-o in the BPF opcode table: "neg" takes no arguments > and thus has no addressing modes. > > Signed-off-by: Dave Anderson > Signed-off-by: Kees Cook Acked