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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ahmed S. Darwish <darwish.07@...>
Cc: Pavel Machek <pavel@...>, Casey Schaufler <casey@...>, <akpm@...>, <linux-security-module@...>, <linux-kernel@...>, Al Viro <viro@...>
Date: Monday, November 5, 2007 - 12:21 pm

On Mon, 5 Nov 2007, Ahmed S. Darwish wrote:


I personally think string parsers are *much* better than the alternatives 
(which basically boil down to nasty binary interfaces)


That's *MUCH* worse.

Strings are nice. They aren't that complex, and as long as it's not a 
performance-critical area, there are basically no downsides.

Binary structures and ioctl's are *much* worse. They are totally 
undebuggable with generic tools (think "echo" or "strace"), and they are a 
total nightmare to parse across architectures and pointer sizes.

So the rule should be: always use strings if at all possible and relevant. 
If the data is fundamentally binary, it shouldn't be re-coded to ascii (no 
real advantage), but if the data is "stringish", and there aren't big 
performance issues, then keep it as strings.

			Linus
-
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..., Linus Torvalds, (Mon Nov 5, 12:21 pm)