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] [day] [month] [year] [list]
Date:   Fri, 27 Nov 2020 10:21:44 +0100
From:   Florent Revest <revest@...omium.org>
To:     Yonghong Song <yhs@...com>, bpf@...r.kernel.org
Cc:     viro@...iv.linux.org.uk, davem@...emloft.net, kuba@...nel.org,
        ast@...nel.org, daniel@...earbox.net, kafai@...com,
        andrii@...nel.org, kpsingh@...omium.org, revest@...gle.com,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v3 5/6] bpf: Add an iterator selftest for
 bpf_sk_storage_get

On Thu, 2020-11-26 at 23:00 -0800, Yonghong Song wrote:
> On 11/26/20 8:44 AM, Florent Revest wrote:
> > +SEC("iter/task_file")
> > +int fill_socket_owner(struct bpf_iter__task_file *ctx)
> > +{
> > +	struct task_struct *task = ctx->task;
> > +	struct file *file = ctx->file;
> > +	struct socket *sock;
> > +	int *sock_tgid;
> > +
> > +	if (!task || !file || task->tgid != task->pid)
> 
> task->tgid != task->pid is not needed here.
> The task_file iterator already tries to skip task with task->pid
> if its file table is the same as task->tgid.

Good to know!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ