public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: Al Viro <viro@ftp.linux.org.uk>,
	Casey Schaufler <casey@schaufler-ca.com>
Cc: torvalds@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH] Version 6 (2.6.23) Smack: Simplified Mandatory Access Control Kernel
Date: Sat, 13 Oct 2007 12:26:13 -0700 (PDT)	[thread overview]
Message-ID: <737394.85994.qm@web36611.mail.mud.yahoo.com> (raw)
In-Reply-To: <20071013060400.GD8181@ftp.linux.org.uk>


--- Al Viro <viro@ftp.linux.org.uk> wrote:

> On Fri, Oct 12, 2007 at 10:01:17PM -0700, Casey Schaufler wrote:
> 
> What do you need smk_sb for?  Looks like dead weight...

Reminant of an abandoned thought process. Cleaning.

> smk_read_load(): obvious seq_file candidate.
> smk_read_cipso(): ditto.
> 
> What protects smk_cipso_written?  BTW, its use on the read side is an
> atrocity...
> 
> smk_write_doi() - WTF would NUL-terminate temp[]?  You run sscanf on
> it...
> smk_write_direct() - ditto
> smk_write_ambient() - ditto
> smk_read_ambient() - who said that you won't get write between strlen()
> and simple_read_from_buffer()?

Eek. The smackfs code does look pretty crufty in the
context of seq_file, doesn't it? I will have a go at
cleaning that up some.

> smk_import_entry():
> > +	for (skp = smack_known; skp != NULL; skp = skp->smk_next)
> > +		if (skp->smk_known == smack)
> > +			break;
> Really?  With smack[] being an auto array?

Nope. What you see there is a flaw, a mistake, a bug.
And a serious memory use problem, too. Fix in test.
Thank you.

> That's from quick look through the read/write in there; I hadn't really
> looked into parsers or deeper into the guts.

Your suggestions regarding seq_file look helpful. Thank you.


Casey Schaufler
casey@schaufler-ca.com

      reply	other threads:[~2007-10-13 19:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-13  5:01 [PATCH] Version 6 (2.6.23) Smack: Simplified Mandatory Access Control Kernel Casey Schaufler
2007-10-13  6:04 ` Al Viro
2007-10-13 19:26   ` Casey Schaufler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=737394.85994.qm@web36611.mail.mud.yahoo.com \
    --to=casey@schaufler-ca.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox