Skip to contentSkip to conversation

compat.h: drop COMPAT_HANDLE_PARAM()

PATCH In review Jan Beulich 3 participants 3 messages Feb 2, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 compat.h: drop COMPAT_HANDLE_PARAM()

The need for 8844ed299a ("x86/dmop: Fix compat_dm_op() ABI") has made clear that its presence is actively dangerous. At the hypercall entry points XEN_GUEST_HANDLE_PARAM() should be used anyway (regardless of whether these are native or compat entry points), and passing around handles internally shouldn't use their compat representation either.

xen/include/xen/compat.h +0 -3
@@ -25,9 +25,6 @@
     __DEFINE_COMPAT_HANDLE(name, name)
 #define COMPAT_HANDLE(name)          __compat_handle_ ## name
 
-/* NB: it is assumed that if an arch uses the compat layer it does not
- * distinguish handles from parameter handles. */
-#define COMPAT_HANDLE_PARAM(name)    __compat_handle_ ## name
 /* Is the compat handle a NULL reference? */
 #define compat_handle_is_null(hnd)        ((hnd).c == 0)
 

compat.h: drop COMPAT_HANDLE_PARAM()

The need for 8844ed299a ("x86/dmop: Fix compat_dm_op() ABI") has made clear that its presence is actively dangerous. At the hypercall entry points XEN_GUEST_HANDLE_PARAM() should be used anyway (regardless of whether these are native or compat entry points), and passing around handles internally shouldn't use their compat representation either.

xen/include/xen/compat.h +0 -3
@@ -25,9 +25,6 @@
     __DEFINE_COMPAT_HANDLE(name, name)
 #define COMPAT_HANDLE(name)          __compat_handle_ ## name
 
-/* NB: it is assumed that if an arch uses the compat layer it does not
- * distinguish handles from parameter handles. */
-#define COMPAT_HANDLE_PARAM(name)    __compat_handle_ ## name
 /* Is the compat handle a NULL reference? */
 #define compat_handle_is_null(hnd)        ((hnd).c == 0)
 

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jan Beulich

The need for 8844ed299a ("x86/dmop: Fix compat_dm_op() ABI") has made clear that its presence is actively dangerous. At the hypercall entry points XEN_GUEST_HANDLE_PARAM() should be used anyway (regardless of whether these are native or compat entry points), and passing around handles internally shouldn't use their compat representation either.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Acked-by on v1 1/1
#2 lore raw
In reply to Jan Beulich
Quoted 7 lines · Jan Beulich

The need for 8844ed299a ("x86/dmop: Fix compat_dm_op() ABI") has made clear that its presence is actively dangerous. At the hypercall entry points XEN_GUEST_HANDLE_PARAM() should be used anyway (regardless of whether these are native or compat entry points), and passing around handles internally shouldn't use their compat representation either.

Quoted 7 lines

xen/include/xen/compat.h line 30

Quoted 9 lines
xen/include/xen/compat.h +0 -3
@@ -25,9 +25,6 @@
     __DEFINE_COMPAT_HANDLE(name, name)
 #define COMPAT_HANDLE(name)          __compat_handle_ ## name
 
-/* NB: it is assumed that if an arch uses the compat layer it does not
- * distinguish handles from parameter handles. */
-#define COMPAT_HANDLE_PARAM(name)    __compat_handle_ ## name
 /* Is the compat handle a NULL reference? */
 #define compat_handle_is_null(hnd)        ((hnd).c == 0)
 

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel