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]
Date:   Mon, 8 May 2023 17:23:06 +0200
From:   Thierry Reding <thierry.reding@...il.com>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Tejun Heo <tj@...nel.org>, Arnd Bergmann <arnd@...db.de>,
        Lai Jiangshan <jiangshanlai@...il.com>,
        Richard Clark <richard.xnu.clark@...il.com>,
        Jonathan Neuschäfer <j.neuschaefer@....net>,
        Andrey Grodzovsky <andrey.grodzovsky@....com>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] workqueue: fix enum type for gcc-13

On Tue, Jan 17, 2023 at 6:00 PM Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> In gcc-13, the WORK_STRUCT_WQ_DATA_MASK constant is a signed 64-bit
> type on 32-bit architectures because the enum definition has both
> negative numbers and numbers above LONG_MAX in it:
>
> kernel/workqueue.c: In function 'get_work_pwq':
> kernel/workqueue.c:709:24: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
>   709 |                 return (void *)(data & WORK_STRUCT_WQ_DATA_MASK);
>       |                        ^
> kernel/workqueue.c: In function 'get_work_pool':
> kernel/workqueue.c:737:25: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
>   737 |                 return ((struct pool_workqueue *)
>       |                         ^
> kernel/workqueue.c: In function 'get_work_pool_id':
> kernel/workqueue.c:759:25: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
>   759 |                 return ((struct pool_workqueue *)
>       |                         ^
>
> Change the enum definition to ensure all values can fit into
> the range of 'unsigned long' on all architectures.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  include/linux/workqueue.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Thierry Reding <treding@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ