Commit ea88d84
userspace: perform library loading in kernel context
When running in syscall context on behalf of a userspace thread
dynamically mapped memory doesn't automatically become accessible.
To make it accessible it has to be added to the thread memory domain.
This is a problem for loadable modules with executable cold sections.
To be able to execute them they have to be mapped to threads with the
executable bit set. While for linking that memory has to be mapped
writable. To solve the problem we perform linking from the kernel IPC
context before forwarding to the userspace IPC thread.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>1 parent 8e868ce commit ea88d84
3 files changed
Lines changed: 55 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1576 | 1576 | | |
1577 | 1577 | | |
1578 | 1578 | | |
1579 | | - | |
1580 | 1579 | | |
1581 | 1580 | | |
1582 | 1581 | | |
| |||
1586 | 1585 | | |
1587 | 1586 | | |
1588 | 1587 | | |
1589 | | - | |
1590 | | - | |
1591 | | - | |
1592 | | - | |
1593 | | - | |
1594 | | - | |
1595 | | - | |
1596 | | - | |
1597 | | - | |
1598 | | - | |
1599 | | - | |
1600 | | - | |
1601 | | - | |
1602 | | - | |
1603 | | - | |
| 1588 | + | |
1604 | 1589 | | |
1605 | | - | |
1606 | | - | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
1607 | 1598 | | |
1608 | | - | |
| 1599 | + | |
1609 | 1600 | | |
1610 | 1601 | | |
1611 | 1602 | | |
| |||
1779 | 1770 | | |
1780 | 1771 | | |
1781 | 1772 | | |
1782 | | - | |
1783 | 1773 | | |
1784 | | - | |
1785 | | - | |
1786 | | - | |
1787 | | - | |
| 1774 | + | |
1788 | 1775 | | |
1789 | 1776 | | |
1790 | | - | |
| 1777 | + | |
1791 | 1778 | | |
1792 | 1779 | | |
1793 | 1780 | | |
1794 | 1781 | | |
1795 | | - | |
| 1782 | + | |
| 1783 | + | |
1796 | 1784 | | |
1797 | 1785 | | |
1798 | 1786 | | |
1799 | 1787 | | |
1800 | 1788 | | |
1801 | | - | |
1802 | | - | |
1803 | | - | |
1804 | | - | |
1805 | | - | |
1806 | | - | |
1807 | 1789 | | |
1808 | 1790 | | |
1809 | 1791 | | |
1810 | 1792 | | |
1811 | 1793 | | |
| 1794 | + | |
1812 | 1795 | | |
1813 | 1796 | | |
1814 | 1797 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
239 | 271 | | |
240 | 272 | | |
241 | 273 | | |
| |||
0 commit comments