Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
xen.10697
56bb3f45-hvmloader-fix-scratch_alloc-to-avoid-o...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 56bb3f45-hvmloader-fix-scratch_alloc-to-avoid-overlaps.patch of Package xen.10697
# Commit 4ab3ac074cb1f101f42e02103fa263a1f4f422b5 # Date 2016-02-10 14:46:45 +0100 # Author Anthony PERARD <anthony.perard@citrix.com> # Committer Jan Beulich <jbeulich@suse.com> hvmloader: fix scratch_alloc to avoid overlaps scratch_alloc() set scratch_start to the last byte of the current allocation. The value of scratch_start is then reused as is (if it is already aligned) in the next allocation. This result in a potential reuse of the last byte of the previous allocation. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> --- a/tools/firmware/hvmloader/util.c +++ b/tools/firmware/hvmloader/util.c @@ -450,7 +450,7 @@ void *scratch_alloc(uint32_t size, uint3 if ( align < 16 ) align = 16; - s = (scratch_start + align - 1) & ~(align - 1); + s = (scratch_start + align) & ~(align - 1); e = s + size - 1; BUG_ON(e < s);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor