On 3/27/24 15:22, Alexander Lobakin wrote:
Some structures contain flexible arrays at the end and the counter for
them, but the counter has explicit Endianness and thus __counted_by()
can't be used directly.
To increase test coverage for potential problems without breaking
anything, introduce __
"Gustavo A. R. Silva" wrote:
> Prepare for the coming implementation by GCC and Clang of the __counted_by
> attribute. Flexible array members annotated with __counted_by can have
> their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
> array indexing) and CONFIG_FORTIFY_SOURCE (
"Gustavo A. R. Silva" wrote:
> -Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
> ready to enable it globally.
>
> Remove unused flexible-array members in multiple structures, and fix
> a hundred -Wflex-array-member-not-at-end warnings[1] in
> drivers/wireless/ti/
>
> Link
"Gustavo A. R. Silva" wrote:
> -Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
> ready to enable it globally.
>
> There is currently an object (`header`), at the beginning of multiple
> structures, that contains a flexible structure (`struct mwl8k_cmd_pkt`),
> for example:
From: Arnd Bergmann
While testing some other patch series I worked on across gcc versions, I found
a couple of stringop warnings that only show up with some toolchains but not
others. The warnings I both seem to be false positive.
I have also not found an explanation why both of these happen in
From: Arnd Bergmann
The carl9170_tx_release() function sometimes triggers a fortified-memset
warning in my randconfig builds:
In file included from include/linux/string.h:254,
from drivers/net/wireless/ath/carl9170/tx.c:40:
In function 'fortify_memset_chk',
inlined from 'car
From: Arnd Bergmann
gcc-9 and some other older versions produce a false-positive warning
for zeroing two fields
In file included from include/linux/string.h:369,
from drivers/net/wireless/ath/ath9k/main.c:18:
In function 'fortify_memset_chk',
inlined from 'ath9k_ps_wakeup' a
On Wed, Mar 27, 2024 at 11:51:33PM +0100, André Apitzsch wrote:
> Document Silergy SY7802 flash LED driver devicetree bindings.
>
> Signed-off-by: André Apitzsch
> ---
> .../devicetree/bindings/leds/silergy,sy7802.yaml | 96
> ++
> 1 file changed, 96 insertions(+)
>
> dif
On 3/28/24 06:57, Kalle Valo wrote:
"Gustavo A. R. Silva" wrote:
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
array ind
{
- strncpy(info->device, blkdev, 80);
+ strscpy(info->device, blkdev);
info->max_reason = max_reason;
info->kmsg_size = check_size(kmsg_size, 4096);
info->pmsg_size = check_size(pmsg_size, 4096);
---
base-commit: 928a87efa42302a23bb9554be081a28058495f
Arnd Bergmann writes:
> From: Arnd Bergmann
>
> gcc-9 and some other older versions produce a false-positive warning
> for zeroing two fields
>
> In file included from include/linux/string.h:369,
> from drivers/net/wireless/ath/ath9k/main.c:18:
> In function 'fortify_memset_chk'
uot;%d: %-15s%-15d%-15d%-15lld%-15lld(%s)\n",
i, namebuf,
---
base-commit: 928a87efa42302a23bb9554be081a28058495f22
change-id: 20240328-strncpy-fs-reiserfs-item_ops-c-c2f9b8a6c1f3
Best regards,
--
Justin Stitt
*server)
}
spin_unlock(&server->srv_lock);
if (!is_binding && !server->session_estab) {
- strncpy(shdr->Signature, "BSRSPYL", 8);
+ strscpy(shdr->Signature, "BSRSPYL");
return 0;
}
---
base-commit: 928a87efa42302a23bb9554be081a28058495f22
change-id: 20240328-strncpy-fs-smb-client-cifssmb-c-952d43af06d8
Best regards,
--
Justin Stitt
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
ready to enable it globally.
There are currently a couple of objects in `struct smc_clc_msg_proposal_area`
that contain a couple of flexible structures:
struct smc_clc_msg_proposal_area {
...
struct smc_clc_v2_
On Thu, Mar 28, 2024 at 02:55:05PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann
>
> gcc-9 and some other older versions produce a false-positive warning
> for zeroing two fields
>
> In file included from include/linux/string.h:369,
> from drivers/net/wireless/ath/ath9k/main
On Thu, Mar 28, 2024 at 02:55:04PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann
>
> The carl9170_tx_release() function sometimes triggers a fortified-memset
> warning in my randconfig builds:
>
> In file included from include/linux/string.h:254,
> from drivers/net/wireless/
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
ready to enable it globally.
There are currently a couple of objects in `struct smc_clc_msg_proposal_area`
that contain a couple of flexible structures:
struct smc_clc_msg_proposal_area {
...
struct smc_clc_v2_
(sb, index, &index_start,
---
base-commit: 928a87efa42302a23bb9554be081a28058495f22
change-id: 20240328-strncpy-fs-squashfs-namei-c-9d01b8975e53
Best regards,
--
Justin Stitt
On Thu, 28 Mar 2024 07:42:57 +0100, Ard Biesheuvel wrote:
> The .head.text section carries the startup code that runs with the MMU
> off or with a translation of memory that deviates from the ordinary one.
> So avoid instrumentation with the stackleak plugin, which already avoids
> .init.text and .
On Thu, 28 Mar 2024 20:54:16 +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> We know that info-device should be NUL-terminated based on its use with
> strle
On Thu, Mar 28, 2024 at 09:16:52PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> Our goal here is to get @namebuf populated with @name's contents but
> su
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting
ready to enable it globally.
There is currently an object (`tl`), at the beginning of multiple
structures, that contains a flexible structure (`struct nfp_dump_tl`),
for example:
struct nfp_dumpspec_csr {
struct nfp_du
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski :
On Wed, 27 Mar 2024 15:22:38 +0100 you wrote:
> Some structures contain flexible arrays at the end and the counter for
> them, but the counter has explicit Endianness and thus __counted_by()
> can't be used directly.
On Thu, Mar 28, 2024 at 09:44:48PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> In cifssmb.c:
> Using strncpy with a length argument equal to strlen(src)
; i++) {
> err = squashfs_read_metadata(sb, index, &index_start,
>
> ---
> base-commit: 928a87efa42302a23bb9554be081a28058495f22
> change-id: 20240328-strncpy-fs-squashfs-namei-c-9d01b8975e53
>
> Best regards,
> --
> Justin Stitt
>
>
--
Kees Cook
On Fri, Mar 22, 2024 at 09:41:18PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> There is some care taken to ensure these destination buffers are
> NUL-te
On Thu, Mar 21, 2024 at 11:46:27PM +, Justin Stitt wrote:
> strncpy() is deprecated with NUL-terminated destination strings [1].
>
> The copy_name() method does a lot of manual buffer manipulation to
> eventually arrive with its desired string. If we don't know the
> namespace this attr has or
On Wed, Mar 20, 2024 at 11:27:09PM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> We can see that client->name should be NUL-terminated based on its usage
On Thu, Mar 21, 2024 at 12:38:54AM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces. A good alternative is strscpy() as it guarantees
> NUL-termination on the dest
On Thu, Mar 21, 2024 at 01:03:10AM +, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> in file.c:
> s_last_mounted is marked as __nonstring meaning it does not
30 matches
Mail list logo