All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: "Shiji Yang" <yangshiji66@outlook.com>,
	linux-wireless@vger.kernel.org,
	"Nick Kossifidis" <mickflemm@gmail.com>,
	"Luis Chamberlain" <mcgrof@kernel.org>,
	"Toke Høiland-Jørgensen" <toke@toke.dk>,
	"Robert Marko" <robimarko@gmail.com>,
	"Christian Lamparter" <chunkeey@gmail.com>,
	"Christian Marangi" <ansuelsmth@gmail.com>,
	"Shiji Yang" <yangshiji66@qq.com>
Subject: Re: [PATCH] wifi: ath: add struct_group for struct ath_cycle_counters
Date: Fri, 02 Jun 2023 08:19:27 +0300	[thread overview]
Message-ID: <87cz2ejva8.fsf@kernel.org> (raw)
In-Reply-To: <d68c4b38-88e1-02ef-5779-08b93fd0d47b@kernel.org> (Jiri Slaby's message of "Fri, 2 Jun 2023 06:58:31 +0200")

Jiri Slaby <jirislaby@kernel.org> writes:

> On 02. 06. 23, 6:36, Shiji Yang wrote:
>> From: Shiji Yang <yangshiji66@qq.com>
>>
>> Add a struct_group to around all members in struct ath_cycle_counters.
>> It can help the compiler detect the intended bounds of the memcpy() and
>> memset().
>>
>> This patch fixes the following build warning:
>>
>> In function 'fortify_memset_chk',
>>      inlined from 'ath9k_ps_wakeup' at drivers/net/wireless/ath/ath9k/main.c:140:3:
>> ./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);
>>        |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>
> Hi,
>
> what compiler/version is this with?
>
>> Signed-off-by: Shiji Yang <yangshiji66@qq.com>
>> ---
>> More discussion on: https://github.com/openwrt/openwrt/pull/12764
>
> No "__write_overflow_field" there. Is this the right link?

Also it's better to include links like this in the actual commit log so
it's archived to git.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2023-06-02  5:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-02  4:36 [PATCH] wifi: ath: add struct_group for struct ath_cycle_counters Shiji Yang
2023-06-02  4:58 ` Jiri Slaby
2023-06-02  5:19   ` Kalle Valo [this message]
2023-06-04  1:46     ` Shiji Yang
2023-06-04  1:40   ` Shiji Yang
2023-06-04  1:48 ` Shiji Yang
2023-06-04 11:11   ` Christian Lamparter
2023-06-05  6:00     ` Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cz2ejva8.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ansuelsmth@gmail.com \
    --cc=chunkeey@gmail.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=mickflemm@gmail.com \
    --cc=robimarko@gmail.com \
    --cc=toke@toke.dk \
    --cc=yangshiji66@outlook.com \
    --cc=yangshiji66@qq.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.