public inbox for [email protected]
 help / color / mirror / Atom feed
From: Christoph Hellwig <[email protected]>
To: Jens Axboe <[email protected]>
Cc: io-uring <[email protected]>
Subject: Re: [PATCH] io_uring/net: silence sparse warnings on address space
Date: Tue, 20 Jun 2023 21:17:25 -0700	[thread overview]
Message-ID: <ZJJ51Ya+i/[email protected]> (raw)
In-Reply-To: <[email protected]>

On Tue, Jun 20, 2023 at 04:55:05PM -0600, Jens Axboe wrote:
> Rather than assign the user pointer to msghdr->msg_control, assign it
> to msghdr->msg_control_user to make sparse happy. They are in a union
> so the end result is the same, but let's avoid new sparse warnings and
> squash this one.

Te patch looks good, but I think "silence sparse warning" is a horrible
way to write a commit message.  Yes, you're silencing sparse, but sparse
only complains because we have a type mismatch.

So the much better Subject would be something like: 

io_uring/net: use the correct msghdr union member in io_sendmsg_copy_hdr

Use msg_control_user to read the control message in io_sendmsg_copy_hdr
as we expect a user pointer, not the kernel pointer in msg_control.
The end result is the same, but this avoids a sparse addres space
warning.

With that:

Reviewed-by: Christoph Hellwig <[email protected]>

(and it's really time we ger the __user and __bitwise annotations
checked by hte actual compiler..)

  reply	other threads:[~2023-06-21  4:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 22:55 [PATCH] io_uring/net: silence sparse warnings on address space Jens Axboe
2023-06-21  4:17 ` Christoph Hellwig [this message]
2023-06-21 13:36   ` Jens Axboe

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=ZJJ51Ya+i/[email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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