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=3D217610

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

Attached is the proposed patch.  Note that it is somewhat more involved that
just passing the filsz =3D=3D 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 ju=
st
force any file-backed COW mappings to be avoided if filesz =3D=3D 0.

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

--=20
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>