Skip to content

Commit e7ad4f3

Browse files
committed
fix: remove UFFDIO_WRITEPROTECT from linux4_11/4_14 modules
This ioctl was only added in linux 5.7 [1], so remove the bindings for the ioctl number from the 4_11 and 4_14 features. The actual writeprotect functionality was already gated behind the linux5_7 feature. [1]: https://man7.org/linux/man-pages/man2/UFFDIO_WRITEPROTECT.2const.html Signed-off-by: Patrick Roy <[email protected]>
1 parent 6b9b777 commit e7ad4f3

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

userfaultfd-sys/src/linux4_11.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ pub const UFFDIO_UNREGISTER: u32 = 0x8010aa01;
2929
pub const UFFDIO_WAKE: u32 = 0x8010aa02;
3030
pub const UFFDIO_COPY: u32 = 0xc028aa03;
3131
pub const UFFDIO_ZEROPAGE: u32 = 0xc020aa04;
32-
pub const UFFDIO_WRITEPROTECT: u32 = 0xc018aa06;
3332

3433
#[cfg(test)]
3534
mod const_tests {
@@ -51,7 +50,6 @@ mod const_tests {
5150
static _const_UFFDIO_WAKE: u32;
5251
static _const_UFFDIO_COPY: u32;
5352
static _const_UFFDIO_ZEROPAGE: u32;
54-
static _const_UFFDIO_WRITEPROTECT: u32;
5553
}
5654

5755
#[test]
@@ -96,10 +94,6 @@ mod const_tests {
9694
assert_eq!(UFFDIO_WAKE, _const_UFFDIO_WAKE, "UFFDIO_WAKE");
9795
assert_eq!(UFFDIO_COPY, _const_UFFDIO_COPY, "UFFDIO_COPY");
9896
assert_eq!(UFFDIO_ZEROPAGE, _const_UFFDIO_ZEROPAGE, "UFFDIO_ZEROPAGE");
99-
assert_eq!(
100-
UFFDIO_WRITEPROTECT, _const_UFFDIO_WRITEPROTECT,
101-
"UFFDIO_WRITEPROTECT"
102-
);
10397
}
10498
}
10599
}

userfaultfd-sys/src/linux4_14.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ pub const UFFDIO_UNREGISTER: u32 = 0x8010aa01;
3232
pub const UFFDIO_WAKE: u32 = 0x8010aa02;
3333
pub const UFFDIO_COPY: u32 = 0xc028aa03;
3434
pub const UFFDIO_ZEROPAGE: u32 = 0xc020aa04;
35-
pub const UFFDIO_WRITEPROTECT: u32 = 0xc018aa06;
3635

3736
#[cfg(test)]
3837
mod const_tests {
@@ -55,7 +54,6 @@ mod const_tests {
5554
static _const_UFFDIO_WAKE: u32;
5655
static _const_UFFDIO_COPY: u32;
5756
static _const_UFFDIO_ZEROPAGE: u32;
58-
static _const_UFFDIO_WRITEPROTECT: u32;
5957
}
6058

6159
#[test]
@@ -104,10 +102,6 @@ mod const_tests {
104102
assert_eq!(UFFDIO_WAKE, _const_UFFDIO_WAKE, "UFFDIO_WAKE");
105103
assert_eq!(UFFDIO_COPY, _const_UFFDIO_COPY, "UFFDIO_COPY");
106104
assert_eq!(UFFDIO_ZEROPAGE, _const_UFFDIO_ZEROPAGE, "UFFDIO_ZEROPAGE");
107-
assert_eq!(
108-
UFFDIO_WRITEPROTECT, _const_UFFDIO_WRITEPROTECT,
109-
"UFFDIO_WRITEPROTECT"
110-
);
111105
}
112106
}
113107
}

0 commit comments

Comments
 (0)