tech-kern archive

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

Re: [PATCH v2] Include XSTATE note in x86 core dumps



On Sun, 2019-07-14 at 16:17 +0200, Maxime Villard wrote:
> Le 05/07/2019 à 17:22, Michał Górny a écrit :
> > +#ifdef EXEC_ELF32
> > +#include <machine/netbsd32_machdep.h>
> > +#endif
> > +#define PT64_GETXSTATE		PT_GETXSTATE
> > +#define COREDUMP_MACHDEP_LWP_NOTES					\
> > +{									\
> > +	struct xstate xstate;						\
> 
> memset needed, otherwise we leak stuff

Good catch, thanks.  I've sent v3 to the ml but accidentally forgot to
set in-reply-to.

> 
> > +	error = process_read_xstate(l, &xstate);			\
> > +	if (error)							\
> > +		return (error);						\
> > +	ELFNAMEEND(coredump_savenote)(ns,				\
> > +	    CONCAT(CONCAT(PT, ELFSIZE), _GETXSTATE), name, &xstate,	\
> > +	    sizeof(xstate));						\
> > +}

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: This is a digitally signed message part



Home | Main Index | Thread Index | Old Index