On 22/04/2021 07:47, Marco Elver wrote:
On Thu, 22 Apr 2021 at 08:12, Marek Szyprowski m.szyprowski@samsung.com wrote: [...]
So I think we just have to settle on 'unsigned long' here. On many architectures, like 32-bit Arm, the alignment of a structure is that of its largest member. This means that there is no portable way to add 64-bit integers to siginfo_t on 32-bit architectures.
In the case of the si_perf field, word size is sufficient since the data it contains is user-defined. On 32-bit architectures, any excess bits of perf_event_attr::sig_data will therefore be truncated when copying into si_perf.
Feel free to test the below if you have time, but the below lets me boot 32-bit arm which previously timed out. It also passes all the static_asserts() I added (will send those as separate patches).
Once I'm convinced this passes all others tests too, I'll send a patch.
This fixes the issue I've observed on my test systems. Feel free to add:
Reported-by: Marek Szyprowski m.szyprowski@samsung.com
Tested-by: Marek Szyprowski m.szyprowski@samsung.com
Thank you for testing! It's been sent: https://lkml.kernel.org/r/20210422064437.3577327-1-elver@google.com
Thanks! This fixes the problem for Tegra as well. I have responded to the above patch with my tested-by.
Cheers Jon