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: <20200728224003.GC951209@ZenIV.linux.org.uk>
Date:   Tue, 28 Jul 2020 23:40:03 +0100
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Casey Schaufler <casey@...aufler-ca.com>
Cc:     Deven Bowers <deven.desai@...ux.microsoft.com>, agk@...hat.com,
        axboe@...nel.dk, snitzer@...hat.com, jmorris@...ei.org,
        serge@...lyn.com, zohar@...ux.ibm.com, paul@...l-moore.com,
        eparis@...hat.com, jannh@...gle.com, dm-devel@...hat.com,
        linux-integrity@...r.kernel.org,
        linux-security-module@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-block@...r.kernel.org,
        linux-audit@...hat.com, tyhicks@...ux.microsoft.com,
        linux-kernel@...r.kernel.org, corbet@....net, sashal@...nel.org,
        jaskarankhurana@...ux.microsoft.com, mdsakib@...rosoft.com,
        nramas@...ux.microsoft.com, pasha.tatashin@...een.com
Subject: Re: [RFC PATCH v5 05/11] fs: add security blob and hooks for
 block_device

On Tue, Jul 28, 2020 at 03:22:59PM -0700, Casey Schaufler wrote:

> > +	hlist_for_each_entry(p, &security_hook_heads.bdev_setsecurity, list) {
> > +		rc = p->hook.bdev_setsecurity(bdev, name, value, size);
> > +
> > +		if (rc == -ENOSYS)
> > +			rc = 0;
> > +
> > +		if (rc != 0)
> 
> Perhaps:
> 		else if (rc != 0)
> 
> > +			break;
> > +	}
> > +
> > +	return rc;

	hlist_for_each_entry(p, &security_hook_heads.bdev_setsecurity, list) {
		rc = p->hook.bdev_setsecurity(bdev, name, value, size);
		if (rc && rc != -ENOSYS)
			return rc;
	}
	return 0;

Easier to reason about that way...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ