lkml.org 
[lkml]   [2015]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [RFC] export module parameters even the permission is zero
> -----Original Message-----
> From: Rusty Russell [mailto:rusty@rustcorp.com.au]
> Sent: Tuesday, January 20, 2015 2:33 PM
> To: Wang, Yalin; 'akpm@linux-foundation.org'; 'jani.nikula@intel.com';
> 'hch@infradead.org'; 'hare@suse.de'; 'keescook@chromium.org'; 'linux-
> kernel@vger.kernel.org'
> Subject: Re: [RFC] export module parameters even the permission is zero
>
> "Wang, Yalin" <Yalin.Wang@sonymobile.com> writes:
> > This patch make sure to export module parameters even the permission
> > is zero, this is useful for some platforms like Android, the init
> > process can change the parameter mode/owner by chmod/chown during
> > bootup
> >
> > Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com>
>
> Hi!
>
> Unfortunately, this won't work. Various parts of the code assume
> that 0 permissions means "cannot be changed or read", so this change would
> introduce many bugs (eg. the parameter could be __initdata).
>
> Since these are owned by root at boot, changing mode and owner should still
> work. However, you can't make a read-only field writable and expect it to
> work.
>
Oh, I see,
This means kernel cmdline can change this module_parameter ignored permission,

Thanks for your comments.


\
 
 \ /
  Last update: 2015-01-22 03:21    [W:0.037 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site