Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Mar 2017 19:32:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 217610] ELF loader should have a special case for program headers with p_filesz == 0
Message-ID:  <bug-217610-8-naCNdLth5g@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-217610-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-217610-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217610

--- Comment #4 from Konstantin Belousov <kib@FreeBSD.org> ---
Created attachment 180607
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=180607&action=edit
Handle filsz == 0.

Attached is the proposed patch.  Note that it is somewhat more involved that
just passing the filsz == 0 in the initial ENOEXEC check, because I do not want
even think what happens when offset is not multiple of the page size.  I just
force any file-backed COW mappings to be avoided if filesz == 0.

Also the patch contains some style cleanup, which I split for actual commit.

-- 
You are receiving this mail because:
You are the assignee for the bug.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-217610-8-naCNdLth5g>