From: Greg KH <gregkh@linuxfoundation.org>
To: Rishi Chhibber <rishi.chhibber@broadcom.com>
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org,
ajay.kaher@broadcom.com, alexey.makhalov@broadcom.com,
vamsi-krishna.brahmajosyula@broadcom.com, yin.ding@broadcom.com,
tapas.kundu@broadcom.com
Subject: Re: [PATCH v2] misc: vmw_zerocopy: Add VMware zero-copy buffer sharing driver
Date: Fri, 19 Jun 2026 07:10:33 +0200 [thread overview]
Message-ID: <2026061913-reattach-prowling-503a@gregkh> (raw)
In-Reply-To: <20260618181034.1483738-1-rishi.chhibber@broadcom.com>
On Thu, Jun 18, 2026 at 11:10:34AM -0700, Rishi Chhibber wrote:
> +/*
> + * Used for sending user buffer.
> + * Either is optional but not both.
> + *
> + * Pointers are __u64 so the struct layout is identical on 32-bit and 64-bit
> + * userspace, avoiding a compat_ioctl handler. Use u64_to_user_ptr() in the
> + * driver to convert back to a __user pointer.
> + */
> +struct vmw_zc_guest_data {
> + __u64 buffer;
> + __u32 buffer_length;
> + __u64 metadata;
> + __u32 metadata_length;
> +} __packed;
You have an unaligned metadata pointer here in the structure, are you
sure that's a good idea? Or can you not change that anymore?
> +
> +struct vmw_zc_guest_raw_buffer {
> + __user __u8 raw_buffer[MAX_RAW_BUFFER_LEN];
Why is __user in an ioctl structure? That's an internal-to-the-kernel
marking.
thanks,
greg k-h
next prev parent reply other threads:[~2026-06-19 5:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 20:31 [PATCH] " Rishi Chhibber
2026-06-18 10:26 ` Greg KH
2026-06-18 18:10 ` [PATCH v2] " Rishi Chhibber
2026-06-19 5:08 ` Greg KH
2026-06-19 5:10 ` Greg KH [this message]
2026-06-19 15:12 ` David Laight
2026-07-17 13:43 ` Greg KH
2026-07-17 13:44 ` Greg KH
2026-07-20 19:40 ` Rishi Chhibber
2026-06-19 18:27 ` [PATCH] " Rishi Chhibber
2026-06-20 5:04 ` Greg KH
2026-06-20 5:06 ` Greg KH
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=2026061913-reattach-prowling-503a@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=ajay.kaher@broadcom.com \
--cc=alexey.makhalov@broadcom.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rishi.chhibber@broadcom.com \
--cc=tapas.kundu@broadcom.com \
--cc=vamsi-krishna.brahmajosyula@broadcom.com \
--cc=yin.ding@broadcom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®