Message ID | 1473608912-5913-2-git-send-email-konrad.wilk@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
>>> On 11.09.16 at 17:48, <konrad.wilk@oracle.com> wrote: > --- a/docs/misc/livepatch.markdown > +++ b/docs/misc/livepatch.markdown > @@ -875,6 +875,12 @@ section and the new function will reference the new string in the new > > This is implemented in the Xen Project hypervisor. > > +Note that the .bss section is only cleared when the ELF payload is uploaded. > +Subsequent apply/revert/apply operation do no clear the .bss (or reset the > +.data to what it was when loaded). Hence it is the responsibility of the > +creator of the payload to reset these values to known good state if they > +depend on them having certain values at apply/revert states. Was it, as an alternative, considered to disallow re-applying a reverted patch without re-uploading? Jan
diff --git a/docs/misc/livepatch.markdown b/docs/misc/livepatch.markdown index 89c1050..07be0af 100644 --- a/docs/misc/livepatch.markdown +++ b/docs/misc/livepatch.markdown @@ -875,6 +875,12 @@ section and the new function will reference the new string in the new This is implemented in the Xen Project hypervisor. +Note that the .bss section is only cleared when the ELF payload is uploaded. +Subsequent apply/revert/apply operation do no clear the .bss (or reset the +.data to what it was when loaded). Hence it is the responsibility of the +creator of the payload to reset these values to known good state if they +depend on them having certain values at apply/revert states. + ### Security Only the privileged domain should be allowed to do this operation.
. since the load time. In summary we clear the .bss only during upload time. Subsequent apply/revert/apply can change the .bss values - meaning that the .bss values are not guaranteed to be zero - in fact they can be anything! And the .data can also be in various states. Suggested-by: Ross Lagerwall <ross.lagerwall@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> --- Cc: Andrew Cooper <andrew.cooper3@citrix.com> Cc: Jan Beulich <jbeulich@suse.com> v5: New submission --- docs/misc/livepatch.markdown | 6 ++++++ 1 file changed, 6 insertions(+)