All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sesterhenn / snakebyte <snakebyte@gmx.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [Patch] replace MODULE_PARM in net/fs_enet/fs_enet-main.c
Date: Tue, 10 Jan 2006 19:59:31 +0000	[thread overview]
Message-ID: <1136923171.7128.4.camel@alice> (raw)
In-Reply-To: <1136898275.23005.3.camel@alice>

[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]

hi,

> > -MODULE_PARM(fs_enet_debug, "i");
> > +module_param(fs_enet_debug, int, 0);
> >  MODULE_PARM_DESC(fs_enet_debug,
> >  		 "Freescale bitmapped debugging message enable value");
> 
> Is there any logic in choosing 0644 over 0 or vice versa?
> 
> /me confused

This should be 0644, sorry. The logic behind this is that you can
change the debug setting during runtime because the file permissions
for the /proc entry allow you to change it. 
For values that are only intended to be command line parameters, 0 is
always a safe bet, so we dont leak information. At least thats how
i understand it :)
Here is the changed patch


Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>


--- linux-2.6.15-git5/drivers/net/fs_enet/fs_enet-main.c.orig	2006-01-10 14:00:05.000000000 +0100
+++ linux-2.6.15-git5/drivers/net/fs_enet/fs_enet-main.c	2006-01-10 14:00:22.000000000 +0100
@@ -58,7 +58,7 @@ MODULE_DESCRIPTION("Freescale Ethernet D
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_MODULE_VERSION);
 
-MODULE_PARM(fs_enet_debug, "i");
+module_param(fs_enet_debug, int, 0644);
 MODULE_PARM_DESC(fs_enet_debug,
 		 "Freescale bitmapped debugging message enable value");
 




[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

  parent reply	other threads:[~2006-01-10 19:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-10 13:04 [KJ] [Patch] replace MODULE_PARM in net/fs_enet/fs_enet-main.c Eric Sesterhenn / snakebyte
2006-01-10 19:42 ` Alexey Dobriyan
2006-01-10 19:59 ` Eric Sesterhenn / snakebyte [this message]
2006-01-18 11:47 ` Vitaly Bordug

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1136923171.7128.4.camel@alice \
    --to=snakebyte@gmx.de \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.