Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1266712 > unrolled thread
| Started by | Badhri Jagan Sridharan <badhri@google.com> |
|---|---|
| First post | 2015-11-10 19:40 +0100 |
| Last post | 2015-11-11 02:30 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
init: How did init/do_mounts_rd.c overcome memory protection ? Badhri Jagan Sridharan <badhri@google.com> - 2015-11-10 19:40 +0100
Re: init: How did init/do_mounts_rd.c overcome memory protection ? Richard Weinberger <richard.weinberger@gmail.com> - 2015-11-10 22:40 +0100
Re: init: How did init/do_mounts_rd.c overcome memory protection ? Badhri Jagan Sridharan <badhri@google.com> - 2015-11-11 02:30 +0100
| From | Badhri Jagan Sridharan <badhri@google.com> |
|---|---|
| Date | 2015-11-10 19:40 +0100 |
| Subject | init: How did init/do_mounts_rd.c overcome memory protection ? |
| Message-ID | <qtlZM-d8-37@gated-at.bofh.it> |
Mighty upstream, I see that do_mounts_rd.c seems to make calls to sys_read and sys_lseek functions. As these are syscall functions, they expects some of the arguments to be from userspace. I was going through the article that Greg KH wrote a while back: http://www.linuxjournal.com/article/8110?page=0,1 . I don't see any references to set_fs/get_fs under init/*. Does the memory protection get enabled only in the later stage ? Or does do_mounts_rd.c accomplish this in some other way ? Thanks, Badhri -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Richard Weinberger <richard.weinberger@gmail.com> |
|---|---|
| Date | 2015-11-10 22:40 +0100 |
| Message-ID | <qtoNZ-240-33@gated-at.bofh.it> |
| In reply to | #1266712 |
On Tue, Nov 10, 2015 at 7:38 PM, Badhri Jagan Sridharan <badhri@google.com> wrote: > Mighty upstream, > > I see that do_mounts_rd.c seems to make calls to sys_read and > sys_lseek functions. As these are syscall functions, they expects > some of the arguments to be from userspace. > > I was going through the article that Greg KH wrote a while back: > http://www.linuxjournal.com/article/8110?page=0,1 . I don't see any > references to set_fs/get_fs under init/*. Does the memory protection > get enabled only in the later stage ? Or does do_mounts_rd.c accomplish > this in some other way ? The stuff in init/ is PID 1 and it inherits addr_limit from the initial thread (PID 0 or swapper called). INIT_THREAD_INFO() sets addr_limit to KERNEL_DS. -- Thanks, //richard -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Badhri Jagan Sridharan <badhri@google.com> |
|---|---|
| Date | 2015-11-11 02:30 +0100 |
| Message-ID | <qtsox-4rB-13@gated-at.bofh.it> |
| In reply to | #1266796 |
Thanks Richard !! That's the one that I was looking for. On Tue, Nov 10, 2015 at 1:37 PM, Richard Weinberger <richard.weinberger@gmail.com> wrote: > On Tue, Nov 10, 2015 at 7:38 PM, Badhri Jagan Sridharan > <badhri@google.com> wrote: >> Mighty upstream, >> >> I see that do_mounts_rd.c seems to make calls to sys_read and >> sys_lseek functions. As these are syscall functions, they expects >> some of the arguments to be from userspace. >> >> I was going through the article that Greg KH wrote a while back: >> http://www.linuxjournal.com/article/8110?page=0,1 . I don't see any >> references to set_fs/get_fs under init/*. Does the memory protection >> get enabled only in the later stage ? Or does do_mounts_rd.c accomplish >> this in some other way ? > > The stuff in init/ is PID 1 and it inherits addr_limit from the > initial thread (PID 0 or swapper called). > INIT_THREAD_INFO() sets addr_limit to KERNEL_DS. > > -- > Thanks, > //richard -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web