From: Adrian Bunk <bunk@kernel.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: pavel@ucw.cz, torvalds@linux-foundation.org,
darwish.07@gmail.com, casey@schaufler-ca.com,
akpm@linux-foundation.org, linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, viro@ftp.linux.org.uk
Subject: Re: [PATCH] Smackv10: Smack rules grammar + their stateful parser
Date: Tue, 6 Nov 2007 23:42:06 +0100 [thread overview]
Message-ID: <20071106224206.GN26163@stusta.de> (raw)
In-Reply-To: <200711070027.GCH09822.QFFSOOFHJtLVOM@I-love.SAKURA.ne.jp>
On Wed, Nov 07, 2007 at 12:27:04AM +0900, Tetsuo Handa wrote:
> Hello.
>
> Adrian Bunk wrote:
> > The problem is that your code matches one byte, not one character.
> >
> > More or less all userspace programs handle multi-byte UTF-8 characters
> > just fine without bothering the user with the fact whether a character
> > consists of one or more bytes.
> I understood what you are saying.
>
> You are saying "a character" does not always consist of one byte,
> while I'm saying "a character" does always consist of one byte.
>
> Yes, some userspace programs don't use strcmp()
> since strcmp() can't handle some encodings like UTF-16.
> But the kernel uses strcmp()
> since the VFS related functions can't handle encodings
> which contains '\0' in the pathname.
> VFS related functions assume that '\0' is end-of-string marker.
>...
The common case isn't UTF-16, it's UTF-8.
And UTF-8 is both quite common and doesn't have this problem with '\0'.
> > And users will try to use this \? for matching one character when
> > writing a pattern that denies access.
> Yes, but since this string is handled by the *kernel*,
> I want users follow point of view of the kernel.
Users are used to deal with characters and hot having to bother with all
the mess of different encodings.
Having patterns that describe rules to deny access in an LSM breaking
this expectation is really a bad thing.
> Thanks.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2007-11-06 22:42 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-02 20:50 [PATCH] Version 10 (2.6.24-rc1) Smack: Simplified Mandatory Access Control Kernel Casey Schaufler
2007-11-03 16:43 ` [PATCH] Smackv10: Smack rules grammar + their stateful parser Ahmed S. Darwish
2007-11-03 18:30 ` Kyle Moffett
2007-11-03 22:12 ` Ahmed S. Darwish
2007-11-04 12:28 ` Pavel Machek
2007-11-04 13:23 ` Ahmed S. Darwish
2007-11-04 16:37 ` Casey Schaufler
2007-11-05 9:41 ` Ahmed S. Darwish
2007-11-05 16:21 ` Linus Torvalds
2007-11-05 21:56 ` Tetsuo Handa
2007-11-06 10:00 ` Adrian Bunk
2007-11-06 12:27 ` Tetsuo Handa
2007-11-06 13:58 ` Adrian Bunk
2007-11-06 14:32 ` Tetsuo Handa
2007-11-06 14:59 ` Adrian Bunk
2007-11-06 15:27 ` Tetsuo Handa
2007-11-06 22:42 ` Adrian Bunk [this message]
2007-11-05 23:38 ` Ahmed S. Darwish
2007-11-06 8:06 ` Adrian Bunk
2007-11-06 15:39 ` Linus Torvalds
2007-11-06 23:00 ` Adrian Bunk
2007-11-06 23:08 ` Linus Torvalds
2007-11-07 0:07 ` Adrian Bunk
2007-11-07 0:27 ` Linus Torvalds
2007-11-07 0:43 ` Adrian Bunk
2007-11-07 1:03 ` Tetsuo Handa
2007-11-07 1:06 ` Linus Torvalds
2007-11-07 1:59 ` Adrian Bunk
2007-11-07 4:09 ` Linus Torvalds
2007-11-07 15:08 ` Alan Cox
2007-11-04 20:06 ` Ahmed S. Darwish
2007-11-05 0:56 ` [PATCH] Smackv10: Smack rules grammar + their stateful parser(2) Ahmed S. Darwish
2007-11-10 17:05 ` Jakob Oestergaard
2007-11-10 19:45 ` Ahmed S. Darwish
2007-11-11 12:44 ` Pavel Machek
2007-11-11 18:37 ` Ahmed S. Darwish
2007-11-06 6:33 ` [PATCH] Smackv10: Smack rules grammar + their stateful parser Adrian Bunk
2007-11-06 8:26 ` Kyle Moffett
2007-11-06 8:56 ` Adrian Bunk
2007-11-06 11:02 ` Alan Cox
2007-11-06 11:34 ` Ahmed S. Darwish
2007-11-06 11:47 ` Adrian Bunk
2007-11-06 12:23 ` Ahmed S. Darwish
2007-11-06 12:49 ` Kyle Moffett
2007-11-06 13:34 ` Adrian Bunk
2007-11-06 14:05 ` Ahmed S. Darwish
2007-11-06 14:10 ` Adrian Bunk
2007-11-06 14:30 ` Ahmed S. Darwish
2007-11-06 15:53 ` Linus Torvalds
2007-11-07 10:56 ` [PATCH] Fix isspace() and other ctype.h functions to ignore chars 128-255 Kyle Moffett
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=20071106224206.GN26163@stusta.de \
--to=bunk@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=casey@schaufler-ca.com \
--cc=darwish.07@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=torvalds@linux-foundation.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