Commit c7ee8ae
committed
module: add stop-grap sanity check on module memcpy()
The integrity of the struct module we load is important, and although
our ELF validator already checks that the module section must match
struct module, add a stop-gap check before we memcpy() the final minted
module. This also makes those inspecting the code what the goal is.
While at it, clarify the goal behind updating the sh_addr address.
The current comment is pretty misleading.
Signed-off-by: Luis Chamberlain <[email protected]>1 parent 4675282 commit c7ee8ae
1 file changed
+22
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2213 | 2213 | | |
2214 | 2214 | | |
2215 | 2215 | | |
2216 | | - | |
| 2216 | + | |
| 2217 | + | |
2217 | 2218 | | |
2218 | 2219 | | |
2219 | 2220 | | |
| |||
2249 | 2250 | | |
2250 | 2251 | | |
2251 | 2252 | | |
2252 | | - | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
2253 | 2265 | | |
2254 | | - | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
2255 | 2273 | | |
2256 | 2274 | | |
2257 | 2275 | | |
| |||
2261 | 2279 | | |
2262 | 2280 | | |
2263 | 2281 | | |
2264 | | - | |
| 2282 | + | |
2265 | 2283 | | |
2266 | 2284 | | |
2267 | 2285 | | |
| |||
0 commit comments