[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMe9rOo9sUQiusm8u=eFDnxYz37Cczd+97M9in=P2mNWXpH5pQ@mail.gmail.com>
Date: Mon, 9 Dec 2013 07:50:32 -0800
From: "H.J. Lu" <hjl.tools@...il.com>
To: LKML <linux-kernel@...r.kernel.org>, Jiri Kosina <jkosina@...e.cz>,
Josh Boyer <jwboyer@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>
Subject: [PATCH] binfmt_elf: fix PIE load with randomization disabled
Normally, a PIE executable has zero virtual address on the first PT_LOAD
segment and kernel will load such executable at random address when
randomization is enabled. If randomization is disabled, kernel will load
it at a fixed address. But if a PIE executable has non-zero virtual
address on the first PT_LOAD segment, kernel will load such executable
at the non-zero virtual address when randomization is enabled. But when
randomization is disabled, kernel ignores the non-zero virtual address
at the non-zero virtual address when randomization is enabled. But when
randomization is disabled, kernel ignores the non-zero virtual address
on the first PT_LOAD segment and loads it at the fixed address. This
patch makes kernel consistent by loading PIE executable with non-zero
virtual address at the non-zero virtual address, regardless if
randomization is enabled or disabled.
--
H.J
View attachment "0001-binfmt_elf-fix-PIE-load-with-randomization-disabled.patch" of type "text/plain" (1844 bytes)
Powered by blists - more mailing lists