Messages in this thread |  | | | Date | Wed, 14 Jan 2004 23:43:36 -0800 | | From | Ulrich Drepper <> | | Subject | Re: [PATCH] stronger ELF sanity checks v2 | |
-----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 |  |