[PATCH] sysfs: tightened sysfs permission checks

2015-05-01 Thread Gobinda Charan Maji
d to USER_READABLE >= GROUP_READABLE >= OTHER_READABLE, USER_WRITABLE >= GROUP_WRITABLE and OTHER_WRITABLE is not permitted. Signed-off-by: Gobinda Charan Maji --- include/linux/kernel.h | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/include/linux/kernel.h b/

[PATCH] sysfs: tightened sysfs permission checks

2015-05-01 Thread Gobinda Charan Maji
, USER_WRITABLE = GROUP_WRITABLE and OTHER_WRITABLE is not permitted. Signed-off-by: Gobinda Charan Maji gobinda.cem...@gmail.com --- include/linux/kernel.h | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/include/linux/kernel.h b/include/linux/kernel.h index

Re: [PATCH 9/9] sysfs: disallow world-writable files.

2015-04-29 Thread Gobinda Charan Maji
Rusty Russell rustcorp.com.au> writes: > > This check was introduced in 2006 by Alexey Dobriyan (9774a1f54f173) > for module parameters; we removed it when we unified the check into > VERIFY_OCTAL_PERMISSIONS() as sysfs didn't have the same requirement. > Now all those users are fixed,

Re: [PATCH 9/9] sysfs: disallow world-writable files.

2015-04-29 Thread Gobinda Charan Maji
Rusty Russell rusty at rustcorp.com.au writes: This check was introduced in 2006 by Alexey Dobriyan (9774a1f54f173) for module parameters; we removed it when we unified the check into VERIFY_OCTAL_PERMISSIONS() as sysfs didn't have the same requirement. Now all those users are fixed,

Re: Stricter module param and sysfs permission checks

2015-04-28 Thread Gobinda Charan Maji
Robert Jarzmik free.fr> writes: As per the newly added restriction (User perms >= group perms >= other perms) is concerned, there is an inconsistency in the permission. Say for example, permission value is "0432". Here User has only READ permission whereas Group has both WRITE and EXECUTE

Re: Stricter module param and sysfs permission checks

2015-04-28 Thread Gobinda Charan Maji
Robert Jarzmik robert.jarzmik at free.fr writes: As per the newly added restriction (User perms = group perms = other perms) is concerned, there is an inconsistency in the permission. Say for example, permission value is 0432. Here User has only READ permission whereas Group has both WRITE and

Re: Stricter module param and sysfs permission checks

2014-07-02 Thread Gobinda Charan Maji
Gobinda Charan Maji gmail.com> writes: > > Hi All, > > I could not get any response yet. > > Hi Rusty, > > Please at least give me a reply even if my concept seems to be incorrect to > you. > > Thanks in advance, > Gobinda > > Hi All, I a

Re: Stricter module param and sysfs permission checks

2014-07-02 Thread Gobinda Charan Maji
Gobinda Charan Maji gobinda.cemk07 at gmail.com writes: Hi All, I could not get any response yet. Hi Rusty, Please at least give me a reply even if my concept seems to be incorrect to you. Thanks in advance, Gobinda Hi All, I am new to this mail chain. I could not get any

Re: Stricter module param and sysfs permission checks

2014-06-25 Thread Gobinda Charan Maji
Gobinda Charan Maji gmail.com> writes: > > Hi All, > > As per the newly added restriction (User perms >= group perms >= other > perms) is concerned, there is an inconsistency in the permission. Say for > example, permission value is "0432". Here Use

Re: Stricter module param and sysfs permission checks

2014-06-25 Thread Gobinda Charan Maji
Gobinda Charan Maji gobinda.cemk07 at gmail.com writes: Hi All, As per the newly added restriction (User perms = group perms = other perms) is concerned, there is an inconsistency in the permission. Say for example, permission value is 0432. Here User has only READ permission

Re: Stricter module param and sysfs permission checks

2014-06-18 Thread Gobinda Charan Maji
Robert Jarzmik free.fr> writes: > > Dave Jones redhat.com> writes: > > > On Thu, Mar 20, 2014 at 01:43:44PM +1030, Rusty Russell wrote: > > > > > drivers/mtd/devices/docg3.c: > > > __ATTR(f##id##_dps0_protection_key, S_IWUGO, NULL, dps0_insert_key), \ > > >

Re: Stricter module param and sysfs permission checks

2014-06-18 Thread Gobinda Charan Maji
Robert Jarzmik robert.jarzmik at free.fr writes: Dave Jones davej at redhat.com writes: On Thu, Mar 20, 2014 at 01:43:44PM +1030, Rusty Russell wrote: drivers/mtd/devices/docg3.c: __ATTR(f##id##_dps0_protection_key, S_IWUGO, NULL, dps0_insert_key), \