replace MODULE_PARM in net/fs_enet/fs_enet-main.c
Subsystems (2)
PATCH 1/1 replace MODULE_PARM in net/fs_enet/fs_enet-main.c
hi,
this patch replaces the MODULE_PARM usage
with module_param.
drivers/net/fs_enet/fs_enet-main.c renamed from drivers/net/fs_enet/fs_enet-main.c.orig +1 -1
@@ -58,7 +58,7 @@ MODULE_DESCRIPTION("Freescale Ethernet DMODULE_LICENSE ("GPL" );MODULE_VERSION (DRV_MODULE_VERSION ); -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" );
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
drivers/net/fs_enet/fs_enet-main.c MODULE_DESCRIPTION("Freescale Ethernet D · line 63
Quoted 7 lines · Eric Sesterhenn / snakebyte
drivers/net/fs_enet/fs_enet-main.c renamed from drivers/net/fs_enet/fs_enet-main.c.orig +1
-1-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
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
hi,
Quoted 8 lines
Review
Quoted 4 lines
(quoted diff) +1
-1-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
drivers/net/fs_enet/fs_enet-main.c renamed from drivers/net/fs_enet/fs_enet-main.c.orig +1 -1
@@ -58,7 +58,7 @@ MODULE_DESCRIPTION("Freescale Ethernet DMODULE_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" );
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
On Tue, 10 Jan 2006 20:59:31 +0100
Eric Sesterhenn / snakebyte <[email protected]> wrote:
[snip]
Quoted 4 lines
Signed-off-by Eric Sesterhenn <[email protected]>
OK, I'll include this into my next changeset.
thanks.
Quoted 15 lines
drivers/net/fs_enet/fs_enet-main.c renamed from drivers/net/fs_enet/fs_enet-main.c.orig +1
-1@@ -58,7 +58,7 @@ MODULE_DESCRIPTION("Freescale Ethernet DMODULE_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" );
Signature · 2 lines
Sincerely, Vitaly
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors