[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.
To unblock Paulina on her series, I would be ok with the cast provided there is compile-time check to ensure the user-space structure is identical to the ioctl structure. That would involve: 1. Introducing BUILD_BUG_ON, offsetof, alignof to libs/ if they are not already available. 2. BUILD_BUG_ON(sizeof(A) != sizeof(B)) 3. BUILD_BUG_ON(offsetof(A, f1) != offsetof(B, f1)) (enumerate all fields) 4. BUILD_BUG_ON(alignof(A) != alignof(B)) Paulina, let me know if you would be interested in doing #1. Normally this requires reading compiler manuals and some coding. I can give you more details if you're up for the task, otherwise I will try to find some time to do it myself. Wei. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |