From: Christoph Egger <siccegge@cs.fau.de>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Daisuke HATAYAMA <d.hatayama@jp.fujitsu.com>,
David Howells <dhowells@redhat.com>,
Roland McGrath
Cc: vamos@i4.informatik.uni-erlangen.de
Subject: [PATCH] Doublecheck for CONFIG_MMU
Date: Mon, 26 Apr 2010 15:44:35 +0200 [thread overview]
Message-ID: <20100426134435.GA2710@faui49.informatik.uni-erlangen.de> (raw)
Hi all!
As part of the VAMOS[0] research project at the University of
Erlangen we are looking at multiple integrity errors in linux'
configuration system.
The following patch removes a unnecessary conditional. Inside
a block making sure CONFIG_MMU isn't set the option is checked again
and based on that some parts are (not) included. As the outer check
already makes sure CONFIG_MMU isn't set here both checks are
unnecessary so this patch removes them.
Please keep me informed of this patch getting confirmed /
merged so we can keep track of it.
Regards
Christoph Egger
[0] http://vamos1.informatik.uni-erlangen.de/
----
>From 641fdd413e19208abfd764e061c8bbddeb24d574 Mon Sep 17 00:00:00 2001
From: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Date: Mon, 26 Apr 2010 15:32:53 +0200
Subject: [PATCH] Remove redundant check for CONFIG_MMU
The checks for CONFIG_MMU at this location is duplicated as all the
code is located inside a #ifndef CONFIG_MMU block. So the first
Conditional Block will always be included while the second will never.
Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
---
fs/binfmt_elf_fdpic.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index 7ab23e0..2c5f9a0 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -1005,15 +1005,8 @@ static int elf_fdpic_map_file_constdisp_on_uclinux(
}
} else if (!mm->start_data) {
mm->start_data = seg->addr;
-#ifndef CONFIG_MMU
mm->end_data = seg->addr + phdr->p_memsz;
-#endif
}
-
-#ifdef CONFIG_MMU
- if (seg->addr + phdr->p_memsz > mm->end_data)
- mm->end_data = seg->addr + phdr->p_memsz;
-#endif
}
seg++;
--
1.6.3.3
reply other threads:[~2010-04-26 13:52 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=20100426134435.GA2710@faui49.informatik.uni-erlangen.de \
--to=siccegge@cs.fau.de \
--cc=akpm@linux-foundation.org \
--cc=d.hatayama@jp.fujitsu.com \
--cc=dhowells@redhat.com \
--cc=vamos@i4.informatik.uni-erlangen.de \
--cc=viro@zeniv.linux.org.uk \
/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).