linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: Jesper Juhl <juhl-lkml@dif.dk>
Cc: Jakub Jelinek <jakub@redhat.com>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, Eric Youngdale <eric@andante.org>
Subject: Re: [PATCH] stronger ELF sanity checks v2
Date: Wed, 14 Jan 2004 23:43:36 -0800	[thread overview]
Message-ID: <400644A8.4000602@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.56.0401131915370.3148@jju_lnx.backbone.dif.dk>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jesper Juhl wrote:

> - Correctness. If it's invalid it /should/ fail, and as early as possible.
> [...]

A _lot_ of tests are possible, but you don't want to perform them in the
kernel.  The elflint tool I wrote and which Jakub mentioned gives you an
impression of what tests are possible.  You do not want to run all these
tests in the kernel to fulfill your "as early as possible" rule.

The kernel should restrict itself to testing the values which affect the
execution.  This was already (mostly) the case with the old loader which
is why I never bothered to send any changes.  Every additional check is
just extra overhead for 99.999% of all cases.

ld.so performs itself some tests, supplementing the tests in the kernel.
 This is enough to catch ill-formed programs which might cause problems.

If you want to have notification of changed files use tripwire or an
equivalent.  If you want to find invalid ELF files, use elflint.  The
right tool for the job.

- -- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFABkSo2ijCOnn/RHQRAqJlAJ48KnZ/O3xHgKc3bDOPMF8cV9DGdQCgrBqA
A9t3cBQeO7o4IMWHd2MQNqs=
=KYJ7
-----END PGP SIGNATURE-----

  reply	other threads:[~2004-01-15  7:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-13  1:55 [PATCH] stronger ELF sanity checks v2 Jesper Juhl
2004-01-13  3:32 ` Aaron Lehmann
2004-01-13 10:39   ` Eric W. Biederman
2004-01-16 16:08   ` Pavel Machek
2004-01-16 19:55     ` Jesse Pollard
2004-01-16 21:36       ` Pavel Machek
2004-01-13 17:35 ` Jakub Jelinek
2004-01-13 19:54   ` Jesper Juhl
2004-01-15  7:43     ` Ulrich Drepper [this message]
     [not found] <1dmam-2Xk-11@gated-at.bofh.it>
     [not found] ` <1dAQW-109-3@gated-at.bofh.it>
     [not found]   ` <1dCSg-5vk-55@gated-at.bofh.it>
     [not found]     ` <1eaqw-6Dk-29@gated-at.bofh.it>
2004-01-15 13:13       ` Pascal Schmidt

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=400644A8.4000602@redhat.com \
    --to=drepper@redhat.com \
    --cc=akpm@osdl.org \
    --cc=eric@andante.org \
    --cc=jakub@redhat.com \
    --cc=juhl-lkml@dif.dk \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).