All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Gavin Shan <gshan@redhat.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, shan.gavin@gmail.com
Subject: Re: [PATCH] firmware: arm_ffa: Fix warning caused by export_uuid()
Date: Mon, 14 Oct 2024 11:08:00 +0100	[thread overview]
Message-ID: <ZwztgGdmNMrsqO7c@bogus> (raw)
In-Reply-To: <20241014004724.991353-1-gshan@redhat.com>

On Mon, Oct 14, 2024 at 10:47:24AM +1000, Gavin Shan wrote:
> Run into build warning caused by export_uuid() where the UUID's
> length exceeds that of ffa_value_t::a2, as the following warning
> messages indicate.
> 
> In function ‘fortify_memcpy_chk’,
> inlined from ‘export_uuid’ at ./include/linux/uuid.h:88:2,
> inlined from ‘ffa_msg_send_direct_req2’ at drivers/firmware/arm_ffa/driver.c:488:2:
> ./include/linux/fortify-string.h:571: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]
> 571 |                         __write_overflow_field(p_size_field, size);
>     |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Fix it by not passing a plain buffer to memcpy() to avoid the overflow
> and underflow warning, similar to what have been done to copy over the
> struct ffa_send_direct_data2.
>

Are you observing this just on the upstream or -next as well? There is a
fix in the -next which I haven't sent to soc team yet, will do so soon.

-- 
Regards,
Sudeep


  reply	other threads:[~2024-10-14 10:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14  0:47 [PATCH] firmware: arm_ffa: Fix warning caused by export_uuid() Gavin Shan
2024-10-14 10:08 ` Sudeep Holla [this message]
2024-10-14 10:25   ` Gavin Shan
2024-10-14 14:41     ` Sudeep Holla
2024-10-14 23:43       ` Gavin Shan
2024-10-15 15:32         ` Sudeep Holla
2024-10-15 15:34 ` Sudeep Holla

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=ZwztgGdmNMrsqO7c@bogus \
    --to=sudeep.holla@arm.com \
    --cc=gshan@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shan.gavin@gmail.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.