* [PATCH] um: Add mark_rodata_ro support.
@ 2017-05-17 22:11 Thomas Meyer
2017-05-21 21:28 ` Richard Weinberger
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Meyer @ 2017-05-17 22:11 UTC (permalink / raw)
To: Linux Kernel Mailing List, user-mode-linux-devel
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)
+{
+}
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support.
2017-05-17 22:11 [PATCH] um: Add mark_rodata_ro support Thomas Meyer
@ 2017-05-21 21:28 ` Richard Weinberger
0 siblings, 0 replies; 9+ messages in thread
From: Richard Weinberger @ 2017-05-21 21:28 UTC (permalink / raw)
To: Thomas Meyer; +Cc: Linux Kernel Mailing List, user-mode-linux-devel
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support.
@ 2017-05-21 21:28 ` Richard Weinberger
0 siblings, 0 replies; 9+ messages in thread
From: Richard Weinberger @ 2017-05-21 21:28 UTC (permalink / raw)
To: Thomas Meyer; +Cc: Linux Kernel Mailing List, user-mode-linux-devel
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
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support.
2017-05-21 21:28 ` Richard Weinberger
(?)
@ 2017-05-22 18:14 ` Thomas Meyer
2017-05-22 18:34 ` Richard Weinberger
-1 siblings, 1 reply; 9+ messages in thread
From: Thomas Meyer @ 2017-05-22 18:14 UTC (permalink / raw)
To: Richard Weinberger; +Cc: Linux Kernel Mailing List, user-mode-linux-devel
[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]
> 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
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5334 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support.
2017-05-22 18:14 ` Thomas Meyer
@ 2017-05-22 18:34 ` Richard Weinberger
2017-05-22 19:18 ` Thomas Meyer
0 siblings, 1 reply; 9+ messages in thread
From: Richard Weinberger @ 2017-05-22 18:34 UTC (permalink / raw)
To: Thomas Meyer; +Cc: Linux Kernel Mailing List, user-mode-linux-devel
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support.
2017-05-22 18:34 ` Richard Weinberger
@ 2017-05-22 19:18 ` Thomas Meyer
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Meyer @ 2017-05-22 19:18 UTC (permalink / raw)
To: Richard Weinberger; +Cc: Linux Kernel Mailing List, user-mode-linux-devel
[-- Attachment #1: Type: text/plain, Size: 614 bytes --]
> 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
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5334 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support.
@ 2017-05-22 19:18 ` Thomas Meyer
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Meyer @ 2017-05-22 19:18 UTC (permalink / raw)
To: Richard Weinberger; +Cc: Linux Kernel Mailing List, user-mode-linux-devel
[-- Attachment #1.1: Type: text/plain, Size: 614 bytes --]
> 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
[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5334 bytes --]
[-- Attachment #2: Type: text/plain, Size: 202 bytes --]
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
[-- Attachment #3: Type: text/plain, Size: 194 bytes --]
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support.
2017-05-22 19:18 ` Thomas Meyer
(?)
@ 2017-05-22 19:37 ` Richard Weinberger
2017-05-22 20:40 ` Thomas Meyer
-1 siblings, 1 reply; 9+ messages in thread
From: Richard Weinberger @ 2017-05-22 19:37 UTC (permalink / raw)
To: Thomas Meyer; +Cc: Linux Kernel Mailing List, user-mode-linux-devel
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [uml-devel] [PATCH] um: Add mark_rodata_ro support.
2017-05-22 19:37 ` Richard Weinberger
@ 2017-05-22 20:40 ` Thomas Meyer
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Meyer @ 2017-05-22 20:40 UTC (permalink / raw)
To: Richard Weinberger; +Cc: Linux Kernel Mailing List, user-mode-linux-devel
[-- Attachment #1: Type: text/plain, Size: 1280 bytes --]
> 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
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5334 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-05-22 20:40 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-17 22:11 [PATCH] um: Add mark_rodata_ro support Thomas Meyer
2017-05-21 21:28 ` [uml-devel] " Richard Weinberger
2017-05-21 21:28 ` Richard Weinberger
2017-05-22 18:14 ` Thomas Meyer
2017-05-22 18:34 ` Richard Weinberger
2017-05-22 19:18 ` Thomas Meyer
2017-05-22 19:18 ` Thomas Meyer
2017-05-22 19:37 ` Richard Weinberger
2017-05-22 20:40 ` Thomas Meyer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.