ngineering 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 <florent.rev...@free-electrons.com>
---
driv
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 <florent.rev...@free-electrons.com>
---
.../devicetree/bindings/clo
From: Pawel Osciak <posc...@chromium.org>
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 <posc...@chromium.org>
Signed-off-by: Jung Zhao <jung.z...@rock-chips.co
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 <florent.rev...@free-electrons.
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.
Si
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 <florent.rev...@free-electrons.com>
---
drivers/media/v4l2-core/v4l2-ctrls.c | 11 +++
drivers
Device Tree bindings for the Allwinner's video engine
Signed-off-by: Florent Revest <florent.rev...@free-electrons.com>
---
.../devicetree/bindings/media/sunxi-cedrus.txt | 44 ++
1 file changed, 44 insertions(+)
create mode 100644 Documentation/devicetree/bindings
This patch introduces the support of MPEG2 video decoding to the
sunxi-cedrus video decoder driver.
Signed-off-by: Florent Revest <florent.rev...@free-electrons.com>
---
drivers/media/platform/sunxi-cedrus/Makefile | 2 +-
drivers/media/platform/sunxi-cedrus/sunxi_cedrus.c
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: sunxi-ng: Add a couple
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 <florent.rev...@free-electrons.
This patch introduces the support of MPEG4 video decoding to the
sunxi-cedrus video decoder driver.
Signed-off-by: Florent Revest <florent.rev...@free-electrons.com>
---
drivers/media/platform/sunxi-cedrus/Makefile | 3 +-
drivers/media/platform/sunxi-cedrus/sunxi_cedrus.c
On Thu, 2017-08-31 at 11:23 +0200, Christoffer Dall wrote:
> > diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c
> > index 2ea21da..1d2d3df 100644
> > --- a/virt/kvm/arm/mmu.c
> > +++ b/virt/kvm/arm/mmu.c
> > @@ -772,6 +772,11 @@ static void stage2_unmap_memslot(struct kvm
> > *kvm,
> >
On Thu, 2017-08-31 at 11:26 +0200, Christoffer Dall wrote:
> I wonder if this should be split into two series; one that sets up
> anything you may need from KVM, and another one that uses that for
> UEFI.
>
> There's a lot KVM and UEFI intertwined logic and assumptions in patch
> 10, which makes
On Fri, 2017-09-22 at 14:44 -0700, Ard Biesheuvel wrote:
> From the EFI side, there are some minor concerns on my part regarding
> the calling convention, and the fact that we can no longer invoke
> runtime services from a kernel running at EL1, but those all seem
> fixable. I will respond to the
Hi,
I just realised that my email client was not configured correctly and
the confidential disclaimer at the bottom of my emails obviously don't
apply. Sorry about that.
Florent
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If
ion
- kvm_vm_create_vcpu: simple alias of kvm_vm_ioctl_create_vcpu for clarity
Signed-off-by: Florent Revest <florent.rev...@arm.com>
---
include/linux/kvm_host.h | 3 +++
virt/kvm/kvm_main.c | 10 ++
2 files changed, 13 insertions(+)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_hos
-by: Florent Revest <florent.rev...@arm.com>
---
arch/arm/include/asm/efi.h | 2 ++
arch/arm64/include/asm/efi.h | 2 ++
arch/x86/include/asm/efi.h | 2 ++
drivers/firmware/efi/arm-runtime.c | 3 +--
drivers/firmware/efi/efi.c | 3 +++
5 files changed, 10 insertions
Identifier
is returned in x0. This implements the behavior defined by SMCCC and paves
the way for other hvc handlers.
Signed-off-by: Florent Revest <florent.rev...@arm.com>
---
arch/arm/include/asm/kvm_psci.h | 1 +
arch/arm64/include/asm/kvm_psci.h | 1 +
arch/arm64/kvm/handle_
se patches apply cleanly on the Linus' v4.13-rc6 tag and have no other
dependencies.
Florent Revest (11):
arm64: Add an SMCCC function IDs header
KVM: arm64: Return an Unknown ID on unhandled HVC
KVM: Allow VM lifecycle management without userspace
KVM, arm, arm64: Offer PAs to IPAs
ke it less
misleading.
Signed-off-by: Florent Revest <florent.rev...@arm.com>
---
arch/arm64/include/asm/kvm_host.h | 2 ++
virt/kvm/arm/arm.c| 5 ++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/include/asm/kvm_host.h
b/arch/arm64/include/asm/
-by: Florent Revest <florent.rev...@arm.com>
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c | 28
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index dd10d3b..15a0a8d 100644
--- a/include
ote: this patch should have pretty much no performance impact on the
critical path of traditional VMs since only one unlikely branch had to be
added to the page fault handler.
Signed-off-by: Florent Revest <florent.rev...@arm.com>
---
arch/arm64/include/asm/kvm_host.h | 1 +
virt/kvm/
This patch simply encloses the userspace-specific pieces of code of
kvm_main in conditions checking if kvm->mm is present and modifies the
prototype of kvm_create_vm to enable NULL mm.
Signed-off-by: Florent Revest <florent.rev...@arm.com>
---
vir
on arm and arm64, the
initialization of KVM system registers, is also rescheduled to be
effective as soon as KVM's core is initialized.
Signed-off-by: Florent Revest <florent.rev...@arm.com>
---
arch/arm/include/asm/kvm_coproc.h| 3 +++
arch/arm/include/asm/kvm_host.h | 1 +
arch/a
when calling an EFI Runtime Service. Indeed, the
buffers arguments are just pushed onto a stack in a data page without any
regards to the ARM Calling Convention alignments.
Signed-off-by: Florent Revest <florent.rev...@arm.com>
---
arch/arm/include/asm/efi.h | 5 +
arch
handle_smc. However, this would
require some level of knowledge of the SMC calls arguments and EFI
Runtime Services implementations.
Signed-off-by: Florent Revest <florent.rev...@arm.com>
---
arch/arm64/include/asm/kvm_emulate.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch
)
The document also defines standard return values to be written into x0
after a hypercall handling. Once again, those macros can potentially be
used from both the hypervisor or the guest.
Signed-off-by: Florent Revest <florent.rev...@arm.com>
---
include/linux/smccc_fn.
Identifier
is returned in x0. This implements the behavior defined by SMCCC and paves
the way for other hvc handlers.
Signed-off-by: Florent Revest
---
arch/arm/include/asm/kvm_psci.h | 1 +
arch/arm64/include/asm/kvm_psci.h | 1 +
arch/arm64/kvm/handle_exit.c | 24
se patches apply cleanly on the Linus' v4.13-rc6 tag and have no other
dependencies.
Florent Revest (11):
arm64: Add an SMCCC function IDs header
KVM: arm64: Return an Unknown ID on unhandled HVC
KVM: Allow VM lifecycle management without userspace
KVM, arm, arm64: Offer PAs to IPAs
ion
- kvm_vm_create_vcpu: simple alias of kvm_vm_ioctl_create_vcpu for clarity
Signed-off-by: Florent Revest
---
include/linux/kvm_host.h | 3 +++
virt/kvm/kvm_main.c | 10 ++
2 files changed, 13 insertions(+)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 21a6fd6..dd10d3b 100
-by: Florent Revest
---
arch/arm/include/asm/efi.h | 2 ++
arch/arm64/include/asm/efi.h | 2 ++
arch/x86/include/asm/efi.h | 2 ++
drivers/firmware/efi/arm-runtime.c | 3 +--
drivers/firmware/efi/efi.c | 3 +++
5 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch
handle_smc. However, this would
require some level of knowledge of the SMC calls arguments and EFI
Runtime Services implementations.
Signed-off-by: Florent Revest
---
arch/arm64/include/asm/kvm_emulate.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/include/asm/kvm_emulate.h
b
when calling an EFI Runtime Service. Indeed, the
buffers arguments are just pushed onto a stack in a data page without any
regards to the ARM Calling Convention alignments.
Signed-off-by: Florent Revest
---
arch/arm/include/asm/efi.h | 5 +
arch/arm64/include/asm/efi.h
on arm and arm64, the
initialization of KVM system registers, is also rescheduled to be
effective as soon as KVM's core is initialized.
Signed-off-by: Florent Revest
---
arch/arm/include/asm/kvm_coproc.h| 3 +++
arch/arm/include/asm/kvm_host.h | 1 +
arch/arm/kvm/coproc.c
ote: this patch should have pretty much no performance impact on the
critical path of traditional VMs since only one unlikely branch had to be
added to the page fault handler.
Signed-off-by: Florent Revest
---
arch/arm64/include/asm/kvm_host.h | 1 +
virt/kvm/arm/mmu.c|
-by: Florent Revest
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c | 28
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index dd10d3b..15a0a8d 100644
--- a/include/linux/kvm_host.h
+++ b/include
This patch simply encloses the userspace-specific pieces of code of
kvm_main in conditions checking if kvm->mm is present and modifies the
prototype of kvm_create_vm to enable NULL mm.
Signed-off-by: Florent Revest
---
virt/kvm/kvm_main.c | 64 ++
ke it less
misleading.
Signed-off-by: Florent Revest
---
arch/arm64/include/asm/kvm_host.h | 2 ++
virt/kvm/arm/arm.c| 5 ++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/include/asm/kvm_host.h
b/arch/arm64/include/asm/kvm_host.h
index 65aab35..07b7
)
The document also defines standard return values to be written into x0
after a hypercall handling. Once again, those macros can potentially be
used from both the hypervisor or the guest.
Signed-off-by: Florent Revest
---
include/linux/smccc_fn.h | 50
Hi,
I just realised that my email client was not configured correctly and
the confidential disclaimer at the bottom of my emails obviously don't
apply. Sorry about that.
Florent
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If
On Wed, Jan 20, 2021 at 8:04 PM Alexei Starovoitov
wrote:
>
> On Wed, Jan 20, 2021 at 9:08 AM KP Singh wrote:
> >
> > On Tue, Jan 19, 2021 at 5:00 PM Florent Revest wrote:
> > >
> > > This builds up on the existing socket cookie test which checks whether
>
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 perform
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
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 100644
---
- 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 | 82
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_trace.c
On Wed, Jan 20, 2021 at 8:06 PM Florent Revest wrote:
>
> On Wed, Jan 20, 2021 at 8:04 PM Alexei Starovoitov
> wrote:
> >
> > On Wed, Jan 20, 2021 at 9:08 AM KP Singh wrote:
> > >
> > > On Tue, Jan 19, 2021 at 5:00 PM Florent Revest
> > > wrote
On Thu, Jan 21, 2021 at 8:55 AM Andrii Nakryiko
wrote:
>
> On Tue, Jan 19, 2021 at 8:00 AM Florent Revest wrote:
> >
> > Currently, the selftest for the BPF socket_cookie helpers is built and
> > run independently from test_progs. It's easy to forget and hard to
> >
Reviewed-by: Florent Revest
On Wed, 2020-09-16 at 12:05 +, KP Singh wrote:
> From: KP Singh
>
> ima_file_hash can be called when there is no iint->ima_hash available
> even though the inode exists in the integrity cache.
>
> An example where this can happen (s
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
On Tue, 2020-12-08 at 23:08 +0100, KP Singh wrote:
> My understanding is you can simply always call sock_gen_cookie and
> not have two protos.
>
> This will disable preemption in sleepable programs and not have any
> effect in non-sleepable programs since preemption will already be
> disabled.
- 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 | 82
types such as LSM.
Signed-off-by: Florent Revest
---
include/linux/bpf.h| 1 +
include/uapi/linux/bpf.h | 7 +++
kernel/trace/bpf_trace.c | 2 ++
net/core/filter.c | 12
tools/include/uapi/linux/bpf.h | 7 +++
5 files changed, 29
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
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 100644
---
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
On Mon, Dec 14, 2020 at 7:47 AM Yonghong Song wrote:
> On 12/11/20 6:40 AM, Florent Revest wrote:
> > 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
From: Florent Revest
Iterators are currently used to expose kernel information to userspace
over fast procfs-like files but iterators could also be used to
initialize local storage. For example, the task_file iterator could be
used to store associations between processes and sockets
From: Florent Revest
eBPF programs can already check whether a file is a socket using
file->f_op == _file_ops but they can not convert file->private_data
into a struct socket with BTF information. For that, we need a new
helper that is essentially just a wrapper for sock_fro
From: Florent Revest
Currently, the sock_from_file prototype takes an "err" pointer that is
either not set or set to -ENOTSOCK IFF the returned socket is NULL. This
makes the error redundant and it is ignored by a few callers.
This patch simplifies the API by letting callers deduce
From: Florent Revest
The eBPF program iterates over all files and tasks. For all socket
files, it stores the tgid of the last task it encountered with a handle
to that socket. This is a heuristic for finding the "owner" of a socket
similar to what's done by lsof, ss, netsta
From: Florent Revest
The eBPF program iterates over all entries (well, only one) of a socket
local storage map and deletes them all. The test makes sure that the
entry is indeed deleted.
Signed-off-by: Florent Revest
---
.../selftests/bpf/prog_tests/bpf_iter.c | 64
From: Florent Revest
While eBPF programs can check whether a file is a socket by file->f_op
== _file_ops, they cannot convert the void private_data pointer
to a struct socket BTF pointer. In order to do this a new helper
wrapping sock_from_file is added.
This is useful to tracing progr
From: Florent Revest
Iterators are currently used to expose kernel information to userspace
over fast procfs-like files but iterators could also be used to
manipulate local storage. For example, the task_file iterator could be
used to initialize a socket local storage with associations between
On Thu, 2020-11-12 at 20:28 +, Al Viro wrote:
> On Thu, Nov 12, 2020 at 09:09:44PM +0100, Florent Revest wrote:
> > From: Florent Revest
> >
> > eBPF programs can already check whether a file is a socket using
> > file->f_op == _file_ops but they can not c
On Thu, 2020-11-12 at 13:57 -0800, Martin KaFai Lau wrote:
> Test(s) is needed. e.g. iterating a bpf_sk_storage_map and also
> calling bpf_sk_storage_get/delete.
>
> I would expect to see another test/example showing how it works end-
> to-end to solve the problem you have in hand.
> This patch
On Sat, 2020-11-28 at 17:07 -0800, Alexei Starovoitov wrote:
> On Thu, Nov 26, 2020 at 05:57:47PM +0100, Florent Revest wrote:
> > This helper exposes the kallsyms_lookup function to eBPF tracing
> > programs. This can be used to retrieve the name of the symbol at an
> > addre
or to selectively delete local storage values.
Signed-off-by: Florent Revest
Acked-by: Martin KaFai Lau
Acked-by: KP Singh
---
net/core/bpf_sk_storage.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/bpf_sk_storage.c b/net/core/bpf_sk_storage.c
index a32037daa933..4edd033e899c
nformation could be used from a cgroup_skb/*gress hook to try to
associate network traffic with processes.
The test makes sure that a socket it created is tagged with prog_tests's
pid.
Signed-off-by: Florent Revest
Acked-by: Yonghong Song
Acked-by: Martin KaFai Lau
---
.../selftests/bpf/
on whether the returned socket is NULL or not.
Suggested-by: Al Viro
Signed-off-by: Florent Revest
Reviewed-by: KP Singh
---
fs/eventpoll.c | 3 +--
fs/io_uring.c| 16
include/linux/net.h | 2 +-
net/core/netclassid_cgroup.c | 3 +--
in the local storage.
Signed-off-by: Florent Revest
Acked-by: Yonghong Song
Acked-by: Martin KaFai Lau
---
.../selftests/bpf/prog_tests/bpf_iter.c| 18 --
.../progs/bpf_iter_bpf_sk_storage_helpers.c| 18 ++
2 files changed, 34 insertions(+), 2
The eBPF program iterates over all entries (well, only one) of a socket
local storage map and deletes them all. The test makes sure that the
entry is indeed deleted.
Signed-off-by: Florent Revest
Acked-by: Martin KaFai Lau
---
.../selftests/bpf/prog_tests/bpf_iter.c | 64
pes
inheriting this set of helpers such as iterators or LSM programs.
Signed-off-by: Florent Revest
Acked-by: KP Singh
Acked-by: Martin KaFai Lau
---
include/uapi/linux/bpf.h | 9 +
kernel/trace/bpf_trace.c | 20
scripts/bpf_helpers_doc.py |
On Thu, 2020-12-03 at 18:05 -0800, Martin KaFai Lau wrote:
> On Wed, Dec 02, 2020 at 09:55:27PM +0100, Florent Revest wrote:
> > This extends the existing bpf_sk_storage_get test where a socket is
> > created and tagged with its creator's pid by a task_file iterator.
> >
>
On Mon, 2020-11-30 at 18:41 -0800, Alexei Starovoitov wrote:
> On Mon, Nov 30, 2020 at 05:23:22PM +0100, Florent Revest wrote:
> > On Sat, 2020-11-28 at 17:07 -0800, Alexei Starovoitov wrote:
> > > Looks like debug-only helper.
> > > I cannot think of a way to use in
On Tue, 2020-12-01 at 16:55 -0800, Andrii Nakryiko wrote:
> On Fri, Nov 27, 2020 at 8:09 AM Yonghong Song wrote:
> >
> >
> > On 11/27/20 3:20 AM, KP Singh wrote:
> > > On Fri, Nov 27, 2020 at 8:35 AM Yonghong Song wrote:
> > > >
> > > > In this case, module name may be truncated and user did
The eBPF program iterates over all entries (well, only one) of a socket
local storage map and deletes them all. The test makes sure that the
entry is indeed deleted.
Signed-off-by: Florent Revest
Acked-by: Martin KaFai Lau
---
.../selftests/bpf/prog_tests/bpf_iter.c | 64
in the local storage.
Signed-off-by: Florent Revest
Acked-by: Yonghong Song
---
.../selftests/bpf/prog_tests/bpf_iter.c| 13 +
.../progs/bpf_iter_bpf_sk_storage_helpers.c| 18 ++
2 files changed, 31 insertions(+)
diff --git a/tools/testing/selftests/bpf
nformation could be used from a cgroup_skb/*gress hook to try to
associate network traffic with processes.
The test makes sure that a socket it created is tagged with prog_tests's
pid.
Signed-off-by: Florent Revest
Acked-by: Yonghong Song
---
.../selftests/bpf/prog_tests/bpf_iter.c
or to selectively delete local storage values.
Signed-off-by: Florent Revest
Acked-by: Martin KaFai Lau
Acked-by: KP Singh
---
net/core/bpf_sk_storage.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/bpf_sk_storage.c b/net/core/bpf_sk_storage.c
index a32037daa933..4edd033e899c
on whether the returned socket is NULL or not.
Suggested-by: Al Viro
Signed-off-by: Florent Revest
Reviewed-by: KP Singh
---
fs/eventpoll.c | 3 +--
fs/io_uring.c| 16
include/linux/net.h | 2 +-
net/core/netclassid_cgroup.c | 3 +--
pes
inheriting this set of helpers such as iterators or LSM programs.
Signed-off-by: Florent Revest
Acked-by: KP Singh
Acked-by: Martin KaFai Lau
---
include/uapi/linux/bpf.h | 9 +
kernel/trace/bpf_trace.c | 20
scripts/bpf_helpers_doc.py |
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
This creates a new helper proto because the existing
bpf_get_socket_cookie_sock_proto has a ARG_PTR_TO_CTX argument and only
works for BPF programs where the context is a sock.
This helper could also be useful to other BPF program types such as LSM.
Signed-off-by: Florent Revest
---
include
- 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 | 82
On Thu, 2020-11-19 at 16:32 -0800, Martin KaFai Lau wrote:
> Does it affect all sk(s) in the system? Can it be limited to
> the sk that the test is testing?
Oh I just realized I haven't answered you here yet! Thanks for the
reviews. :D I'm sending a v3 addressing your comments
pes
inheriting this set of helpers such as iterators or LSM programs.
Signed-off-by: Florent Revest
Acked-by: KP Singh
Acked-by: Martin KaFai Lau
---
include/uapi/linux/bpf.h | 9 +
kernel/trace/bpf_trace.c | 20
scripts/bpf_helpers_doc.py |
on whether the returned socket is NULL or not.
Suggested-by: Al Viro
Signed-off-by: Florent Revest
---
fs/eventpoll.c | 3 +--
fs/io_uring.c| 16
include/linux/net.h | 2 +-
net/core/netclassid_cgroup.c | 3 +--
net/core/netprio_cgroup.c|
or to selectively delete local storage values.
Signed-off-by: Florent Revest
Acked-by: Martin KaFai Lau
---
net/core/bpf_sk_storage.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/bpf_sk_storage.c b/net/core/bpf_sk_storage.c
index a32037daa933..4edd033e899c 100644
--- a/net/core
in the local storage.
Signed-off-by: Florent Revest
---
.../selftests/bpf/prog_tests/bpf_iter.c| 13 +
.../progs/bpf_iter_bpf_sk_storage_helpers.c| 18 ++
2 files changed, 31 insertions(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_iter.c
b
The eBPF program iterates over all entries (well, only one) of a socket
local storage map and deletes them all. The test makes sure that the
entry is indeed deleted.
Signed-off-by: Florent Revest
Acked-by: Martin KaFai Lau
---
.../selftests/bpf/prog_tests/bpf_iter.c | 64
nformation could be used from a cgroup_skb/*gress hook to try to
associate network traffic with processes.
The test makes sure that a socket it created is tagged with prog_tests's
pid.
Signed-off-by: Florent Revest
---
.../selftests/bpf/prog_tests/bpf_iter.c | 40 +++
in which the symbol is located.
Signed-off-by: Florent Revest
---
include/uapi/linux/bpf.h | 16 +
kernel/trace/bpf_trace.c | 41 ++
tools/include/uapi/linux/bpf.h | 16 +
3 files changed, 73 insertions(+)
diff --git a/include/uapi
This piggybacks on the existing "ksyms" test because this test also
relies on a __ksym symbol and requires CONFIG_KALLSYMS.
Signed-off-by: Florent Revest
---
tools/testing/selftests/bpf/config| 1 +
.../testing/selftests/bpf/prog_tests/ksyms.c | 46 ++
attachment strategy and different headers.
Signed-off-by: Florent Revest
---
.../selftests/bpf/progs/socket_cookie_prog.c | 41 ---
.../selftests/bpf/test_socket_cookie.c| 18 +---
2 files changed, 49 insertions(+), 10 deletions(-)
diff --git a/tools/testing/selftests
This creates a new helper proto because the existing
bpf_get_socket_cookie_sock_proto has a ARG_PTR_TO_CTX argument and only
works for BPF programs where the context is a sock.
This helper could also be useful to other BPF program types such as LSM.
Signed-off-by: Florent Revest
---
kernel
On Thu, 2020-11-26 at 23:56 -0800, Yonghong Song wrote:
>
> On 11/26/20 9:02 AM, Florent Revest wrote:
> > This builds up on the existing socket cookie test which checks
> > whether
> > the bpf_get_socket_cookie helpers provide the same value in
> > cgroup
On Thu, 2020-11-26 at 23:35 -0800, Yonghong Song wrote:
> On 11/26/20 8:57 AM, Florent Revest wrote:
> > +BPF_CALL_5(bpf_kallsyms_lookup, u64, address, char *, symbol, u32,
> > symbol_size,
> > + char *, module, u32, module_size)
> > +{
> > + char buffer[K
1 - 100 of 213 matches
Mail list logo