Commit b808f62
selftests: mm: fix build errors on armhf
The __NR_mmap isn't found on armhf. The mmap() is commonly available
system call and its wrapper is present on all architectures. So it should
be used directly. It solves problem for armhf and doesn't create problem
for other architectures.
Remove sys_mmap() functions as they aren't doing anything else other than
calling mmap(). There is no need to set errno = 0 manually as glibc
always resets it.
For reference errors are as following:
CC seal_elf
seal_elf.c: In function 'sys_mmap':
seal_elf.c:39:33: error: '__NR_mmap' undeclared (first use in this function)
39 | sret = (void *) syscall(__NR_mmap, addr, len, prot,
| ^~~~~~~~~
mseal_test.c: In function 'sys_mmap':
mseal_test.c:90:33: error: '__NR_mmap' undeclared (first use in this function)
90 | sret = (void *) syscall(__NR_mmap, addr, len, prot,
| ^~~~~~~~~
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 4926c7a ("selftest mm/mseal memory sealing")
Signed-off-by: Muhammad Usama Anjum <[email protected]>
Cc: Jeff Xu <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Liam R. Howlett <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent 431c164 commit b808f62
2 files changed
+14
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 84 | | |
96 | 85 | | |
97 | 86 | | |
| |||
172 | 161 | | |
173 | 162 | | |
174 | 163 | | |
175 | | - | |
| 164 | + | |
176 | 165 | | |
177 | 166 | | |
178 | 167 | | |
| |||
181 | 170 | | |
182 | 171 | | |
183 | 172 | | |
184 | | - | |
| 173 | + | |
185 | 174 | | |
186 | 175 | | |
187 | 176 | | |
| |||
205 | 194 | | |
206 | 195 | | |
207 | 196 | | |
208 | | - | |
| 197 | + | |
209 | 198 | | |
210 | 199 | | |
211 | 200 | | |
| |||
481 | 470 | | |
482 | 471 | | |
483 | 472 | | |
484 | | - | |
485 | | - | |
| 473 | + | |
| 474 | + | |
486 | 475 | | |
487 | 476 | | |
488 | 477 | | |
| |||
1209 | 1198 | | |
1210 | 1199 | | |
1211 | 1200 | | |
1212 | | - | |
1213 | | - | |
| 1201 | + | |
| 1202 | + | |
1214 | 1203 | | |
1215 | 1204 | | |
1216 | 1205 | | |
| |||
1240 | 1229 | | |
1241 | 1230 | | |
1242 | 1231 | | |
1243 | | - | |
1244 | | - | |
| 1232 | + | |
| 1233 | + | |
1245 | 1234 | | |
1246 | 1235 | | |
1247 | 1236 | | |
| |||
1268 | 1257 | | |
1269 | 1258 | | |
1270 | 1259 | | |
1271 | | - | |
1272 | | - | |
| 1260 | + | |
| 1261 | + | |
1273 | 1262 | | |
1274 | 1263 | | |
1275 | 1264 | | |
| |||
1650 | 1639 | | |
1651 | 1640 | | |
1652 | 1641 | | |
1653 | | - | |
| 1642 | + | |
1654 | 1643 | | |
1655 | 1644 | | |
1656 | 1645 | | |
| |||
1680 | 1669 | | |
1681 | 1670 | | |
1682 | 1671 | | |
1683 | | - | |
| 1672 | + | |
1684 | 1673 | | |
1685 | 1674 | | |
1686 | 1675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 33 | | |
45 | 34 | | |
46 | 35 | | |
| |||
56 | 45 | | |
57 | 46 | | |
58 | 47 | | |
59 | | - | |
| 48 | + | |
60 | 49 | | |
61 | 50 | | |
62 | 51 | | |
| |||
0 commit comments