lkml.org 
[lkml]   [2016]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v3 21/22] bpf,landlock: Add optional skb pointer in the Landlock context
On Wed, Sep 14, 2016 at 09:24:14AM +0200, Mickaël Salaün wrote:
> This is a proof of concept to expose optional values that could depend
> of the process access rights.
>
> There is two dedicated flags: LANDLOCK_FLAG_ACCESS_SKB_READ and
> LANDLOCK_FLAG_ACCESS_SKB_WRITE. Each of them can be activated to access
> eBPF functions manipulating a skb in a read or write way.
>
> Signed-off-by: Mickaël Salaün <mic@digikod.net>
...
> /* Handle check flags */
> #define LANDLOCK_FLAG_FS_DENTRY (1 << 0)
> @@ -619,12 +621,15 @@ struct landlock_handle {
> * @args: LSM hook arguments, see include/linux/lsm_hooks.h for there
> * description and the LANDLOCK_HOOK* definitions from
> * security/landlock/lsm.c for their types.
> + * @opt_skb: optional skb pointer, accessible with the
> + * LANDLOCK_FLAG_ACCESS_SKB_* flags for network-related hooks.
> */
> struct landlock_data {
> __u32 hook; /* enum landlock_hook_id */
> __u16 origin; /* LANDLOCK_FLAG_ORIGIN_* */
> __u16 cookie; /* seccomp RET_LANDLOCK */
> __u64 args[6];
> + __u64 opt_skb;
> };

missing something here.
This patch doesn't make use of it.
That's something for the future?
How that field will be populated?
Why make it different vs the rest or args[6] ?

\
 
 \ /
  Last update: 2016-09-17 09:59    [W:0.285 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site