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: <lhufr9y6zw8.fsf@oldenburg.str.redhat.com>
Date: Fri, 28 Nov 2025 14:38:15 +0100
From: Florian Weimer <fweimer@...hat.com>
To: Mikhail Gavrilov <mikhail.v.gavrilov@...il.com>
Cc: bpf@...r.kernel.org,  andrii@...nel.org,  ast@...nel.org,
  daniel@...earbox.net,  netdev@...r.kernel.org
Subject: Re: [PATCH v2 bpf-next] tools/lib/bpf: fix -Wdiscarded-qualifiers
 under C23

* Mikhail Gavrilov:

> - Use explicit casts instead of changing variable types to const char *,
>   because the variables are already declared as char * earlier in the
>   functions and used in contexts requiring mutability.
>   This is common practice in the kernel when full const-correctness
>   cannot be preserved without major refactoring.

What kind of mutability is this about?  Obviously char *const won't
work, but const char * seems to be fine for these variables?

Thanks,
Florian


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ