Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1433374
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [kernel-hardening] Re: [PATCH v1 0/2] Introduce the initify gcc plugin |
| Date | 2016-06-29 02:00 +0200 |
| Message-ID | <rPb58-57P-5@gated-at.bofh.it> (permalink) |
| References | <rOZnk-6lK-27@gated-at.bofh.it> <rP9d0-40a-21@gated-at.bofh.it> <rP9mG-4iI-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 2016-06-28 at 18:07 -0400, Valdis.Kletnieks@vt.edu wrote:
> On Tue, 28 Jun 2016 14:49:15 -0700, Joe Perches said:
>
> >
> > Another potentially useful plugin, especially for embedded systems,
> > would be to compress any string literal marked with
> >
> > __attribute__((format(printf, string-index,)))
> >
> > and decompress the compressed format on the stack in lib/vsprintf.c
> > vsnprintf just before use.
> Are there enough such strings in the kernel to make it worth the effort?
> I'm assuming that the string literals in printk("some string here") are
> automatically so marked?
Yes, that's the concept.
> Is there a minimum length under which the compression overhead actually
> makes it larger?
No, compression would have to be possible, otherwise it'd
be stored directly. Compression would use a special
"compressed string" header with a 2 byte overhead and
then stored with no trailing \0.
Something like struct compressed_format_header {
u8 flag; /* Must be ASCII STX or "\b" */
u8 length;
}
Depends on the config of course, but it could reduce total
image size ~50k on an x86-32 defconfig
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v1 0/2] Introduce the initify gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-06-28 13:30 +0200
[PATCH v1 2/2] Mark functions with the __nocapture attribute Emese Revfy <re.emese@gmail.com> - 2016-06-28 13:40 +0200
Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute Joe Perches <joe@perches.com> - 2016-06-28 18:50 +0200
Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute Emese Revfy <re.emese@gmail.com> - 2016-06-28 22:40 +0200
Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute Joe Perches <joe@perches.com> - 2016-06-28 23:10 +0200
Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute Emese Revfy <re.emese@gmail.com> - 2016-06-29 20:50 +0200
Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute Joe Perches <joe@perches.com> - 2016-06-30 02:20 +0200
Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute Emese Revfy <re.emese@gmail.com> - 2016-07-01 16:00 +0200
Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-06-28 23:00 +0200
Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute "PaX Team" <pageexec@freemail.hu> - 2016-06-28 23:50 +0200
Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-06-29 00:50 +0200
Re: [PATCH v1 2/2] Mark functions with the __nocapture attribute Emese Revfy <re.emese@gmail.com> - 2016-06-29 20:40 +0200
Re: [PATCH v1 0/2] Introduce the initify gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-06-28 13:40 +0200
[PATCH v1 1/2] Add the initify gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-06-28 13:40 +0200
Re: [PATCH v1 1/2] Add the initify gcc plugin Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-06-28 23:10 +0200
Re: [PATCH v1 1/2] Add the initify gcc plugin Kees Cook <keescook@chromium.org> - 2016-06-29 17:00 +0200
Re: [PATCH v1 1/2] Add the initify gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-06-29 21:10 +0200
Re: [kernel-hardening] [PATCH v1 0/2] Introduce the initify gcc plugin Mark Rutland <mark.rutland@arm.com> - 2016-06-28 15:00 +0200
Re: [kernel-hardening] [PATCH v1 0/2] Introduce the initify gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-06-28 18:10 +0200
Re: [kernel-hardening] [PATCH v1 0/2] Introduce the initify gcc plugin Kees Cook <keescook@chromium.org> - 2016-06-28 22:50 +0200
Re: [kernel-hardening] [PATCH v1 0/2] Introduce the initify gcc plugin Mark Rutland <mark.rutland@arm.com> - 2016-06-29 10:30 +0200
Re: [kernel-hardening] [PATCH v1 0/2] Introduce the initify gcc plugin Mark Rutland <mark.rutland@arm.com> - 2016-06-29 20:00 +0200
Re: [kernel-hardening] [PATCH v1 0/2] Introduce the initify gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-06-29 20:30 +0200
Re: [PATCH v1 0/2] Introduce the initify gcc plugin Joe Perches <joe@perches.com> - 2016-06-28 18:40 +0200
Re: [PATCH v1 0/2] Introduce the initify gcc plugin Joe Perches <joe@perches.com> - 2016-06-28 20:50 +0200
Re: [PATCH v1 0/2] Introduce the initify gcc plugin Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-06-28 21:10 +0200
Re: [PATCH v1 0/2] Introduce the initify gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-06-28 22:30 +0200
Re: [PATCH v1 0/2] Introduce the initify gcc plugin Mathias Krause <minipli@ld-linux.so> - 2016-06-28 19:10 +0200
Re: [PATCH v1 0/2] Introduce the initify gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-06-28 22:30 +0200
Re: [PATCH v1 0/2] Introduce the initify gcc plugin Joe Perches <joe@perches.com> - 2016-06-29 00:00 +0200
Re: [kernel-hardening] Re: [PATCH v1 0/2] Introduce the initify gcc plugin Valdis.Kletnieks@vt.edu - 2016-06-29 00:10 +0200
Re: [kernel-hardening] Re: [PATCH v1 0/2] Introduce the initify gcc plugin Joe Perches <joe@perches.com> - 2016-06-29 02:00 +0200
csiph-web