Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Issue 8524015: Make nacl_helper_bootstrap load a PIE normally, not the dynamic linker directly (Closed)

Created:
9 years, 1 month ago by Roland McGrath
Modified:
9 years, 1 month ago
Reviewers:
Mark Seaborn, Brad Chen
CC:
chromium-reviews, native-client-reviews_googlegroups.com
Visibility:
Public.

Description

Make nacl_helper_bootstrap load a PIE normally, not the dynamic linker directly This makes it more like the way a PIE is normally run when loaded by the kernel. It doesn't rely on the dynamic linker's feature of being run from the command line. It also avoids hard-coding the canonical machine-dependent file name of the dynamic linker. Instead, it just obeys PT_INTERP the same way the kernel would. BUG= none TEST= nacl still works R=mseaborn@chromium.org,bradchen@google.com Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=109734

Patch Set 1 #

Total comments: 4

Patch Set 2 : changes per review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+200 lines, -115 lines) Patch
M chrome/nacl/nacl_helper_bootstrap_linux.c View 1 14 chunks +200 lines, -115 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Roland McGrath
9 years, 1 month ago (2011-11-10 23:19:12 UTC) #1
Mark Seaborn
http://codereview.chromium.org/8524015/diff/1/chrome/nacl/nacl_helper_bootstrap_linux.c File chrome/nacl/nacl_helper_bootstrap_linux.c (right): http://codereview.chromium.org/8524015/diff/1/chrome/nacl/nacl_helper_bootstrap_linux.c#newcode266 chrome/nacl/nacl_helper_bootstrap_linux.c:266: * Usually PT_INTERP is before the first PT_LOAD. Can ...
9 years, 1 month ago (2011-11-11 19:28:25 UTC) #2
Roland McGrath
PTAL On 2011/11/11 19:28:25, Mark Seaborn wrote: > http://codereview.chromium.org/8524015/diff/1/chrome/nacl/nacl_helper_bootstrap_linux.c > File chrome/nacl/nacl_helper_bootstrap_linux.c (right): > > ...
9 years, 1 month ago (2011-11-11 21:05:17 UTC) #3
Mark Seaborn
LGTM On 11 November 2011 13:05, <mcgrathr@chromium.org> wrote: > > > http://codereview.chromium.org/8524015/diff/1/chrome/nacl/nacl_helper_bootstrap_linux.c#newcode334 > >> chrome/nacl/nacl_helper_bootstrap_linux.c:334: ...
9 years, 1 month ago (2011-11-11 23:23:28 UTC) #4
Mark Seaborn
9 years, 1 month ago (2011-11-11 23:23:31 UTC) #5
LGTM

On 11 November 2011 13:05, <mcgrathr@chromium.org> wrote:

>
>
>
http://codereview.chromium.org/8524015/diff/1/chrome/nacl/nacl_helper_bootstr...
>
>> chrome/nacl/nacl_helper_bootstrap_linux.c:334: *out_interp = (const char
>> *)
>> (interp->p_vaddr + load_bias);
>> It's OK to assume that PT_INTERP is covered by a PT_LOAD segment, then?
>>
>
>
> It is in practice.  But neither the spec nor the kernel requires it.
>

That's a pity it's not required.


> So I've made it robust.
>

Hmm, with a fallback case that will, in practice, never get run, and that
uses a global buffer. :-(  I assume you tested it manually by setting the
conditional to be false?  My LGTM is with a sigh because I don't like
having fallbacks like this, and I'm sorry I queried this. :-)

Mark

Powered by Google App Engine
This is Rietveld 408576698