lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230111061054.dqduab66plb6uzg2@macbook-pro-6.dhcp.thefacebook.com>
Date:   Tue, 10 Jan 2023 22:10:54 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Benjamin Tissoires <benjamin.tissoires@...hat.com>
Cc:     Greg KH <gregkh@...uxfoundation.org>,
        Jiri Kosina <jikos@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Tero Kristo <tero.kristo@...ux.intel.com>,
        linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
        netdev@...r.kernel.org, bpf@...r.kernel.org,
        linux-kselftest@...r.kernel.org
Subject: Re: [PATCH HID for-next v1 6/9] HID: bpf: rework how programs are
 attached and stored in the kernel

On Fri, Jan 06, 2023 at 11:23:29AM +0100, Benjamin Tissoires wrote:
>  
> +static void hid_bpf_link_release(struct bpf_link *link)
> +{
> +	struct hid_bpf_link *hid_link =
> +		container_of(link, struct hid_bpf_link, link);
> +
> +	__clear_bit(hid_link->index, jmp_table.enabled);
> +	schedule_work(&release_work);
> +}

...

> +	link->index = prog_idx;

I was super confused that you use prog_idx as a bit in jmp_table
and had to look into your tree what hid_bpf_jmp_table.c is doing.
Looks like it's not prog_id (which is prog->aux->id) that we know.
It's hid specific prog idx in that jmp table.
Maybe would be good to rename your prog_idx to something with 'hid' suffix or prefix?
or 'table' suffix or prefix ?
prog_table_idx ?

Other than that the patch set looking great.
I'm assuming removing call_hid_bpf_prog_put_deferred() and everything related
comes in the next set?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ