um: Add mark_rodata_ro support.
PATCH 1/1 um: Add mark_rodata_ro support.
This is actually a no-op as all read-only should be read-only in the ELF.
---
arch/um/Kconfig.common | 1 +
arch/um/kernel/mem.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
arch/um/Kconfig.common +0 -0
@@ -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
arch/um/kernel/mem.c +0 -0
@@ -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)
+{
+}
Thomas,
Quoted 1 line · Thomas Meyer
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?
Signature · 2 lines
Thanks, //richard
Quoted 9 lines
Am 21.05.2017 um 23:28 schrieb Richard Weinberger <[email protected]>:
Thomas,
Quoted 2 lines · Thomas Meyer
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?
Quoted 12 lines
Signature · 11 lines
-- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Richard Weinberger
maintainerThomas,
Am 22.05.2017 um 20:14 schrieb Thomas Meyer:
Quoted 3 lines
It's purely cosmetic; to get rid of the boot message: "This architecture does not have kernel memory protection." in
init/main.cWhich 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
Quoted 5 lines
Am 22.05.2017 um 20:34 schrieb Richard Weinberger <[email protected]>:
Thomas,
Quoted 7 lines
Quoted 4 lines
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." ininit/main.cWhich 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 ?
Quoted 3 lines
Thanks,
//richard
Richard Weinberger
maintainerThomas,
Am 22.05.2017 um 21:18 schrieb Thomas Meyer:
Quoted 8 lines
Quoted 8 lines
Am 22.05.2017 um 20:34 schrieb Richard Weinberger <[email protected]>:
Thomas,
Quoted 3 lines
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." ininit/main.c
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
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
Quoted 19 lines
Am 22.05.2017 um 21:37 schrieb Richard Weinberger <[email protected]>:
Thomas,
Quoted 14 lines
Am 22.05.2017 um 21:18 schrieb Thomas Meyer:
Quoted 11 lines
Am 22.05.2017 um 20:34 schrieb Richard Weinberger <[email protected]>:
Thomas,
Quoted 4 lines
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." ininit/main.cWhich 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?
Quoted 6 lines
Quoted 3 lines
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!
Quoted 11 lines
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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel