1 |
commit: 4af93ce8ff9b89ce69d99f9f136a84ad12f3acd5 |
2 |
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Feb 2 16:41:54 2020 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 5 15:04:53 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4af93ce8 |
7 |
|
8 |
app-emulation/virtualbox-modules: remove unused patch |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/14533 |
13 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
14 |
|
15 |
...x-modules-6.0.12-linux-5.3+-compatibility.patch | 76 ----- |
16 |
.../virtualbox-modules-6.0.14-kernel-5.4_rc6.patch | 308 --------------------- |
17 |
2 files changed, 384 deletions(-) |
18 |
|
19 |
diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.12-linux-5.3+-compatibility.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.12-linux-5.3+-compatibility.patch |
20 |
deleted file mode 100644 |
21 |
index ff573dd69b6..00000000000 |
22 |
--- a/app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.12-linux-5.3+-compatibility.patch |
23 |
+++ /dev/null |
24 |
@@ -1,76 +0,0 @@ |
25 |
-https://bugs.gentoo.org/694560 |
26 |
- |
27 |
-https://www.virtualbox.org/ticket/18911#comment:5 |
28 |
- |
29 |
---- a/vboxnetflt//linux/VBoxNetFlt-linux.c |
30 |
-+++ b/vboxnetflt//linux/VBoxNetFlt-linux.c |
31 |
-@@ -2123,7 +2123,9 @@ static int vboxNetFltLinuxEnumeratorCallback(struct notifier_block *self, unsign |
32 |
- #endif |
33 |
- if (in_dev != NULL) |
34 |
- { |
35 |
-- for_ifa(in_dev) { |
36 |
-+ struct in_ifaddr *ifa; |
37 |
-+ |
38 |
-+ for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) { |
39 |
- if (VBOX_IPV4_IS_LOOPBACK(ifa->ifa_address)) |
40 |
- return NOTIFY_OK; |
41 |
- |
42 |
-@@ -2137,7 +2139,7 @@ static int vboxNetFltLinuxEnumeratorCallback(struct notifier_block *self, unsign |
43 |
- |
44 |
- pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort, |
45 |
- /* :fAdded */ true, kIntNetAddrType_IPv4, &ifa->ifa_address); |
46 |
-- } endfor_ifa(in_dev); |
47 |
-+ } |
48 |
- } |
49 |
- |
50 |
- /* |
51 |
---- a/vboxdrv/r0drv/linux/mp-r0drv-linux.c |
52 |
-+++ b/vboxdrv/r0drv/linux/mp-r0drv-linux.c |
53 |
-@@ -283,12 +283,15 @@ RTDECL(int) RTMpOnAll(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2) |
54 |
- if (RTCpuSetCount(&OnlineSet) > 1) |
55 |
- { |
56 |
- /* Fire the function on all other CPUs without waiting for completion. */ |
57 |
--# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) |
58 |
-+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0) |
59 |
-+ smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */); |
60 |
-+# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) |
61 |
- int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* wait */); |
62 |
-+ Assert(!rc); NOREF(rc); |
63 |
- # else |
64 |
- int rc = smp_call_function(rtmpLinuxAllWrapper, &Args, 0 /* retry */, 0 /* wait */); |
65 |
--# endif |
66 |
- Assert(!rc); NOREF(rc); |
67 |
-+# endif |
68 |
- } |
69 |
- #endif |
70 |
- |
71 |
-@@ -326,7 +329,6 @@ RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2) |
72 |
- { |
73 |
- #ifdef CONFIG_SMP |
74 |
- IPRT_LINUX_SAVE_EFL_AC(); |
75 |
-- int rc; |
76 |
- RTMPARGS Args; |
77 |
- |
78 |
- RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER; |
79 |
-@@ -337,14 +339,17 @@ RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2) |
80 |
- Args.cHits = 0; |
81 |
- |
82 |
- RTThreadPreemptDisable(&PreemptState); |
83 |
--# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) |
84 |
-- rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */); |
85 |
-+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 0) |
86 |
-+ smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */); |
87 |
-+# elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) |
88 |
-+ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 1 /* wait */); |
89 |
-+ Assert(rc == 0); NOREF(rc); |
90 |
- # else /* older kernels */ |
91 |
-- rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */); |
92 |
-+ int rc = smp_call_function(rtmpLinuxWrapper, &Args, 0 /* retry */, 1 /* wait */); |
93 |
-+ Assert(rc == 0); NOREF(rc); |
94 |
- # endif /* older kernels */ |
95 |
- RTThreadPreemptRestore(&PreemptState); |
96 |
- |
97 |
-- Assert(rc == 0); NOREF(rc); |
98 |
- IPRT_LINUX_RESTORE_EFL_AC(); |
99 |
- #else |
100 |
- RT_NOREF(pfnWorker, pvUser1, pvUser2); |
101 |
|
102 |
diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.14-kernel-5.4_rc6.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.14-kernel-5.4_rc6.patch |
103 |
deleted file mode 100644 |
104 |
index 2c52aa6757c..00000000000 |
105 |
--- a/app-emulation/virtualbox-modules/files/virtualbox-modules-6.0.14-kernel-5.4_rc6.patch |
106 |
+++ /dev/null |
107 |
@@ -1,308 +0,0 @@ |
108 |
-https://www.virtualbox.org/changeset/81586/vbox |
109 |
-https://www.virtualbox.org/changeset/81587/vbox |
110 |
-https://www.virtualbox.org/changeset/81649/vbox (partially) |
111 |
- |
112 |
---- 6.0.14/vboxdrv/include/iprt/cdefs.h |
113 |
-+++ 6.0.14/vboxdrv/include/iprt/cdefs.h |
114 |
-@@ -1166,7 +1166,7 @@ |
115 |
- * Tell the compiler that we're falling through to the next case in a switch. |
116 |
- * @sa RT_FALL_THRU */ |
117 |
- #if RT_GNUC_PREREQ(7, 0) |
118 |
--# define RT_FALL_THROUGH() __attribute__((fallthrough)) |
119 |
-+# define RT_FALL_THROUGH() __attribute__((__fallthrough__)) |
120 |
- #else |
121 |
- # define RT_FALL_THROUGH() (void)0 |
122 |
- #endif |
123 |
---- 6.0.14/vboxdrv/r0drv/linux/alloc-r0drv-linux.c |
124 |
-+++ 6.0.14/vboxdrv/r0drv/linux/alloc-r0drv-linux.c |
125 |
-@@ -443,9 +443,6 @@ |
126 |
- } |
127 |
- |
128 |
- SetPageReserved(&paPages[iPage]); |
129 |
--#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ |
130 |
-- MY_SET_PAGES_EXEC(&paPages[iPage], 1); |
131 |
--#endif |
132 |
- } |
133 |
- *pPhys = page_to_phys(paPages); |
134 |
- pvRet = phys_to_virt(page_to_phys(paPages)); |
135 |
-@@ -491,9 +488,6 @@ |
136 |
- for (iPage = 0; iPage < cPages; iPage++) |
137 |
- { |
138 |
- ClearPageReserved(&paPages[iPage]); |
139 |
--#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 20) /** @todo find the exact kernel where change_page_attr was introduced. */ |
140 |
-- MY_SET_PAGES_NOEXEC(&paPages[iPage], 1); |
141 |
--#endif |
142 |
- } |
143 |
- __free_pages(paPages, cOrder); |
144 |
- IPRT_LINUX_RESTORE_EFL_AC(); |
145 |
---- 6.0.14/vboxdrv/r0drv/linux/memobj-r0drv-linux.c |
146 |
-+++ 6.0.14/vboxdrv/r0drv/linux/memobj-r0drv-linux.c |
147 |
-@@ -86,6 +86,8 @@ |
148 |
- /** Set if the allocation is contiguous. |
149 |
- * This means it has to be given back as one chunk. */ |
150 |
- bool fContiguous; |
151 |
-+ /** Set if executable allocation. */ |
152 |
-+ bool fExecutable; |
153 |
- /** Set if we've vmap'ed the memory into ring-0. */ |
154 |
- bool fMappedToRing0; |
155 |
- /** The pages in the apPages array. */ |
156 |
-@@ -289,10 +291,11 @@ |
157 |
- * Only valid if fContiguous == true, ignored otherwise. |
158 |
- * @param fFlagsLnx The page allocation flags (GPFs). |
159 |
- * @param fContiguous Whether the allocation must be contiguous. |
160 |
-+ * @param fExecutable Whether the memory must be executable. |
161 |
- * @param rcNoMem What to return when we're out of pages. |
162 |
- */ |
163 |
- static int rtR0MemObjLinuxAllocPages(PRTR0MEMOBJLNX *ppMemLnx, RTR0MEMOBJTYPE enmType, size_t cb, |
164 |
-- size_t uAlignment, gfp_t fFlagsLnx, bool fContiguous, int rcNoMem) |
165 |
-+ size_t uAlignment, gfp_t fFlagsLnx, bool fContiguous, bool fExecutable, int rcNoMem) |
166 |
- { |
167 |
- size_t iPage; |
168 |
- size_t const cPages = cb >> PAGE_SHIFT; |
169 |
-@@ -371,7 +374,8 @@ |
170 |
- for (iPage = 0; iPage < cPages; iPage++) |
171 |
- { |
172 |
- pMemLnx->apPages[iPage] = &paPages[iPage]; |
173 |
-- MY_SET_PAGES_EXEC(pMemLnx->apPages[iPage], 1); |
174 |
-+ if (fExecutable) |
175 |
-+ MY_SET_PAGES_EXEC(pMemLnx->apPages[iPage], 1); |
176 |
- if (PageHighMem(pMemLnx->apPages[iPage])) |
177 |
- BUG(); |
178 |
- } |
179 |
-@@ -379,6 +383,7 @@ |
180 |
- fContiguous = true; |
181 |
- #endif /* < 2.4.22 */ |
182 |
- pMemLnx->fContiguous = fContiguous; |
183 |
-+ pMemLnx->fExecutable = fExecutable; |
184 |
- |
185 |
- #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) |
186 |
- /* |
187 |
-@@ -409,7 +414,7 @@ |
188 |
- * This should never happen! |
189 |
- */ |
190 |
- printk("rtR0MemObjLinuxAllocPages(cb=0x%lx, uAlignment=0x%lx): alloc_pages(..., %d) returned physical memory at 0x%lx!\n", |
191 |
-- (unsigned long)cb, (unsigned long)uAlignment, rtR0MemObjLinuxOrder(cPages), (unsigned long)page_to_phys(pMemLnx->apPages[0])); |
192 |
-+ (unsigned long)cb, (unsigned long)uAlignment, rtR0MemObjLinuxOrder(cPages), (unsigned long)page_to_phys(pMemLnx->apPages[0])); |
193 |
- rtR0MemObjLinuxFreePages(pMemLnx); |
194 |
- return rcNoMem; |
195 |
- } |
196 |
-@@ -438,14 +443,12 @@ |
197 |
- while (iPage-- > 0) |
198 |
- { |
199 |
- #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) |
200 |
-- /* |
201 |
-- * See SetPageReserved() in rtR0MemObjLinuxAllocPages() |
202 |
-- */ |
203 |
-+ /* See SetPageReserved() in rtR0MemObjLinuxAllocPages() */ |
204 |
- ClearPageReserved(pMemLnx->apPages[iPage]); |
205 |
- #endif |
206 |
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 22) |
207 |
--#else |
208 |
-- MY_SET_PAGES_NOEXEC(pMemLnx->apPages[iPage], 1); |
209 |
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 22) |
210 |
-+ if (pMemLnx->fExecutable) |
211 |
-+ MY_SET_PAGES_NOEXEC(pMemLnx->apPages[iPage], 1); |
212 |
- #endif |
213 |
- } |
214 |
- |
215 |
-@@ -662,10 +665,10 @@ |
216 |
- |
217 |
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 22) |
218 |
- rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_PAGE, cb, PAGE_SIZE, GFP_HIGHUSER, |
219 |
-- false /* non-contiguous */, VERR_NO_MEMORY); |
220 |
-+ false /* non-contiguous */, fExecutable, VERR_NO_MEMORY); |
221 |
- #else |
222 |
- rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_PAGE, cb, PAGE_SIZE, GFP_USER, |
223 |
-- false /* non-contiguous */, VERR_NO_MEMORY); |
224 |
-+ false /* non-contiguous */, fExecutable, VERR_NO_MEMORY); |
225 |
- #endif |
226 |
- if (RT_SUCCESS(rc)) |
227 |
- { |
228 |
-@@ -696,19 +699,19 @@ |
229 |
- #if (defined(RT_ARCH_AMD64) || defined(CONFIG_X86_PAE)) && defined(GFP_DMA32) |
230 |
- /* ZONE_DMA32: 0-4GB */ |
231 |
- rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_LOW, cb, PAGE_SIZE, GFP_DMA32, |
232 |
-- false /* non-contiguous */, VERR_NO_LOW_MEMORY); |
233 |
-+ false /* non-contiguous */, fExecutable, VERR_NO_LOW_MEMORY); |
234 |
- if (RT_FAILURE(rc)) |
235 |
- #endif |
236 |
- #ifdef RT_ARCH_AMD64 |
237 |
- /* ZONE_DMA: 0-16MB */ |
238 |
- rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_LOW, cb, PAGE_SIZE, GFP_DMA, |
239 |
-- false /* non-contiguous */, VERR_NO_LOW_MEMORY); |
240 |
-+ false /* non-contiguous */, fExecutable, VERR_NO_LOW_MEMORY); |
241 |
- #else |
242 |
- # ifdef CONFIG_X86_PAE |
243 |
- # endif |
244 |
- /* ZONE_NORMAL: 0-896MB */ |
245 |
- rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_LOW, cb, PAGE_SIZE, GFP_USER, |
246 |
-- false /* non-contiguous */, VERR_NO_LOW_MEMORY); |
247 |
-+ false /* non-contiguous */, fExecutable, VERR_NO_LOW_MEMORY); |
248 |
- #endif |
249 |
- if (RT_SUCCESS(rc)) |
250 |
- { |
251 |
-@@ -738,17 +741,17 @@ |
252 |
- #if (defined(RT_ARCH_AMD64) || defined(CONFIG_X86_PAE)) && defined(GFP_DMA32) |
253 |
- /* ZONE_DMA32: 0-4GB */ |
254 |
- rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_CONT, cb, PAGE_SIZE, GFP_DMA32, |
255 |
-- true /* contiguous */, VERR_NO_CONT_MEMORY); |
256 |
-+ true /* contiguous */, fExecutable, VERR_NO_CONT_MEMORY); |
257 |
- if (RT_FAILURE(rc)) |
258 |
- #endif |
259 |
- #ifdef RT_ARCH_AMD64 |
260 |
- /* ZONE_DMA: 0-16MB */ |
261 |
- rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_CONT, cb, PAGE_SIZE, GFP_DMA, |
262 |
-- true /* contiguous */, VERR_NO_CONT_MEMORY); |
263 |
-+ true /* contiguous */, fExecutable, VERR_NO_CONT_MEMORY); |
264 |
- #else |
265 |
- /* ZONE_NORMAL (32-bit hosts): 0-896MB */ |
266 |
- rc = rtR0MemObjLinuxAllocPages(&pMemLnx, RTR0MEMOBJTYPE_CONT, cb, PAGE_SIZE, GFP_USER, |
267 |
-- true /* contiguous */, VERR_NO_CONT_MEMORY); |
268 |
-+ true /* contiguous */, fExecutable, VERR_NO_CONT_MEMORY); |
269 |
- #endif |
270 |
- if (RT_SUCCESS(rc)) |
271 |
- { |
272 |
-@@ -795,7 +798,7 @@ |
273 |
- |
274 |
- rc = rtR0MemObjLinuxAllocPages(&pMemLnx, enmType, cb, uAlignment, fGfp, |
275 |
- enmType == RTR0MEMOBJTYPE_PHYS /* contiguous / non-contiguous */, |
276 |
-- VERR_NO_PHYS_MEMORY); |
277 |
-+ false /*fExecutable*/, VERR_NO_PHYS_MEMORY); |
278 |
- if (RT_FAILURE(rc)) |
279 |
- return rc; |
280 |
- |
281 |
---- 6.0.14/vboxdrv/r0drv/linux/the-linux-kernel.h |
282 |
-+++ 6.0.14/vboxdrv/r0drv/linux/the-linux-kernel.h |
283 |
-@@ -337,8 +337,10 @@ |
284 |
- #endif |
285 |
- |
286 |
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) |
287 |
--# define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages) |
288 |
--# define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages) |
289 |
-+# if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) /* The interface was removed, but we only need it for < 2.4.22, so who cares. */ |
290 |
-+# define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages) |
291 |
-+# define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages) |
292 |
-+# endif |
293 |
- #else |
294 |
- # define MY_SET_PAGES_EXEC(pPages, cPages) \ |
295 |
- do { \ |
296 |
---- 6.0.14/vboxdrv/r0drv/linux/thread2-r0drv-linux.c |
297 |
-+++ 6.0.14/vboxdrv/r0drv/linux/thread2-r0drv-linux.c |
298 |
-@@ -36,6 +36,9 @@ |
299 |
- #include <iprt/errcore.h> |
300 |
- #include "internal/thread.h" |
301 |
- |
302 |
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) |
303 |
-+ #include <uapi/linux/sched/types.h> |
304 |
-+#endif /* >= KERNEL_VERSION(4, 11, 0) */ |
305 |
- |
306 |
- RTDECL(RTTHREAD) RTThreadSelf(void) |
307 |
- { |
308 |
---- 6.0.14/vboxnetadp/include/iprt/cdefs.h |
309 |
-+++ 6.0.14/vboxnetadp/include/iprt/cdefs.h |
310 |
-@@ -1166,7 +1166,7 @@ |
311 |
- * Tell the compiler that we're falling through to the next case in a switch. |
312 |
- * @sa RT_FALL_THRU */ |
313 |
- #if RT_GNUC_PREREQ(7, 0) |
314 |
--# define RT_FALL_THROUGH() __attribute__((fallthrough)) |
315 |
-+# define RT_FALL_THROUGH() __attribute__((__fallthrough__)) |
316 |
- #else |
317 |
- # define RT_FALL_THROUGH() (void)0 |
318 |
- #endif |
319 |
---- 6.0.14/vboxnetadp/r0drv/linux/the-linux-kernel.h |
320 |
-+++ 6.0.14/vboxnetadp/r0drv/linux/the-linux-kernel.h |
321 |
-@@ -337,8 +337,10 @@ |
322 |
- #endif |
323 |
- |
324 |
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) |
325 |
--# define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages) |
326 |
--# define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages) |
327 |
-+# if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) /* The interface was removed, but we only need it for < 2.4.22, so who cares. */ |
328 |
-+# define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages) |
329 |
-+# define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages) |
330 |
-+# endif |
331 |
- #else |
332 |
- # define MY_SET_PAGES_EXEC(pPages, cPages) \ |
333 |
- do { \ |
334 |
---- 6.0.14/vboxnetflt/include/iprt/cdefs.h |
335 |
-+++ 6.0.14/vboxnetflt/include/iprt/cdefs.h |
336 |
-@@ -1166,7 +1166,7 @@ |
337 |
- * Tell the compiler that we're falling through to the next case in a switch. |
338 |
- * @sa RT_FALL_THRU */ |
339 |
- #if RT_GNUC_PREREQ(7, 0) |
340 |
--# define RT_FALL_THROUGH() __attribute__((fallthrough)) |
341 |
-+# define RT_FALL_THROUGH() __attribute__((__fallthrough__)) |
342 |
- #else |
343 |
- # define RT_FALL_THROUGH() (void)0 |
344 |
- #endif |
345 |
---- 6.0.14/vboxnetflt/linux/VBoxNetFlt-linux.c |
346 |
-+++ 6.0.14/vboxnetflt/linux/VBoxNetFlt-linux.c |
347 |
-@@ -924,8 +924,13 @@ |
348 |
- for (i = 0; i < skb_shinfo(pBuf)->nr_frags; i++) |
349 |
- { |
350 |
- skb_frag_t *pFrag = &skb_shinfo(pBuf)->frags[i]; |
351 |
-+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) |
352 |
-+ pSG->aSegs[iSeg].cb = pFrag->bv_len; |
353 |
-+ pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset; |
354 |
-+# else /* < KERNEL_VERSION(5, 4, 0) */ |
355 |
- pSG->aSegs[iSeg].cb = pFrag->size; |
356 |
- pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset; |
357 |
-+# endif /* >= KERNEL_VERSION(5, 4, 0) */ |
358 |
- Log6((" %p", pSG->aSegs[iSeg].pv)); |
359 |
- pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS; |
360 |
- Assert(iSeg <= pSG->cSegsAlloc); |
361 |
-@@ -940,8 +945,13 @@ |
362 |
- for (i = 0; i < skb_shinfo(pFragBuf)->nr_frags; i++) |
363 |
- { |
364 |
- skb_frag_t *pFrag = &skb_shinfo(pFragBuf)->frags[i]; |
365 |
-+# if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) |
366 |
-+ pSG->aSegs[iSeg].cb = pFrag->bv_len; |
367 |
-+ pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->bv_offset; |
368 |
-+# else /* < KERNEL_VERSION(5, 4, 0) */ |
369 |
- pSG->aSegs[iSeg].cb = pFrag->size; |
370 |
- pSG->aSegs[iSeg].pv = VBOX_SKB_KMAP_FRAG(pFrag) + pFrag->page_offset; |
371 |
-+# endif /* >= KERNEL_VERSION(5, 4, 0) */ |
372 |
- Log6((" %p", pSG->aSegs[iSeg].pv)); |
373 |
- pSG->aSegs[iSeg++].Phys = NIL_RTHCPHYS; |
374 |
- Assert(iSeg <= pSG->cSegsAlloc); |
375 |
---- 6.0.14/vboxnetflt/r0drv/linux/the-linux-kernel.h |
376 |
-+++ 6.0.14/vboxnetflt/r0drv/linux/the-linux-kernel.h |
377 |
-@@ -337,8 +337,10 @@ |
378 |
- #endif |
379 |
- |
380 |
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) |
381 |
--# define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages) |
382 |
--# define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages) |
383 |
-+# if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) /* The interface was removed, but we only need it for < 2.4.22, so who cares. */ |
384 |
-+# define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages) |
385 |
-+# define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages) |
386 |
-+# endif |
387 |
- #else |
388 |
- # define MY_SET_PAGES_EXEC(pPages, cPages) \ |
389 |
- do { \ |
390 |
---- 6.0.14/vboxpci/include/iprt/cdefs.h |
391 |
-+++ 6.0.14/vboxpci/include/iprt/cdefs.h |
392 |
-@@ -1166,7 +1166,7 @@ |
393 |
- * Tell the compiler that we're falling through to the next case in a switch. |
394 |
- * @sa RT_FALL_THRU */ |
395 |
- #if RT_GNUC_PREREQ(7, 0) |
396 |
--# define RT_FALL_THROUGH() __attribute__((fallthrough)) |
397 |
-+# define RT_FALL_THROUGH() __attribute__((__fallthrough__)) |
398 |
- #else |
399 |
- # define RT_FALL_THROUGH() (void)0 |
400 |
- #endif |
401 |
---- 6.0.14/vboxpci/r0drv/linux/the-linux-kernel.h |
402 |
-+++ 6.0.14/vboxpci/r0drv/linux/the-linux-kernel.h |
403 |
-@@ -337,8 +337,10 @@ |
404 |
- #endif |
405 |
- |
406 |
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25) |
407 |
--# define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages) |
408 |
--# define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages) |
409 |
-+# if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) /* The interface was removed, but we only need it for < 2.4.22, so who cares. */ |
410 |
-+# define MY_SET_PAGES_EXEC(pPages, cPages) set_pages_x(pPages, cPages) |
411 |
-+# define MY_SET_PAGES_NOEXEC(pPages, cPages) set_pages_nx(pPages, cPages) |
412 |
-+# endif |
413 |
- #else |
414 |
- # define MY_SET_PAGES_EXEC(pPages, cPages) \ |
415 |
- do { \ |