mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Mehmet Kayaalp <mkayaalp@linux.vnet.ibm.com>
Cc: David Howells <dhowells@redhat.com>,
	David Woodhouse <dwmw2@infradead.org>,
	keyrings <keyrings@vger.kernel.org>,
	LSM <linux-security-module@vger.kernel.org>,
	kernel <linux-kernel@vger.kernel.org>,
	Mimi Zohar <zohar@linux.vnet.ibm.com>,
	Stefan Berger <stefanb@linux.vnet.ibm.com>,
	George Wilson <gcwilson@us.ibm.com>
Subject: Re: [PATCH v4 1/4] KEYS: Insert incompressible bytes to reserve space in bzImage
Date: Thu, 20 Apr 2017 20:13:32 -0300	[thread overview]
Message-ID: <20170420231332.GA10262@khazad-dum.debian.net> (raw)
In-Reply-To: <1492727320-26194-2-git-send-email-mkayaalp@linux.vnet.ibm.com>

On Thu, 20 Apr 2017, Mehmet Kayaalp wrote:
> Include a random filled binary in vmlinux at the space reserved with
> CONFIG_SYSTEM_EXTRA_CERTIFICATE. This results in an uncompressed reserved

Random data is not always going to be completely incompressible.  And
just how much it could be compressed also depends on the compression
engine.

Failures here would be quite annoying, even if they would be rare (not
just due to the randomness factor, but also depending on just how
overprovisioned the space reserved for the extra certificate was when
compared with the real certificate size).

Maybe it would be safer if you test it for incompressability once you
generated the random data (using the same compression engine that the
image will use)?  If it fails, add some overprovisioning and retry...

Alternatively, you could ship a static file with random data that has
been tested to be uncompressible "enough" for every currently supported
compression engine, maybe with a bit of a safety margin just in case a
future compression engine does somewhat better...

-- 
  Henrique Holschuh

  reply	other threads:[~2017-04-20 23:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-20 22:28 [PATCH v4 0/4] Certificate insertion support for x86 bzImages Mehmet Kayaalp
2017-04-20 22:28 ` [PATCH v4 1/4] KEYS: Insert incompressible bytes to reserve space in bzImage Mehmet Kayaalp
2017-04-20 23:13   ` Henrique de Moraes Holschuh [this message]
2017-04-21  0:22     ` Mehmet Kayaalp
2017-04-21 19:47       ` Henrique de Moraes Holschuh
2017-04-20 22:28 ` [PATCH v4 2/4] KEYS: Add ELF class-independent certificate insertion support Mehmet Kayaalp
2017-04-20 22:28 ` [PATCH v4 3/4] KEYS: Support for inserting a certificate into x86 bzImage Mehmet Kayaalp
2017-04-20 22:28 ` [PATCH v4 4/4] KEYS: Print insert-sys-cert information to stdout instead of stderr Mehmet Kayaalp
2017-04-27 13:54 ` [PATCH v4 3/4] KEYS: Support for inserting a certificate into x86 bzImage David Howells
2017-04-27 19:06   ` Mehmet Kayaalp
2017-04-28 15:47   ` David Howells
2017-04-27 13:57 ` [PATCH v4 4/4] KEYS: Print insert-sys-cert information to stdout instead of stderr David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170420231332.GA10262@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=gcwilson@us.ibm.com \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mkayaalp@linux.vnet.ibm.com \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=zohar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®