le.com/presentation/d/1RLkH3QxdmrcW_t41KllEvUmVsrHMbMOgd6CqAgzR7U4/pub?slide=id.p
[3] https://lwn.net/Articles/688585/
[4] https://lwn.net/Articles/641204/
[5] https://github.com/FlorentRevest/linux-sunxi-cedrus
[6] https://github.com/FlorentRevest/sunxi-cedrus-drv-video
Florent Revest (9):
clk: su
This control is to be used with the new low-level decoder API for MPEG4
to provide additional parameters for the hardware that cannot parse the
input stream.
Some fields are still missing for this structure to be complete.
Signed-off-by: Florent Revest
---
drivers/media/v4l2-core/v4l2-ctrls.c
Now that we have a driver matching "allwinner,sun5i-a13-video-engine" we
can load it.
The "video-engine" node depends on the new sunxi-ng's CCU clock and
reset bindings. This patch also includes a ve_reserved DMA pool for
videobuf2 buffer allocations in sunxi-cedrus
This control is to be used with the new low-level decoder API for
MPEG2 to provide additional parameters for the hardware that cannot parse
the input stream.
Signed-off-by: Florent Revest
---
drivers/media/v4l2-core/v4l2-ctrls.c | 11 +++
drivers/media/v4l2-core/v4l2-ioctl.c | 1
Device Tree bindings for the Allwinner's video engine
Signed-off-by: Florent Revest
---
.../devicetree/bindings/media/sunxi-cedrus.txt | 44 ++
1 file changed, 44 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/sunxi-cedrus.txt
diff --
This patch introduces the support of MPEG2 video decoding to the
sunxi-cedrus video decoder driver.
Signed-off-by: Florent Revest
---
drivers/media/platform/sunxi-cedrus/Makefile | 2 +-
drivers/media/platform/sunxi-cedrus/sunxi_cedrus.c | 26 +++-
.../platform/sunxi-cedrus
Add support for the allwinner's proprietary pixel format described in
details here: http://linux-sunxi.org/File:Ve_tile_format_v1.pdf
This format is similar to V4L2_PIX_FMT_NV12M but the planes are divided
in tiles of 32x32px.
Signed-off-by: Florent Revest
---
include/uapi/linux/videod
This patch introduces the support of MPEG4 video decoding to the
sunxi-cedrus video decoder driver.
Signed-off-by: Florent Revest
---
drivers/media/platform/sunxi-cedrus/Makefile | 3 +-
drivers/media/platform/sunxi-cedrus/sunxi_cedrus.c | 15 +++
.../platform/sunxi-cedrus
Add a new style driver for the clock control unit in Allwinner A13.
Only AVS and VE are supported since they weren't provided until now and are
needed for "sunxi-cedrus".
Signed-off-by: Florent Revest
---
.../devicetree/bindings/clock/sunxi-ccu.txt| 1 +
arch/arm/boo
From: Pawel Osciak
V4L2_CTRL_TYPE_PRIVATE is to be used for private driver compound
controls that use the "ptr" member of struct v4l2_ext_control.
Signed-off-by: Pawel Osciak
Signed-off-by: Jung Zhao
Signed-off-by: Florent Revest
---
drivers/media/v4l2-core/v4l2-ctrls.c | 4 +++
rse engineering on which I based my work comes from the
"Cedrus" project: http://linux-sunxi.org/Cedrus
The driver currently only runs on the A13 and this patch doesn't
include any codec.
Signed-off-by: Florent Revest
---
drivers/media/platform/Kconfig |
On Mon, Apr 15, 2024 at 2:49 PM Masami Hiramatsu (Google)
wrote:
>
> From: Masami Hiramatsu (Google)
>
> To clarify what will be expected on ftrace_regs, add a comment to the
> architecture independent definition of the ftrace_regs.
>
> Signed-off-by: Masami Hiramatsu (Google)
> Acked-by: Mark R
On Wed, Apr 24, 2024 at 2:23 PM Florent Revest wrote:
>
> On Mon, Apr 15, 2024 at 2:49 PM Masami Hiramatsu (Google)
> wrote:
> >
> > From: Masami Hiramatsu (Google)
> >
> > To clarify what will be expected on ftrace_regs, add a comment to the
> > arc
Neat! :) I had a look at mostly the "high level" part (fprobe and
arm64 specific bits) and this seems to be in a good state to me.
Thanks for all that work, that is quite a refactoring :)
On Mon, Apr 15, 2024 at 2:49 PM Masami Hiramatsu (Google)
wrote:
>
> Hi,
>
> Here is the 9th version of the
On Thu, Apr 8, 2021 at 12:03 AM Andrii Nakryiko
wrote:
> On Tue, Apr 6, 2021 at 9:06 AM Florent Revest wrote:
> > On Fri, Mar 26, 2021 at 11:55 PM Andrii Nakryiko
> > wrote:
> > > On Tue, Mar 23, 2021 at 7:23 PM Florent Revest
> > > wrote:
> > > >
On Wed, Apr 7, 2021 at 11:54 PM Andrii Nakryiko
wrote:
> On Tue, Apr 6, 2021 at 8:35 AM Florent Revest wrote:
> > On Fri, Mar 26, 2021 at 11:51 PM Andrii Nakryiko
> > wrote:
> > > On Fri, Mar 26, 2021 at 2:53 PM Andrii Nakryiko
> > > wrote:
> > >
On Mon, Feb 1, 2021 at 11:37 PM Alexei Starovoitov
wrote:
>
> On Mon, Feb 1, 2021 at 2:32 PM Daniel Borkmann wrote:
> >
> > On 1/30/21 12:45 PM, Florent Revest wrote:
> > > On Fri, Jan 29, 2021 at 1:49 PM Daniel Borkmann
> > > wrote:
> > >
rted-by: Daniel Borkmann
Signed-off-by: Florent Revest
Acked-by: KP Singh
---
include/uapi/linux/bpf.h | 8
tools/include/uapi/linux/bpf.h | 8
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index c001766adcb
This needs a new helper that:
- can work in a sleepable context (using sock_gen_cookie)
- takes a struct sock pointer and checks that it's not NULL
Signed-off-by: Florent Revest
Acked-by: KP Singh
---
include/linux/bpf.h| 1 +
include/uapi/linux/bpf.h | 8
k
etons
- rewriting the server/client code with network helpers
- rewriting the cgroup code with test__join_cgroup
- rewriting the error handling code with CHECKs
Signed-off-by: Florent Revest
Acked-by: KP Singh
Acked-by: Andrii Nakryiko
---
tools/testing/selftests/bpf/.gitignore| 1 -
tools/te
storage with 0xFF, this uses both an update_cookie_sockops program and
an update_cookie_tracing program which succesively tag the socket with
0x0F and then 0xF0.
Signed-off-by: Florent Revest
Acked-by: KP Singh
---
.../selftests/bpf/prog_tests/socket_cookie.c | 11 --
.../selftests/bpf/progs
fore,
we need to extract ctx->sk in a variable before checking and
dereferencing it.
Acked-by: KP Singh
Acked-by: Andrii Nakryiko
Signed-off-by: Florent Revest
---
.../testing/selftests/bpf/progs/socket_cookie_prog.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --
On Wed, Feb 10, 2021 at 8:52 PM Andrii Nakryiko
wrote:
>
> On Wed, Feb 10, 2021 at 3:14 AM Florent Revest wrote:
> >
> > This needs a new helper that:
> > - can work in a sleepable context (using sock_gen_cookie)
> > - takes a struct sock pointer and checks that it
On Wed, Jan 27, 2021 at 10:01 PM Andrii Nakryiko
wrote:
>
> On Tue, Jan 26, 2021 at 10:36 AM Florent Revest wrote:
> >
> > This needs a new helper that:
> > - can work in a sleepable context (using sock_gen_cookie)
> > - takes a struct sock pointer and checks tha
On Fri, Jan 29, 2021 at 1:49 PM Daniel Borkmann wrote:
>
> On 1/29/21 11:57 AM, Daniel Borkmann wrote:
> > On 1/27/21 10:01 PM, Andrii Nakryiko wrote:
> >> On Tue, Jan 26, 2021 at 10:36 AM Florent Revest
> >> wrote:
> >>>
> >>> This ne
On Wed, Dec 2, 2020 at 10:18 PM Alexei Starovoitov
wrote:
> I still think that adopting printk/vsnprintf for this instead of
> reinventing the wheel
> is more flexible and easier to maintain long term.
> Almost the same layout can be done with vsnprintf
> with exception of \0 char.
> More meaningf
On Tue, Dec 22, 2020 at 3:18 PM Christoph Hellwig wrote:
>
> FYI, there is a reason why kallsyms_lookup is not exported any more.
> I don't think adding that back through a backdoor is a good idea.
Did you maybe mean kallsyms_lookup_name (the one that looks an address
up based on a symbol name) ?
wrote:
> > > >
> > > > On Thu, Dec 17, 2020 at 09:26:09AM -0800, Yonghong Song wrote:
> > > > >
> > > > >
> > > > > On 12/17/20 7:31 AM, Florent Revest wrote:
> > > > > > On Mon, Dec 14, 2020 at 7:47 AM Yonghon
On Fri, Dec 18, 2020 at 4:20 AM Alexei Starovoitov
wrote:
> As far as 6 arg issue:
> long bpf_snprintf(const char *out, u32 out_size,
> const char *fmt, u32 fmt_size,
> const void *data, u32 data_len);
> Yeah. It won't work as-is, but fmt_size is unnecessary now
On Mon, 2020-12-07 at 10:39 -0800, Randy Dunlap wrote:
> On 12/7/20 1:25 AM, Stephen Rothwell wrote:
> > Hi all,
> >
> > Changes since 20201204:
> >
>
> on i386:
> # CONFIG_NET is not set
>
> ld: kernel/trace/bpf_trace.o: in function `bpf_sock_from_file':
> bpf_trace.c:(.text+0xe23): undefined
This avoids
ld: kernel/trace/bpf_trace.o: in function `bpf_sock_from_file':
bpf_trace.c:(.text+0xe23): undefined reference to `sock_from_file'
When compiling a kernel with BPF and without NET.
Reported-by: Randy Dunlap
Signed-off-by: Florent Revest
---
kernel/trace/bpf_trace.c |
On Mon, 2020-12-07 at 20:55 +0100, Florent Revest wrote:
> This avoids
> ld: kernel/trace/bpf_trace.o: in function `bpf_sock_from_file':
> bpf_trace.c:(.text+0xe23): undefined reference to `sock_from_file'
> When compiling a kernel with BPF and without NET.
>
&g
This avoids
ld: kernel/trace/bpf_trace.o: in function `bpf_sock_from_file':
bpf_trace.c:(.text+0xe23): undefined reference to `sock_from_file'
When compiling a kernel with BPF and without NET.
Reported-by: Randy Dunlap
Signed-off-by: Florent Revest
---
kernel/trace/bpf_trace.c |
On Mon, 2020-12-07 at 14:09 +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the block tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> fs/io_uring.c: In function 'io_shutdown':
> fs/io_uring.c:3782:9: error: too many arguments to function
> 'sock_from_fi
On Mon, 2020-12-07 at 13:33 -0800, Martin KaFai Lau wrote:
> On Mon, Dec 07, 2020 at 09:06:05PM +0100, Florent Revest wrote:
> > This avoids
> > ld: kernel/trace/bpf_trace.o: in function `bpf_sock_from_file':
> > bpf_trace.c:(.text+0xe23): undefined reference to
>
':
bpf_trace.c:(.text+0xe23): undefined reference to `sock_from_file'
When compiling a kernel with BPF and without NET.
Reported-by: kernel test robot
Reported-by: Randy Dunlap
Acked-by: Randy Dunlap
Signed-off-by: Florent Revest
---
include/linux/bpf.h | 1 +
kernel/trace/bpf_tr
attachment strategy and different headers.
Signed-off-by: Florent Revest
---
.../selftests/bpf/prog_tests/socket_cookie.c | 24 +++
.../selftests/bpf/progs/socket_cookie_prog.c | 41 ---
2 files changed, 52 insertions(+), 13 deletions(-)
diff --git a/tools/testing
etons
- rewriting the server/client code with network helpers
- rewriting the cgroup code with test__join_cgroup
- rewriting the error handling code with CHECKs
Signed-off-by: Florent Revest
---
tools/testing/selftests/bpf/Makefile | 3 +-
.../selftests/bpf/prog_tests/socket_cookie.c
On Tue, 2020-12-08 at 12:06 -0800, Randy Dunlap wrote:
> On 12/8/20 9:36 AM, Florent Revest wrote:
> > Acked-by: Randy Dunlap
>
> I would say that I didn't ack this version of the patch (hey,
> it's 3x the size of the v1/v2 patches), but I have just
> rebuilt with
rted-by: Daniel Borkmann
Signed-off-by: Florent Revest
---
include/uapi/linux/bpf.h | 8
tools/include/uapi/linux/bpf.h | 8
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 30b477a26482..ba59309f4d18 10064
types such as LSM.
Signed-off-by: Florent Revest
---
include/linux/bpf.h| 2 ++
include/uapi/linux/bpf.h | 7 +++
kernel/trace/bpf_trace.c | 4
net/core/filter.c | 24
tools/include/uapi/linux/bpf.h | 7 +++
5 files
On Fri, 2020-12-04 at 20:03 +0100, Daniel Borkmann wrote:
> On 12/4/20 7:56 PM, Daniel Borkmann wrote:
> > On 12/3/20 10:33 PM, Florent Revest wrote:
> > > This creates a new helper proto because the existing
> > > bpf_get_socket_cookie_sock_proto has a ARG_PTR_TO_
On Fri, 2020-12-04 at 11:47 -0800, Martin KaFai Lau wrote:
> On Thu, Dec 03, 2020 at 10:33:28PM +0100, Florent Revest wrote:
> > +const struct bpf_func_proto
> > bpf_get_socket_cookie_sock_tracing_proto = {
> > + .func = bpf_get_socket_cookie_sock,
> >
This needs a new helper that:
- can work in a sleepable context (using sock_gen_cookie)
- takes a struct sock pointer and checks that it's not NULL
Signed-off-by: Florent Revest
---
include/linux/bpf.h| 1 +
include/uapi/linux/bpf.h | 8
kernel/trace/bpf_tr
attachment strategy and different headers.
Signed-off-by: Florent Revest
---
.../selftests/bpf/prog_tests/socket_cookie.c | 24 +++
.../selftests/bpf/progs/socket_cookie_prog.c | 41 ---
2 files changed, 52 insertions(+), 13 deletions(-)
diff --git a/tools/testing
rted-by: Daniel Borkmann
Signed-off-by: Florent Revest
---
include/uapi/linux/bpf.h | 8
tools/include/uapi/linux/bpf.h | 8
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index c001766adcbc..0b735c2729b2 10064
etons
- rewriting the server/client code with network helpers
- rewriting the cgroup code with test__join_cgroup
- rewriting the error handling code with CHECKs
Signed-off-by: Florent Revest
---
tools/testing/selftests/bpf/Makefile | 3 +-
.../selftests/bpf/prog_tests/socket_cookie.c
On Wed, Dec 9, 2020 at 5:35 PM Daniel Borkmann wrote:
>
> On 12/9/20 2:26 PM, Florent Revest wrote:
> > This needs two new helpers, one that works in a sleepable context (using
> > sock_gen_cookie which disables/enables preemption) and one that does not
> > (for performan
On Tue, Mar 23, 2021 at 4:21 AM Alexei Starovoitov
wrote:
>
> On Wed, Mar 10, 2021 at 11:02:08PM +0100, Florent Revest wrote:
> >
> > +struct bpf_snprintf_buf {
> > + char buf[MAX_SNPRINTF_MEMCPY][MAX_SNPRINTF_STR_LEN];
> > +};
> > +static DE
ing a per-cpu temporary buffer
- Addressed a few cosmetic changes
Florent Revest (6):
bpf: Factorize bpf_trace_printk and bpf_seq_printf
bpf: Add a ARG_PTR_TO_CONST_STR argument type
bpf: Add a bpf_snprintf helper
libbpf: Initialize the bpf_seq_printf parameters array field by field
l
specifiers to print symbols.
Signed-off-by: Florent Revest
---
kernel/trace/bpf_trace.c | 529 ++-
1 file changed, 244 insertions(+), 285 deletions(-)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 0d23755c2747..0fdca94a3c9c 100644
--- a
: Add bpf_iter support")
Signed-off-by: Florent Revest
---
tools/lib/bpf/bpf_tracing.h | 26 ++
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
index f9ef37707888..d9a4c3f77ff4 100644
--- a/too
This type provides the guarantee that an argument is going to be a const
pointer to somewhere in a read-only map value. It also checks that this
pointer is followed by a zero character before the end of the map value.
Signed-off-by: Florent Revest
---
include/linux/bpf.h | 1 +
kernel/bpf
This exercises most of the format specifiers when things go well.
Signed-off-by: Florent Revest
---
.../selftests/bpf/prog_tests/snprintf.c | 65 +++
.../selftests/bpf/progs/test_snprintf.c | 59 +
2 files changed, 124 insertions(+)
create mode
Similarly to BPF_SEQ_PRINTF, this macro turns variadic arguments into an
array of u64, making it more natural to call the bpf_snprintf helper.
Signed-off-by: Florent Revest
---
tools/lib/bpf/bpf_tracing.h | 18 ++
1 file changed, 18 insertions(+)
diff --git a/tools/lib/bpf
ormat string validation, currently done in formatting
helper calls, into the verifier logic. This makes debugging easier and
also slightly improves the runtime performance.
Signed-off-by: Florent Revest
---
include/linux/bpf.h| 6
include/uapi/linux/bpf.h
On Tue, Mar 16, 2021 at 2:25 AM Andrii Nakryiko
wrote:
>
> On Wed, Mar 10, 2021 at 2:02 PM Florent Revest wrote:
> >
> > The implementation takes inspiration from the existing bpf_trace_printk
> > helper but there are a few differences:
> >
> > To allow for
On Tue, Mar 16, 2021 at 5:36 AM Andrii Nakryiko
wrote:
> On Wed, Mar 10, 2021 at 2:02 PM Florent Revest wrote:
> > +#define ___bpf_build_param0(narg, x)
> > +#define ___bpf_build_param1(narg, x) ___param[narg - 1] = x
> > +#define ___bpf_build_param2(narg, x, args...) _
On Tue, Mar 16, 2021 at 2:03 AM Andrii Nakryiko
wrote:
> On Wed, Mar 10, 2021 at 2:02 PM Florent Revest wrote:
> > + } else if (arg_type == ARG_PTR_TO_CONST_STR) {
> > + struct bpf_map *map = reg->map_ptr;
> > + int map_off, i;
> >
On Wed, Mar 17, 2021 at 1:35 AM Andrii Nakryiko
wrote:
> On Tue, Mar 16, 2021 at 4:58 PM Florent Revest wrote:
> > On Tue, Mar 16, 2021 at 2:03 AM Andrii Nakryiko
> > wrote:
> > > On Wed, Mar 10, 2021 at 2:02 PM Florent Revest
> > > wrote:
&g
On Thu, Apr 15, 2021 at 2:28 AM Andrii Nakryiko
wrote:
> On Wed, Apr 14, 2021 at 11:58 AM Martin KaFai Lau wrote:
> > On Wed, Apr 14, 2021 at 05:56:32PM +0200, Florent Revest wrote:
> > > It is just missing a ';'. This macro is not used by any test yet.
> > >
On Thu, Apr 15, 2021 at 2:38 AM Andrii Nakryiko
wrote:
> On Wed, Apr 14, 2021 at 11:54 AM Florent Revest wrote:
> > +static int try_get_fmt_tmp_buf(char **tmp_buf)
> > +{
> > + struct bpf_printf_buf *bufs;
> > + int used;
> > +
> > + if
On Thu, Apr 15, 2021 at 12:57 AM Andrii Nakryiko
wrote:
>
> On Wed, Apr 14, 2021 at 2:46 AM Florent Revest wrote:
> >
> > On Wed, Apr 14, 2021 at 1:16 AM Andrii Nakryiko
> > wrote:
> > > On Mon, Apr 12, 2021 at 8:38 AM Florent Revest
> > > wrote
On Thu, Apr 15, 2021 at 12:16 AM Andrii Nakryiko
wrote:
>
> On Wed, Apr 14, 2021 at 2:21 AM Florent Revest wrote:
> >
> > On Wed, Apr 14, 2021 at 1:21 AM Andrii Nakryiko
> > wrote:
> > >
> > > On Mon, Apr 12, 2021 at 8:38 AM Florent Revest
> >
On Fri, Apr 16, 2021 at 1:20 AM Andrii Nakryiko
wrote:
>
> On Wed, Apr 14, 2021 at 11:54 AM Florent Revest wrote:
> > +/* Loads an eBPF object calling bpf_snprintf with up to 10 characters of
> > fmt */
> > +static int load_single_snprintf(char *fmt)
&
This type provides the guarantee that an argument is going to be a const
pointer to somewhere in a read-only map value. It also checks that this
pointer is followed by a zero character before the end of the map value.
Signed-off-by: Florent Revest
---
include/linux/bpf.h | 1 +
kernel/bpf
ss of format string validation in the verifier logic. This
makes debugging easier.
Signed-off-by: Florent Revest
---
include/linux/bpf.h| 6
include/uapi/linux/bpf.h | 28 +++
kernel/bpf/helpers.c | 2 ++
kernel/bpf/verifier.c
This exercises most of the format specifiers.
Signed-off-by: Florent Revest
Acked-by: Andrii Nakryiko
---
.../selftests/bpf/prog_tests/snprintf.c | 81 +++
.../selftests/bpf/progs/test_snprintf.c | 74 +
2 files changed, 155 insertions(+)
create
symbols.
Signed-off-by: Florent Revest
---
kernel/trace/bpf_trace.c | 529 ++-
1 file changed, 248 insertions(+), 281 deletions(-)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 0d23755c2747..3ce9aeee6681 100644
--- a/kernel/trace
Similarly to BPF_SEQ_PRINTF, this macro turns variadic arguments into an
array of u64, making it more natural to call the bpf_snprintf helper.
Signed-off-by: Florent Revest
---
tools/lib/bpf/bpf_tracing.h | 18 ++
1 file changed, 18 insertions(+)
diff --git a/tools/lib/bpf
lpers.
- bpf_snprintf's str_size can now be 0
- bpf_snprintf is now exposed to all BPF program types
- We now preempt_disable when using a per-cpu temporary buffer
- Addressed a few cosmetic changes
Florent Revest (6):
bpf: Factorize bpf_trace_printk and bpf_seq_printf
bpf: Add a ARG_PTR_TO
: Add bpf_iter support")
Signed-off-by: Florent Revest
---
tools/lib/bpf/bpf_tracing.h | 40 +++--
1 file changed, 29 insertions(+), 11 deletions(-)
diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
index f9ef37707888..1c2e91ee041d 100644
--- a
On Wed, Apr 14, 2021 at 1:21 AM Andrii Nakryiko
wrote:
>
> On Mon, Apr 12, 2021 at 8:38 AM Florent Revest wrote:
> >
> > This exercises most of the format specifiers.
> >
> > Signed-off-by: Florent Revest
> > Acked-by: Andrii Nakryiko
> > ---
>
&
On Wed, Apr 14, 2021 at 1:16 AM Andrii Nakryiko
wrote:
> On Mon, Apr 12, 2021 at 8:38 AM Florent Revest wrote:
> > +static int check_bpf_snprintf_call(struct bpf_verifier_env *env,
> > + struct bpf_reg_state *regs)
> > +{
> > + st
On Wed, Apr 14, 2021 at 1:01 AM Andrii Nakryiko
wrote:
> On Mon, Apr 12, 2021 at 8:38 AM Florent Revest wrote:
> > +/* Per-cpu temp buffers which can be used by printf-like helpers for %s or
> > %p
> > + */
> > +#define MAX_PRINTF_BUF_LEN 512
>
On Wed, Apr 14, 2021 at 11:56 AM Florent Revest wrote:
> On Wed, Apr 14, 2021 at 1:01 AM Andrii Nakryiko
> wrote:
> > On Mon, Apr 12, 2021 at 8:38 AM Florent Revest wrote:
> > > + err = 0;
> > > +out:
> > > + put_fmt_tmp_buf();
> >
&
On Mon, Apr 12, 2021 at 10:32 PM kernel test robot wrote:
>m68k-linux-ld: kernel/bpf/verifier.o: in function
> `check_helper_call.isra.0':
> >> verifier.c:(.text+0xf79e): undefined reference to `bpf_printf_prepare'
>m68k-linux-ld: kernel/bpf/helpers.o: in function `bpf_base_func_proto':
>
It is just missing a ';'. This macro is not used by any test yet.
Signed-off-by: Florent Revest
---
tools/testing/selftests/bpf/test_progs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_progs.h
b/tools/testing/selftests/bpf/te
Hey Geert! :)
On Wed, Apr 14, 2021 at 8:02 PM Geert Uytterhoeven wrote:
> On Wed, Apr 14, 2021 at 9:41 AM Andrii Nakryiko
> wrote:
> > On Mon, Apr 12, 2021 at 8:38 AM Florent Revest wrote:
> > > + fmt = (char *)fmt_addr + fmt_map_off;
> > > +
> >
&g
types
- We now preempt_disable when using a per-cpu temporary buffer
- Addressed a few cosmetic changes
Florent Revest (6):
bpf: Factorize bpf_trace_printk and bpf_seq_printf
bpf: Add a ARG_PTR_TO_CONST_STR argument type
bpf: Add a bpf_snprintf helper
libbpf: Initialize the bpf_seq_printf
ss of format string validation in the verifier logic. This
makes debugging easier.
Signed-off-by: Florent Revest
---
include/linux/bpf.h| 1 +
include/uapi/linux/bpf.h | 28 +++
kernel/bpf/helpers.c | 50 ++
kernel/bpf/verif
This type provides the guarantee that an argument is going to be a const
pointer to somewhere in a read-only map value. It also checks that this
pointer is followed by a zero character before the end of the map value.
Signed-off-by: Florent Revest
Acked-by: Andrii Nakryiko
---
include/linux
: Add bpf_iter support")
Signed-off-by: Florent Revest
Acked-by: Andrii Nakryiko
---
tools/lib/bpf/bpf_tracing.h | 40 +++--
1 file changed, 29 insertions(+), 11 deletions(-)
diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
index f9
The "positive" part tests all format specifiers when things go well.
The "negative" part makes sure that incorrect format strings fail at
load time.
Signed-off-by: Florent Revest
---
.../selftests/bpf/prog_tests/snprintf.c | 124 ++
.../selftests/bpf/p
symbols.
The implementation is also moved from bpf_trace.c to helpers.c because
the upcoming bpf_snprintf helper will be made available to all BPF
programs and will need it.
Signed-off-by: Florent Revest
---
include/linux/bpf.h | 20 +++
kernel/bpf/helpers.c | 254
Similarly to BPF_SEQ_PRINTF, this macro turns variadic arguments into an
array of u64, making it more natural to call the bpf_snprintf helper.
Signed-off-by: Florent Revest
Acked-by: Andrii Nakryiko
---
tools/lib/bpf/bpf_tracing.h | 18 ++
1 file changed, 18 insertions(+)
diff
[Sorry for the late replies, I'm just back from a long easter break :)]
On Fri, Mar 26, 2021 at 11:51 PM Andrii Nakryiko
wrote:
> On Fri, Mar 26, 2021 at 2:53 PM Andrii Nakryiko
> wrote:
> > On Tue, Mar 23, 2021 at 7:23 PM Florent Revest wrote:
> > > Unfortunately,
On Fri, Mar 26, 2021 at 11:23 PM Andrii Nakryiko
wrote:
> On Tue, Mar 23, 2021 at 7:23 PM Florent Revest wrote:
> > +
> > + map_off = reg->off + reg->var_off.value;
> > + err = map->ops->map_direct_value_addr(map, &map_addr,
>
On Sat, Mar 27, 2021 at 12:05 AM Andrii Nakryiko
wrote:
>
> On Tue, Mar 23, 2021 at 7:23 PM Florent Revest wrote:
> >
> > This exercises most of the format specifiers when things go well.
> >
> > Signed-off-by: Florent Revest
> > ---
>
> Looks good.
On Sat, Mar 27, 2021 at 12:01 AM Andrii Nakryiko
wrote:
>
> On Tue, Mar 23, 2021 at 7:23 PM Florent Revest wrote:
> >
> > When initializing the __param array with a one liner, if all args are
> > const, the initial array value will be placed in the rodata section but
>
On Fri, Mar 26, 2021 at 11:55 PM Andrii Nakryiko
wrote:
> On Tue, Mar 23, 2021 at 7:23 PM Florent Revest wrote:
> > The implementation takes inspiration from the existing bpf_trace_printk
> > helper but there are a few differences:
> >
> > To allow for a large
ssed a few cosmetic changes
Florent Revest (6):
bpf: Factorize bpf_trace_printk and bpf_seq_printf
bpf: Add a ARG_PTR_TO_CONST_STR argument type
bpf: Add a bpf_snprintf helper
libbpf: Initialize the bpf_seq_printf parameters array field by field
libbpf: Introduce a BPF_SNPRINTF he
This type provides the guarantee that an argument is going to be a const
pointer to somewhere in a read-only map value. It also checks that this
pointer is followed by a zero character before the end of the map value.
Signed-off-by: Florent Revest
Acked-by: Andrii Nakryiko
---
include/linux
: Add bpf_iter support")
Signed-off-by: Florent Revest
Acked-by: Andrii Nakryiko
---
tools/lib/bpf/bpf_tracing.h | 40 +++--
1 file changed, 29 insertions(+), 11 deletions(-)
diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h
index f9
ss of format string validation in the verifier logic. This
makes debugging easier.
Signed-off-by: Florent Revest
Acked-by: Andrii Nakryiko
---
include/linux/bpf.h| 1 +
include/uapi/linux/bpf.h | 28 +++
kernel/bpf/helpers.c
Similarly to BPF_SEQ_PRINTF, this macro turns variadic arguments into an
array of u64, making it more natural to call the bpf_snprintf helper.
Signed-off-by: Florent Revest
Acked-by: Andrii Nakryiko
---
tools/lib/bpf/bpf_tracing.h | 18 ++
1 file changed, 18 insertions(+)
diff
symbols.
The implementation is also moved from bpf_trace.c to helpers.c because
the upcoming bpf_snprintf helper will be made available to all BPF
programs and will need it.
Signed-off-by: Florent Revest
---
include/linux/bpf.h | 20 +++
kernel/bpf/helpers.c | 256
The "positive" part tests all format specifiers when things go well.
The "negative" part makes sure that incorrect format strings fail at
load time.
Signed-off-by: Florent Revest
---
.../selftests/bpf/prog_tests/snprintf.c | 125 ++
.../selftests/bpf/p
On Mon, Apr 19, 2021 at 9:34 PM Andrii Nakryiko
wrote:
>
> On Mon, Apr 19, 2021 at 8:52 AM Florent Revest wrote:
> >
> > We have a usecase where we want to audit symbol names (if available) in
> > callback registration hooks. (ex: fentry/nf_register_net_hook)
>
On Tue, Apr 20, 2021 at 12:54 AM Alexei Starovoitov
wrote:
>
> On Mon, Apr 19, 2021 at 05:52:39PM +0200, Florent Revest wrote:
> > This type provides the guarantee that an argument is going to be a const
> > pointer to somewhere in a read-only map value. It also checks that t
1 - 100 of 186 matches
Mail list logo