tech-kern archive

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

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



On 16.07.2019 15:34, Michał Górny wrote:
> On Tue, 2019-07-16 at 05:23 +1000, matthew green wrote:
>>> Introduce a simple COREDUMP_MACHDEP_LWP_NOTES logic to provide machdep
>>> API for injecting per-LWP notes into coredumps, and use it to append
>>> PT_GETXSTATE note.
>>
>> this macro is pretty gross.  these are the problems i see:
>>
>> - assumes 'int error'
>> - assumes 'struct lwp *l = curlwp'
>> - assumes 'name' is something
>> - assumes 'ns' is something
>>
> 
> It also relies on ELFSIZE being defined in unit using the macro.  Should
> I make that into a parameter as well?
> 

Something I would like to see as decided and not introduced as unnoticed:

 1. Whether we want to ship with FPREGS in core(5) notes once we will
generate the same data into XSTATE structure.

 2. The same for i386, but what to do with XMMREGS?

I think it makes sense to generate FPREGS into core(5) files as these
fields are negligible in size compared to memory segments... and keeping
some symmetry with alive process debugging where FPREGS/XMMREGS will
still work; however it would be inconsistent with the lack of XMMREGS
for i386.

Solutions:
 1. Generate XMMREGS notes for i386
 2. Stop generating FPREGS notes for i386 and amd64
 3. Assume that this is kind of legacy baggage and just add XSTATE next
to what we get now.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index