Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752936AbbKJSik (ORCPT ); Tue, 10 Nov 2015 13:38:40 -0500 Received: from mail-yk0-f176.google.com ([209.85.160.176]:35857 "EHLO mail-yk0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751859AbbKJSij (ORCPT ); Tue, 10 Nov 2015 13:38:39 -0500 MIME-Version: 1.0 Date: Tue, 10 Nov 2015 10:38:38 -0800 Message-ID: Subject: init: How did init/do_mounts_rd.c overcome memory protection ? From: Badhri Jagan Sridharan To: linux-kernel@vger.kernel.org Cc: dhowells@redhat.com, akpm@linux-foundation.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 751 Lines: 19 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/