linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Naveen N Rao <naveen@kernel.org>, Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/lib: Avoid array bounds warnings in vec ops
Date: Thu, 23 Nov 2023 09:17:54 -0600	[thread overview]
Message-ID: <c7fb16c0-ce17-465e-8624-2ee39b545a11@embeddedor.com> (raw)
In-Reply-To: <ab6uj2olygi3edqkjn73kfxvx6igtxotkp3m35j4ikn3ztm2eg@ixkpj2f47ri2>


>> To be honest I don't know how paranoid we want to get, we could end up
>> putting WARN's all over the kernel :)
>>
>> In this case I guess if the size is too large we overflow the buffer on
>> the kernel stack, so we should at least check the size.
>>
>> But does it need a WARN? I'm not sure. If we had a case that was passing
>> a out-of-bound size hopefully we would notice in testing? :)
> 
> You're right, a simpler check should suffice. I will send an updated
> patch.

This[1] patch indeed also makes those -Wstringop-overflow warnings go away. :)

I'm not subscribed to the list but here are my

Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Build-tested-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Thank you guys!
--
Gustavo

[1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2023-November/265936.html

  reply	other threads:[~2023-11-23 15:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 23:54 [PATCH] powerpc/lib: Avoid array bounds warnings in vec ops Michael Ellerman
2023-11-21  0:09 ` Gustavo A. R. Silva
2023-11-21 13:12 ` Naveen N Rao
2023-11-22  4:44   ` Michael Ellerman
2023-11-22 12:56     ` Naveen N Rao
2023-11-23 15:17       ` Gustavo A. R. Silva [this message]
2023-11-24 10:42         ` Naveen N Rao
2023-12-07 12:38 ` Michael Ellerman

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=c7fb16c0-ce17-465e-8624-2ee39b545a11@embeddedor.com \
    --to=gustavo@embeddedor.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).