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:	Wed, 13 Apr 2016 07:53:21 -0400
From:	Mimi Zohar <zohar@...ux.vnet.ibm.com>
To:	Kees Cook <keescook@...omium.org>
Cc:	Al Viro <viro@...iv.linux.org.uk>,
	James Morris <jmorris@...ei.org>,
	Joe Perches <joe@...ches.com>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Serge E. Hallyn" <serge@...lyn.com>,
	Jonathan Corbet <corbet@....net>,
	Kalle Valo <kvalo@...eaurora.org>,
	Mauro Carvalho Chehab <mchehab@....samsung.com>,
	Guenter Roeck <linux@...ck-us.net>,
	Jiri Slaby <jslaby@...e.com>, Paul Moore <pmoore@...hat.com>,
	Stephen Smalley <sds@...ho.nsa.gov>,
	Casey Schaufler <casey@...aufler-ca.com>,
	Andreas Gruenbacher <agruenba@...hat.com>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Vitaly Kuznetsov <vkuznets@...hat.com>,
	linux-security-module <linux-security-module@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
Subject: Re: [PATCH v4 5/6] fs: provide function to report enum strings

On Tue, 2016-04-12 at 15:38 -0700, Kees Cook wrote:
> On Tue, Apr 12, 2016 at 3:31 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
> > On Tue, Apr 12, 2016 at 09:54:44AM -0700, Kees Cook wrote:
> >> Providing human-readable (and audit-parsable) strings for the READING_*
> >> enums is needed by some LSMs.
> >>
> >> Signed-off-by: Kees Cook <keescook@...omium.org>
> >> ---
> >>  fs/exec.c          | 19 +++++++++++++++++++
> >>  include/linux/fs.h |  1 +
> >>  2 files changed, 20 insertions(+)
> >
> > What the devil is that doing in fs/exec.c, of all places?
> 
> Since that's where the kernel_read* functions that use the enum live,
> it seemed like the right place to put the string function too. I'm
> happy to move it where ever folks think it's best to live.

Al,

The problem is keeping the enum and corresponding string in sync.  As
soon as the enum definition is separated from the string definition, it
will become a problem.  I've tried to use _stringify() to initialize
both the enum and the string, but it is ugly.  Perhaps someone else has
a better, prettier method.

Mimi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ