OSDN Git Service

iommu/uapi: Add argsz for user filled data
authorJacob Pan <jacob.pan.linux@gmail.com>
Fri, 25 Sep 2020 16:32:43 +0000 (09:32 -0700)
committerJoerg Roedel <jroedel@suse.de>
Thu, 1 Oct 2020 12:52:46 +0000 (14:52 +0200)
commit1e6aaae93e9ddb9dc664993eb949b1da94cab3a5
treecaccb1d2082bc18b81deeeba0b4df6f90bafa68c
parentd0023e3ee28d12b2b0af4856c405f3d13fb59d1c
iommu/uapi: Add argsz for user filled data

As IOMMU UAPI gets extended, user data size may increase. To support
backward compatibiliy, this patch introduces a size field to each UAPI
data structures. It is *always* the responsibility for the user to fill in
the correct size. Padding fields are adjusted to ensure 8 byte alignment.

Specific scenarios for user data handling are documented in:
Documentation/userspace-api/iommu.rst

As there is no current users of the API, struct version is not
incremented.

Signed-off-by: Liu Yi L <yi.l.liu@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Link: https://lore.kernel.org/r/1601051567-54787-3-git-send-email-jacob.jun.pan@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
include/uapi/linux/iommu.h