[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v1 1/3] libelf: Preserve log callback after elf_init



On Mon, Oct 05, 2015 at 08:39:49AM -0600, Jan Beulich wrote:
> >>> On 05.10.15 at 16:23, <konrad.wilk@xxxxxxxxxx> wrote:
> > On Mon, Oct 05, 2015 at 04:36:43AM -0600, Jan Beulich wrote:
> >> >>> On 03.10.15 at 20:39, <konrad.wilk@xxxxxxxxxx> wrote:
> >> > The elf_init function uses the log callback to report
> >> > errors. But it also memsets the whole structure so the
> >> > log callback (if set) is wiped out!
> >> 
> >> Only if you set it before calling elf_init(), which - looking at all 
> >> current
> >> in-tree users isn't intended.
> > 
> > Right? But if you are developing against how else would
> > you find out that you have issues?
> > 
> > As in, if elf_init can't process the virtual address it tries
> > to call efi_msg to tell me what I did wrong, but that will always
> > end up silently (at least on user-space code).
> 
> Ah, so you really mean _for_ instead of _after_ in the subject
> (and then perhaps also not "preserve")? In that case, however,

Argh! Yes!

> I wonder whether the respective information shouldn't be passed
> to elf_init() instead of being set up front (e.g. by introducing a
> struct elf_log container).

<nods>
Let me prep a patch to that effect this week.

> 
> Jan
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.