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: <20171219164523.60ac1308@cakuba.netronome.com>
Date:   Tue, 19 Dec 2017 16:45:23 -0800
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     "Prashant Bhole" <bhole_prashant_q7@....ntt.co.jp>
Cc:     "'David Miller'" <davem@...emloft.net>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] netdevsim: correctly check return value of
 debugfs_create_dir

On Wed, 20 Dec 2017 09:38:52 +0900, Prashant Bhole wrote:
> > > 2) In case sim0 or bpf_bound_progs are  fail to create, we need to add
> > > checks before creating any file in them.  
> > 
> > What do you mean by "check before"?  Checking if creation of each file  
> > fails or not, or something different?  
> 
> For example:
> I will check if state->ddir is not NULL before creating files in it.
> 
> if (state->ddir) {
> 	debugfs_create_u32("id", 0400, state->ddir, &prog->aux->id);
> 	debugfs_create_file("state", 0400, state->ddir,
> 			    &state->state, &nsim_bpf_string_fops);
> 	debugfs_create_bool("loaded", 0400, state->ddir, &state->is_loaded);
> }

Ah, I would just error out in case we can't create any of the
sub-directories as well.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ