[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <46B300CD-7A35-4E81-A0AE-EC2BB72016DD@mac.com>
Date: Tue, 6 Nov 2007 07:49:26 -0500
From: Kyle Moffett <mrmacman_g4@....com>
To: "Ahmed S. Darwish" <darwish.07@...il.com>
Cc: Adrian Bunk <bunk@...nel.org>,
Casey Schaufler <casey@...aufler-ca.com>, akpm@...l.org,
torvalds@...l.org, linux-security-module@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Smackv10: Smack rules grammar + their stateful parser
On Nov 06, 2007, at 07:23:36, Ahmed S. Darwish wrote:
> On 11/6/07, Adrian Bunk <bunk@...nel.org> wrote:
>> On Tue, Nov 06, 2007 at 01:34:05PM +0200, Ahmed S. Darwish wrote:
>>> As far as I understand the problem now, isspace() accepts the
>>> 0xa0 character which might collide with some of UTF-8 encoded
>>> characters cause the high bit is set.
>
> I admit I'm not experienced in such encoding stuff, but shouldn't
> the ASCII and the ASCII-compatible UTF-8 encodings be enough for
> the labels?
>
>> It would not work if someone would e.g. give you UTF-16 encoded
>> strings, but I don't see this happening in practice.
>
> Won't this complicate the code too much ?
Well the VFS (for example) certainly doesn't support any encodings
other than various extended-ASCII forms (which includes UTF-8).
Something like UTF-16 has extra null characters in-between every
normal character, and as such would fail completely if passed to the
VFS.
Personally I think that isspace() accepting character 0xA0 is a bug,
as there are several variants of extended ASCII only one of which has
that character as a space. Others have it as รก (accented A), etc.
In addition the "canonical" internal text format of the kernel is
UTF-8 as that encoding can represent any character in any other
encoding and it is backwards-compatible with traditional ASCII.
Cheers,
Kyle Moffett-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists