[LU-17161] fortify_memset_chk faling OBD_FREE_PTR() Created: 30/Sep/23  Updated: 07/Feb/24

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Shaun Tancheff Assignee: Shaun Tancheff
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Build fails with:

In file included from /usr/src/linux-headers-6.1.0-10-common/include/linux/string.h:253,
                 from /usr/src/linux-headers-6.1.0-10-common/include/linux/bitmap.h:11,
                 from /usr/src/linux-headers-6.1.0-10-common/include/linux/cpumask.h:12,
                 from /usr/src/linux-headers-6.1.0-10-common/arch/x86/include/asm/cpumask.h:5,
                 from /usr/src/linux-headers-6.1.0-10-common/arch/x86/include/asm/msr.h:11,
                 from /usr/src/linux-headers-6.1.0-10-common/arch/x86/include/asm/processor.h:22,
                 from /usr/src/linux-headers-6.1.0-10-common/arch/x86/include/asm/cpufeature.h:5,
                 from /usr/src/linux-headers-6.1.0-10-common/arch/x86/include/asm/thread_info.h:53,
                 from /usr/src/linux-headers-6.1.0-10-common/include/linux/thread_info.h:60,
                 from /usr/src/linux-headers-6.1.0-10-common/arch/x86/include/asm/preempt.h:7,
                 from /usr/src/linux-headers-6.1.0-10-common/include/linux/preempt.h:78,
                 from /usr/src/linux-headers-6.1.0-10-common/include/linux/percpu.h:6,
                 from /usr/src/linux-headers-6.1.0-10-common/include/linux/prandom.h:12,
                 from /usr/src/linux-headers-6.1.0-10-common/include/linux/random.h:172,
                 from /home/shaun/lustre-release/lustre/obdclass/obd_mount.c:43:
In function ‘fortify_memset_chk’,
    inlined from ‘lustre_free_lsi’ at /home/shaun/lustre-release/lustre/obdclass/obd_mount.c:669:2,
    inlined from ‘lustre_put_lsi_free’ at /home/shaun/lustre-release/lustre/obdclass/obd_mount.c:687:2,
    inlined from ‘kref_put’ at /usr/src/linux-headers-6.1.0-10-common/include/linux/kref.h:65:3,
    inlined from ‘lustre_put_lsi’ at /home/shaun/lustre-release/lustre/obdclass/obd_mount.c:703:6:
/usr/src/linux-headers-6.1.0-10-common/include/linux/fortify-string.h:314:25: error: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  314 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC [M]  /home/shaun/lustre-release/lustre/ptlrpc/batch.o


 Comments   
Comment by Gerrit Updater [ 30/Sep/23 ]

"Shaun Tancheff <shaun.tancheff@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52559
Subject: LU-17161 build: Avoid fortify_memset in OBD_FREE_PTR
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 34bda6e87791ea28bfc48b8bd703c70423f8df32

Generated at Sat Feb 10 03:33:09 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.