From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C888B331A41 for ; Fri, 19 Jun 2026 05:11:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781845902; cv=none; b=l6dMtxP4hfq0ivaG2eSQ2W6nJ3szKRrgZxFIBpE4+B4LCVAgo57STkhk1GrRY2JC0IOAEG92mIQyDVp8O34TNqrp135fTC3pD6xgBxZKjW+70Jzljz3alP6fAnwIj1WwlZK7xtlS8IDvZ/moC9Og3TOz4jlXyjNEx2A45MFn6IE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781845902; c=relaxed/simple; bh=VElinnEQIoo7JXYgT+N/ljAZKu/Jpre4N//r8B7x4Jc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=i1Nv8cEjJOe6Ns7gIfaBa+7FalWc5nYPRh6ikli1Ud4hUrMc3GlKkyz5TJVV5PWNgdw8OX8osSYU8x4PLRhlDKeJo7+LRsP5qXOh0kD1uiISWS9q0NiC79BlbMKmy9KkYyjWoBSeqQlnv3e0T+Q3DEldfzL/9vk9f/4T3kwNIDs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=iFWUie4u; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="iFWUie4u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 696E71F000E9; Fri, 19 Jun 2026 05:11:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781845900; bh=V4jhXiSgCu+tfe1f0UtuN+TelItFr4jNM4rpKYLAgDA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=iFWUie4uaMa1j5hNn8OBb488AaVf57dPZz8jKRvVLeQGiVWbG8vWk49ucJNb1qBOK acAYUHAu5x74CQosmrsS7GCz7Y4XHCMT5HLhUUoFU7iwAVr+DcFJysozHNBTvPzPe3 w771MvTnJjt9gu7LzW4d337bUBeZH+/CYJk60o5c= Date: Fri, 19 Jun 2026 07:10:33 +0200 From: Greg KH To: Rishi Chhibber 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 Message-ID: <2026061913-reattach-prowling-503a@gregkh> References: <20260617203125.397427-1-rishi.chhibber@broadcom.com> <20260618181034.1483738-1-rishi.chhibber@broadcom.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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