mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <sigint@hush.com>
To: <linux-kernel@vger.kernel.org>
Subject: linux/fs/binfmt_elf.c removal of check
Date: Sat, 12 Nov 2005 18:15:46 -0800	[thread overview]
Message-ID: <200511130215.jAD2Fn2H020249@mailserver2.hushmail.com> (raw)

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

Attached is a small patch that deletes an unneccesary check in
binfmt_elf.c load_elf_binary().

'end_code' is initialized to 0 on line 602 but 'k' is initialized
to 'k = elf_ppnt->p_vaddr + elf_ppnt->p_filesz' on line 880. This
check (may) not be neccessary because on line 614 elf_ppnt-
>p_filesz is checked against PATH_MAX and the integer 2. elf_ppnt-
>p_filesz does not appear to be altered before the check. Please
double check the change, but I do not think the comparison is
needed on line 881. I am not on the list please CC me on any
replies. Thanks

patch produced with 'diff -Npur'

- --- a/fs/binfmt_elf.c   2005-11-12 22:19:08.000000000 -0500
+++ b/fs/binfmt_elf.c   2005-11-12 22:17:54.000000000 -0500
@@ -878,7 +878,7 @@ static int load_elf_binary(struct linux_

                if (k > elf_bss)
                        elf_bss = k;
- -               if ((elf_ppnt->p_flags & PF_X) && end_code < k)
+               if ((elf_ppnt->p_flags & PF_X))
                        end_code = k;
                if (end_data < k)
                        end_data = k;
-----BEGIN PGP SIGNATURE-----
Note: This signature can be verified at https://www.hushtools.com/verify
Version: Hush 2.4

wkYEARECAAYFAkN2slwACgkQ8+KJMsQVzCE42gCgiYrs5iWz95OlcZRgYGxJh7XeZd8A
n3pGiikzdQh2RJe/GLJbyy/Q427/
=TTTY
-----END PGP SIGNATURE-----




Concerned about your privacy? Instantly send FREE secure email, no account required
http://www.hushmail.com/send?l=480

Get the best prices on SSL certificates from Hushmail
https://www.hushssl.com?l=485


                 reply	other threads:[~2005-11-13  2:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200511130215.jAD2Fn2H020249@mailserver2.hushmail.com \
    --to=sigint@hush.com \
    --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

all inboxes | Powered by JetHome®