Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1643668 > unrolled thread
| Started by | Thomas Meyer <thomas@m3y3r.de> |
|---|---|
| First post | 2017-05-18 00:20 +0200 |
| Last post | 2017-05-22 22:50 +0200 |
| Articles | 7 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] um: Add mark_rodata_ro support. Thomas Meyer <thomas@m3y3r.de> - 2017-05-18 00:20 +0200
Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support. Richard Weinberger <richard.weinberger@gmail.com> - 2017-05-21 23:30 +0200
Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support. Thomas Meyer <thomas@m3y3r.de> - 2017-05-22 20:20 +0200
Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support. Richard Weinberger <richard@nod.at> - 2017-05-22 20:40 +0200
Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support. Thomas Meyer <thomas@m3y3r.de> - 2017-05-22 21:20 +0200
Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support. Richard Weinberger <richard@nod.at> - 2017-05-22 21:40 +0200
Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support. Thomas Meyer <thomas@m3y3r.de> - 2017-05-22 22:50 +0200
| From | Thomas Meyer <thomas@m3y3r.de> |
|---|---|
| Date | 2017-05-18 00:20 +0200 |
| Subject | [PATCH] um: Add mark_rodata_ro support. |
| Message-ID | <tIfsu-AE-9@gated-at.bofh.it> |
This is actually a no-op as all read-only should be read-only in the ELF.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
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)
+{
+}
[toc] | [next] | [standalone]
| From | Richard Weinberger <richard.weinberger@gmail.com> |
|---|---|
| Date | 2017-05-21 23:30 +0200 |
| Subject | Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support. |
| Message-ID | <tJGAh-4GO-5@gated-at.bofh.it> |
| In reply to | #1643668 |
Thomas, On Thu, May 18, 2017 at 12:11 AM, Thomas Meyer <thomas@m3y3r.de> 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
[toc] | [prev] | [next] | [standalone]
| From | Thomas Meyer <thomas@m3y3r.de> |
|---|---|
| Date | 2017-05-22 20:20 +0200 |
| Subject | Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support. |
| Message-ID | <tK05Y-Dl-9@gated-at.bofh.it> |
| In reply to | #1646448 |
[Multipart message — attachments visible in raw view] — view raw
> Am 21.05.2017 um 23:28 schrieb Richard Weinberger <richard.weinberger@gmail.com>: > > Thomas, > >> On Thu, May 18, 2017 at 12:11 AM, Thomas Meyer <thomas@m3y3r.de> 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 > User-mode-linux-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
[toc] | [prev] | [next] | [standalone]
| From | Richard Weinberger <richard@nod.at> |
|---|---|
| Date | 2017-05-22 20:40 +0200 |
| Subject | Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support. |
| Message-ID | <tK0pj-KA-13@gated-at.bofh.it> |
| In reply to | #1647238 |
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
[toc] | [prev] | [next] | [standalone]
| From | Thomas Meyer <thomas@m3y3r.de> |
|---|---|
| Date | 2017-05-22 21:20 +0200 |
| Subject | Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support. |
| Message-ID | <tK121-1cI-3@gated-at.bofh.it> |
| In reply to | #1647256 |
[Multipart message — attachments visible in raw view] — view raw
> Am 22.05.2017 um 20:34 schrieb Richard Weinberger <richard@nod.at>: > > 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
[toc] | [prev] | [next] | [standalone]
| From | Richard Weinberger <richard@nod.at> |
|---|---|
| Date | 2017-05-22 21:40 +0200 |
| Subject | Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support. |
| Message-ID | <tK1lo-1kI-29@gated-at.bofh.it> |
| In reply to | #1647278 |
Thomas, Am 22.05.2017 um 21:18 schrieb Thomas Meyer: > >> Am 22.05.2017 um 20:34 schrieb Richard Weinberger <richard@nod.at>: >> >> 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
[toc] | [prev] | [next] | [standalone]
| From | Thomas Meyer <thomas@m3y3r.de> |
|---|---|
| Date | 2017-05-22 22:50 +0200 |
| Subject | Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support. |
| Message-ID | <tK2r7-1WA-5@gated-at.bofh.it> |
| In reply to | #1647305 |
[Multipart message — attachments visible in raw view] — view raw
> Am 22.05.2017 um 21:37 schrieb Richard Weinberger <richard@nod.at>: > > Thomas, > >> Am 22.05.2017 um 21:18 schrieb Thomas Meyer: >> >>> Am 22.05.2017 um 20:34 schrieb Richard Weinberger <richard@nod.at>: >>> >>> 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 > User-mode-linux-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web