lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071107000705.GQ26163@stusta.de>
Date:	Wed, 7 Nov 2007 01:07:05 +0100
From:	Adrian Bunk <bunk@...nel.org>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	"Ahmed S. Darwish" <darwish.07@...il.com>,
	Pavel Machek <pavel@....cz>,
	Casey Schaufler <casey@...aufler-ca.com>,
	akpm@...ux-foundation.org, linux-security-module@...r.kernel.org,
	linux-kernel@...r.kernel.org, Al Viro <viro@....linux.org.uk>
Subject: Re: [PATCH] Smackv10: Smack rules grammar + their stateful parser

On Tue, Nov 06, 2007 at 03:08:08PM -0800, Linus Torvalds wrote:
> 
> 
> On Wed, 7 Nov 2007, Adrian Bunk wrote:
> > 
> > You were the one who suggested to _parse_ strings in the kernel.
> 
> So?
> 
> We do that for lots of things.
> 
> What do you think a filename is? And yes, we parse it. Things like '/' and 
> '.' and '..' have magic meaning.
> 
> You don't need to bring up idiotic things like character sets. You can see 
> it as a byte string. You're done with it.

We have the following properties in the character sets we handle:
- every ASCII character is encoded with the same byte as in ASCII
- if the eighth bit is 0, the byte can't be part of a multi-byte character
- no ASCII character can be encoded in a different way

This (plus most likely some other properties I've missed to mention) 
allows some parsing based on ASCII characters.

But if you want to match "one character" (like TOMOYO does) or want to 
check for printable characters except space (like Smack does) you must 
know whether the byte string 0xC3 0xA0 is the character à or a sequence 
of two characters with the second one being NBSP.

> 		Linus

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

-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ