lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0734b0e8-b4c0-05bb-b90c-de89edb61b5d@nvidia.com>
Date:   Thu, 22 Apr 2021 09:15:30 +0100
From:   Jon Hunter <jonathanh@...dia.com>
To:     Marco Elver <elver@...gle.com>, <peterz@...radead.org>,
        <mingo@...hat.com>, <tglx@...utronix.de>
CC:     <m.szyprowski@...sung.com>, <dvyukov@...gle.com>,
        <glider@...gle.com>, <arnd@...db.de>, <christian@...uner.io>,
        <axboe@...nel.dk>, <pcc@...gle.com>, <oleg@...hat.com>,
        <kasan-dev@...glegroups.com>, <linux-arch@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH tip 1/2] signal, perf: Fix siginfo_t by avoiding u64 on
 32-bit architectures


On 22/04/2021 07:44, Marco Elver wrote:
> On some architectures, like 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, because siginfo_t does not contain
> any 64-bit integers on 32-bit architectures.
> 
> In the case of the si_perf field, word size is sufficient since there is
> no exact requirement on size, given the data it contains is user-defined
> via perf_event_attr::sig_data. On 32-bit architectures, any excess bits
> of perf_event_attr::sig_data will therefore be truncated when copying
> into si_perf.
> 
> Since this field is intended to disambiguate events (e.g. encoding
> relevant information if there are more events of the same type), 32 bits
> should provide enough entropy to do so on 32-bit architectures.
> 
> For 64-bit architectures, no change is intended.
> 
> Fixes: fb6cc127e0b6 ("signal: Introduce TRAP_PERF si_code and si_perf to siginfo")
> Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>
> Tested-by: Marek Szyprowski <m.szyprowski@...sung.com>
> Reported-by: Jon Hunter <jonathanh@...dia.com>
> Signed-off-by: Marco Elver <elver@...gle.com>


Thanks for fixing!

Tested-by: Jon Hunter <jonathanh@...dia.com>

Cheers
Jon

-- 
nvpublic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ