History

xen: Make struct privcmd_irqfd's layout architecture independent

Using indirect pointers in an ioctl command argument means that the layout is architecture specific, in particular we can't use the same one from 32-bit compat tasks. The general recommendation is to have __u64 members and use u64_to_user_ptr() to access it from the kernel if we are unable to avoid the pointers altogether.

Viresh Kumar committed 3 years ago

Commit 8dd765a1 parent d3a2b6b2 files · +2 −2Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/xen/privcmd.h+1−1
@@ -102,7 +102,7 @@ struct privcmd_mmap_resource { · 101 unmodified lines
102#define PRIVCMD_IRQFD_FLAG_DEASSIGN (1 << 0)102#define PRIVCMD_IRQFD_FLAG_DEASSIGN (1 << 0)
103 103
104struct privcmd_irqfd {104struct privcmd_irqfd {
105 void __user *dm_op;105 __u64 dm_op;
106 __u32 size; /* Size of structure pointed by dm_op */106 __u32 size; /* Size of structure pointed by dm_op */
107 __u32 fd;107 __u32 fd;
108 __u32 flags;108 __u32 flags;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t