[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 1/5] xen/livepatch: drop load_addr Elf section field
On Thu, Sep 26, 2024 at 11:21 AM Roger Pau Monne <roger.pau@xxxxxxxxxx> wrote: > > The Elf loading logic will initially use the `data` section field to stash a > pointer to the temporary loaded data (from the buffer allocated in > livepatch_upload(), which is later relocated and the new pointer stashed in > `load_addr`. > > Remove this dual field usage and use an `addr` uniformly. Initially data will > point to the temporary buffer, until relocation happens, at which point the > pointer will be updated to the relocated address. > > This avoids leaking a dangling pointer in the `data` field once the temporary > buffer is freed by livepatch_upload(). > > Note the `addr` field cannot retain the const attribute from the previous > `data`field, as there's logic that performs manipulations against the loaded > sections, like applying relocations or sorting the exception table. > > No functional change intended. > > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Reviewed-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |