[LinuxBIOS] [PATCH] Change payload buildrule to 'cp -f'
Eric W. Biederman
ebiederman at lnxi.com
Mon Jul 10 13:35:48 CEST 2006
Stefan Reinauer <stepan at coresystems.de> writes:
> * Richard Smith <smithbone at gmail.com> [060710 00:41]:
>> mkelfimage creates read only output. This causes the build script to
>> error with a permission denied when it tries to overwrite a payload
>> created by mkelfimage.
>> Eric Biederman requested that we mod the script rather than change the
>> output of mkelfimage upstream.
> I would say that this misses the point of write permissions. What's the
> reason for mkelfImage setting its results read-only in the first place?
> No other payloads have such a behavior. Can you please explain your
> decision a little bit? From the outside this definitely looks like
> the issue needs to be fixed in mkelfImage.
As best as I can recall of the original decision making process.
A common use of mkelfImage has been to put a bootable ELF image
in /tftpboot. In that scenario someone may be downloading the
image when you are updating it. Therefore to correctly update
the file, you must first write to a new filename and then move
it to the new filename. Which gives you atomic update permissions.
The goal was to catch issues where people did not do that.
That is exactly what was caught here.
If the problem was one where what you are updating needs to
be writable I would agree that it is not a build script issue.
However since you don't need write permissions and are just stomping
on the file we are doing the wrong thing in the build.
Show me a case where you actually need write permissions and I will
While I think it can be argued that mkelfImage is wrong I think
the case is that our build process is even more incorrect.
Is there ever a case where writing to an active executable does the
More information about the coreboot