Re: [PATCH] Smackv10: Smack rules grammar + their stateful parser

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <bunk@...>
Cc: <pavel@...>, <torvalds@...>, <darwish.07@...>, <casey@...>, <akpm@...>, <linux-security-module@...>, <linux-kernel@...>, <viro@...>
Date: Tuesday, November 6, 2007 - 11:27 am

Hello.

Adrian Bunk wrote:
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.

So, from the point of view of userland programs,
'\?' should match to a single character (which depends on encoding).
But from the point of view of the kernel,
'\?' should match to a single byte (which doesn't depend on encoding).
Handling all possible encoding in the kernel is too difficult to implement.
I'll continue using '\?' matches to a single byte.

Yes, but since this string is handled by the *kernel*,
I want users follow point of view of the kernel.

Thanks.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Smackv10: Smack rules grammar + their stateful parser, Ahmed S. Darwish, (Sat Nov 3, 12:43 pm)
Re: [PATCH] Smackv10: Smack rules grammar + their stateful p..., Jakob Oestergaard, (Sat Nov 10, 1:05 pm)
Re: [PATCH] Smackv10: Smack rules grammar + their stateful p..., Tetsuo Handa, (Tue Nov 6, 11:27 am)