From: Thomas M. <th...@m3...> - 2017-05-17 22:11:18
|
This is actually a no-op as all read-only should be read-only in the ELF. Signed-off-by: Thomas Meyer <th...@m3...> --- arch/um/Kconfig.common | 1 + arch/um/kernel/mem.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common index 85f6dd2..061009b 100644 --- a/arch/um/Kconfig.common +++ b/arch/um/Kconfig.common @@ -2,6 +2,7 @@ config UML bool default y select ARCH_HAS_KCOV + select ARCH_HAS_STRICT_KERNEL_RWX select HAVE_ARCH_AUDITSYSCALL select HAVE_ARCH_SECCOMP_FILTER select HAVE_UID16 diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index e7437ec..027ed03 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c @@ -168,7 +168,6 @@ void __init paging_init(void) * This can't do anything because nothing in the kernel image can be freed * since it's not in kernel physical memory. */ - void free_initmem(void) { } @@ -238,3 +237,7 @@ void *uml_kmalloc(int size, int flags) { return kmalloc(size, flags); } + +void mark_rodata_ro(void) +{ +} |
From: Richard W. <ric...@gm...> - 2017-05-21 21:28:12
|
Thomas, On Thu, May 18, 2017 at 12:11 AM, Thomas Meyer <th...@m3...> wrote: > This is actually a no-op as all read-only should be read-only in the ELF. What problem does this patch fix? Or what is the purpose? -- Thanks, //richard |
From: Thomas M. <th...@m3...> - 2017-05-22 18:14:39
Attachments:
smime.p7s
|
> Am 21.05.2017 um 23:28 schrieb Richard Weinberger <ric...@gm...>: > > Thomas, > >> On Thu, May 18, 2017 at 12:11 AM, Thomas Meyer <th...@m3...> wrote: >> This is actually a no-op as all read-only should be read-only in the ELF. > > What problem does this patch fix? Or what is the purpose? Hi, It's purely cosmetic; to get rid of the boot message: "This architecture does not have kernel memory protection." in init/main.c Which isn't true for UML as all read only stuff should end up in a read only ELF section. Shouldn't it? > > -- > Thanks, > //richard > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > User-mode-linux-devel mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel |
From: Richard W. <ri...@no...> - 2017-05-22 18:34:19
|
Thomas, Am 22.05.2017 um 20:14 schrieb Thomas Meyer: > It's purely cosmetic; to get rid of the boot message: "This architecture does not have kernel memory protection." in init/main.c > > Which isn't true for UML as all read only stuff should end up in a read only ELF section. Shouldn't it? Hmm, reading /proc/<pid of uml>/maps tells a different story on my host. Did you check? Thanks, //richard |
From: Thomas M. <th...@m3...> - 2017-05-22 19:19:01
Attachments:
smime.p7s
|
> Am 22.05.2017 um 20:34 schrieb Richard Weinberger <ri...@no...>: > > Thomas, > >> Am 22.05.2017 um 20:14 schrieb Thomas Meyer: >> It's purely cosmetic; to get rid of the boot message: "This architecture does not have kernel memory protection." in init/main.c >> >> Which isn't true for UML as all read only stuff should end up in a read only ELF section. Shouldn't it? > > Hmm, reading /proc/<pid of uml>/maps tells a different story on my host. > Did you check? No... I may should have done so... Okay, but it should be possible to mprotect those regions ? > > Thanks, > //richard |
From: Richard W. <ri...@no...> - 2017-05-22 19:37:26
|
Thomas, Am 22.05.2017 um 21:18 schrieb Thomas Meyer: > >> Am 22.05.2017 um 20:34 schrieb Richard Weinberger <ri...@no...>: >> >> Thomas, >> >>> Am 22.05.2017 um 20:14 schrieb Thomas Meyer: >>> It's purely cosmetic; to get rid of the boot message: "This architecture does not have kernel memory protection." in init/main.c >>> >>> Which isn't true for UML as all read only stuff should end up in a read only ELF section. Shouldn't it? >> >> Hmm, reading /proc/<pid of uml>/maps tells a different story on my host. >> Did you check? > > No... I may should have done so... > > Okay, but it should be possible to mprotect those regions ? Yes, it should. Can you give it a try? Thanks, //richard |
From: Thomas M. <th...@m3...> - 2017-05-22 20:40:23
Attachments:
smime.p7s
|
> Am 22.05.2017 um 21:37 schrieb Richard Weinberger <ri...@no...>: > > Thomas, > >> Am 22.05.2017 um 21:18 schrieb Thomas Meyer: >> >>> Am 22.05.2017 um 20:34 schrieb Richard Weinberger <ri...@no...>: >>> >>> Thomas, >>> >>>> Am 22.05.2017 um 20:14 schrieb Thomas Meyer: >>>> It's purely cosmetic; to get rid of the boot message: "This architecture does not have kernel memory protection." in init/main.c >>>> >>>> Which isn't true for UML as all read only stuff should end up in a read only ELF section. Shouldn't it? >>> >>> Hmm, reading /proc/<pid of uml>/maps tells a different story on my host. >>> Did you check? >> >> No... I may should have done so... >> >> Okay, but it should be possible to mprotect those regions ? > > Yes, it should. > Can you give it a try? Will do so! > > Thanks, > //richard > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > User-mode-linux-devel mailing list > Use...@li... > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel |