All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	lijian <lijian@yulong.com>,
	linux-media@vger.kernel.org,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Tom Rix <trix@redhat.com>,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH] media: v4l2-event: Annotate struct v4l2_subscribed_event with __counted_by
Date: Sun, 8 Oct 2023 14:02:28 -0700	[thread overview]
Message-ID: <202310081402.F4DBC2B@keescook> (raw)
In-Reply-To: <eeeb183e-f6ed-4158-8852-04da5e452d9b@xs4all.nl>

On Sat, Oct 07, 2023 at 11:21:26AM +0200, Hans Verkuil wrote:
> On 06/10/2023 22:28, Kees Cook wrote:
> > On Fri, 22 Sep 2023 10:49:52 -0700, Kees Cook 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 checking via CONFIG_UBSAN_BOUNDS
> >> (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
> >> functions).
> >>
> >> As found with Coccinelle[1], add __counted_by for struct v4l2_subscribed_event.
> >> Additionally, since the element count member must be set before accessing
> >> the annotated flexible array member, move its initialization earlier.
> >>
> >> [...]
> > 
> > Since this is a trivial change and it's been 2 week without further
> > discussion, I'll snag this patch.
> 
> Ah, I picked this up for media as well. Same for the other patch.
> You should have gotten an email from patchwork on Oct 3 that it was accepted.
> 
> I think I should be more pro-active and reply when I pick up patches from
> non-media developers instead of relying on patchwork. It seems that it is
> easy to miss emails from patchwork.

Ah! Thanks for reminding me. I'll drop them from the hardening tree. :)

-Kees

-- 
Kees Cook

      reply	other threads:[~2023-10-08 21:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 17:49 [PATCH] media: v4l2-event: Annotate struct v4l2_subscribed_event with __counted_by Kees Cook
2023-09-23 16:26 ` Gustavo A. R. Silva
2023-10-06 20:28 ` Kees Cook
2023-10-07  9:21   ` Hans Verkuil
2023-10-08 21:02     ` Kees Cook [this message]

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=202310081402.F4DBC2B@keescook \
    --to=keescook@chromium.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=lijian@yulong.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mchehab@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=trix@redhat.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.