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]
Date:   Tue, 22 Jan 2019 19:45:29 +0000
From:   Paul Burton <paul.burton@...s.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Fengguang Wu <fengguang.wu@...el.com>,
        "kbuild@...ts.01.org" <kbuild@...ts.01.org>
CC:     Aaro Koskinen <aaro.koskinen@....fi>,
        Ralf Baechle <ralf@...ux-mips.org>,
        James Hogan <jhogan@...nel.org>,
        John Crispin <john@...ozen.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>
Subject: Re: [PATCH 1/5] mips: cavium: no need to check return value of
 debugfs_create functions

Hi Greg,

On Tue, Jan 22, 2019 at 08:29:16PM +0100, Greg Kroah-Hartman wrote:
> On Tue, Jan 22, 2019 at 07:22:57PM +0000, Paul Burton wrote:
> > On Tue, Jan 22, 2019 at 08:48:56PM +0200, Aaro Koskinen wrote:
> > > On Tue, Jan 22, 2019 at 03:57:38PM +0100, Greg Kroah-Hartman wrote:
> > > > -static int init_debufs(void)
> > > > +static void init_debugfs(void)
> > > >  {
> > > > -	struct dentry *show_dentry;
> > > >  	dir = debugfs_create_dir("oct_ilm", 0);
> > > > -	if (!dir) {
> > > > -		pr_err("oct_ilm: failed to create debugfs entry oct_ilm\n");
> > > > -		return -1;
> > > > -	}
> > > > -
> > > > -	show_dentry = debugfs_create_file("statistics", 0222, dir, NULL,
> > > > -					  &oct_ilm_ops);
> > > > -	if (!show_dentry) {
> > > > -		pr_err("oct_ilm: failed to create debugfs entry oct_ilm/statistics\n");
> > > > -		return -1;
> > > > -	}
> > > > -
> > > > -	show_dentry = debugfs_create_file("reset", 0222, dir, NULL,
> > > > -					  &reset_statistics_ops);
> > > > -	if (!show_dentry) {
> > > > -		pr_err("oct_ilm: failed to create debugfs entry oct_ilm/reset\n");
> > > > -		return -1;
> > > > -	}
> > > > -
> > > > +	debugfs_create_file("statistics", 0222, dir, NULL, &oct_ilm_ops);
> > > > +	debugfs_create_file("reset", 0222, dir, NULL, &reset_statistics_ops);
> > > >  	return 0;
> > > 
> > > The return needs to be deleted now that the function is void.
> > 
> > Well spotted - I'm happy to fix this up whilst applying the patch.
> 
> The fact that 0-day didn't catch this makes me worried, is this
> platform/driver not being built there?

It looks like this code ought to be built as a module for
cavium_octeon_defconfig:

  $ grep oct_ilm arch/mips/cavium-octeon/Makefile
  obj-$(CONFIG_OCTEON_ILM)              += oct_ilm.o

  $ grep OCTEON_ILM arch/mips/configs/cavium_octeon_defconfig
  CONFIG_OCTEON_ILM=m

Fengguang or others - does 0-day build cavium_octeon_defconfig? If so,
does it build modules?

Thanks,
    Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ