MODSIGN: do not send garbage to stderr when enabling modules signature
PATCH v2 1/1 MODSIGN: do not send garbage to stderr when enabling modules signature
openssl may send garbage to stderr when generating X.509 key pair for modules signature regardless there was an error or not. It makes more difficult to create scripts based on kernel error/warning messages.
When compiling kernel with -jN (N > 1), all warning/error messages printed while openssl is generating key pair may get mixed dots and other symbols openssl sends to stderr. This patch makes sure openssl logs go to default stdout.
Example of the garbages:
crypto/anubis.c:581: warning: ‘inter’ is used uninitialized in this function
Generating a 4096 bit RSA private key
.........drivers/gpu/drm/i915/i915_gem_gtt.c: In function ‘gen6_ggtt_insert_entries’:drivers/gpu/drm/i915/i915_gem_gtt.c:440: warning: ‘addr’ may be used uninitialized in this function.net/mac80211/tx.c: In function ‘ieee80211_subif_start_xmit’:net/mac80211/tx.c:1780: warning: ‘chanctx_conf’ may be used uninitialized in this function ..drivers/isdn/hardware/mISDN/hfcpci.c: In function ‘hfcpci_softirq’:.....drivers/isdn/hardware/mISDN/hfcpci.c:2298: warning: ignoring return value of ‘driver_for_each_device’, declared with attribute warn_unused_result net/unix/af_unix.c: In function ‘unix_bind’:net/unix/af_unix.c:892: warning: ‘path.dentry’ may be used uninitialized in this functionnet/unix/af_unix.c:892: warning: ‘path.mnt’ may be used uninitialized in this function
...++
In file included from drivers/message/i2o/config-osm.c:39:drivers/message/i2o/i2o_config.c: In function ‘i2o_cfg_passthru’:drivers/message/i2o/i2o_config.c:888: warning: cast to pointer from integer of different size drivers/message/i2o/i2o_config.c:943: warning: cast to pointer from integer of different size drivers/net/ethernet/amd/nmclan_cs.c: In function ‘nmclan_config’:drivers/net/ethernet/amd/nmclan_cs.c:625: warning: ‘pcmcia_request_exclusive_irq’ is deprecated (declared at include/pcmcia/ds.h:201) drivers/net/ethernet/mellanox/mlx4/mcg.c: In function ‘find_entry’:
.........................................................................................................................................................................................++
writing new private key to 'signing_key.priv'
-----drivers/net/ethernet/mellanox/mlx4/mcg.c:601: warning: ‘hash’ may be used uninitialized in this function
--- kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/Makefile +1 -1
@@ -175,7 +175,7 @@ signing_key.priv signing_key.x509: x509.genkey openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days 36500 \ -batch -x509 -config x509.genkey \ -outform DER -out signing_key.x509 \ - -keyout signing_key.priv + -keyout signing_key.priv 2>&1 @echo "###" @echo "### Key pair generated." @echo "###"
Signature · 1 line
1.7.10.4
Quoted 68 lines
-----Original Message-----
From: Cohen, David A
Sent: Tuesday, April 09, 2013 2:39 PM
To: [email protected]; [email protected]
Cc: [email protected]; Gross, Mark; Cohen, David A
Subject: [PATCH v2] MODSIGN: do not send garbage to stderr when enabling modules signatureopenssl may send garbage to stderr when generating X.509 key pair for modules signature regardless there was an error or not. It makes more difficult to create scripts based on kernel error/warning messages.
When compiling kernel with -jN (N > 1), all warning/error messages printed while openssl is generating key pair may get mixed dots and other symbols openssl sends to stderr. This patch makes sure openssl logs go to default stdout.
Example of the garbages:
crypto/anubis.c:581: warning: ‘inter’ is used uninitialized in this function Generating a 4096 bit RSA private key .........drivers/gpu/drm/i915/i915_gem_gtt.c: In function ‘gen6_ggtt_insert_entries’:drivers/gpu/drm/i915/i915_gem_gtt.c:440: warning: ‘addr’ may be used uninitialized in this function.net/mac80211/tx.c: In function ‘ieee80211_subif_start_xmit’:net/mac80211/tx.c:1780: warning: ‘chanctx_conf’ may be used uninitialized in this function..drivers/isdn/hardware/mISDN/hfcpci.c: In function ‘hfcpci_softirq’:.....drivers/isdn/hardware/mISDN/hfcpci.c:2298: warning: ignoring return value of ‘driver_for_each_device’, declared with attributewarn_unused_resultnet/unix/af_unix.c: In function ‘unix_bind’:net/unix/af_unix.c:892: warning: ‘path.dentry’ may be used uninitialized in this functionnet/unix/af_unix.c:892: warning: ‘path.mnt’ may be used uninitialized in this function ...++ In file included fromdrivers/message/i2o/config-osm.c:39:drivers/message/i2o/i2o_config.c: In function ‘i2o_cfg_passthru’:drivers/message/i2o/i2o_config.c:888: warning: cast to pointer from integer of different sizedrivers/message/i2o/i2o_config.c:943: warning: cast to pointer from integer of different sizedrivers/net/ethernet/amd/nmclan_cs.c: In function ‘nmclan_config’:drivers/net/ethernet/amd/nmclan_cs.c:625: warning:
‘pcmcia_request_exclusive_irq’ is deprecated (declared atinclude/pcmcia/ds.h:201)drivers/net/ethernet/mellanox/mlx4/mcg.c: In function ‘find_entry’:
.....................................................................................................................
....................................................................++
writing new private key to 'signing_key.priv'
-----drivers/net/ethernet/mellanox/mlx4/mcg.c:601: warning: ‘hash’ may be used uninitialized in this functionSigned-off-by David Cohen <[email protected]>--- kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/Makefile +1
-1@@ -175,7 +175,7 @@ signing_key.priv signing_key.x509: x509.genkey openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days 36500 \ -batch -x509 -config x509.genkey \ -outform DER -out signing_key.x509 \ - -keyout signing_key.priv + -keyout signing_key.priv 2>&1 @echo "###" @echo "### Key pair generated."
Quoted 3 lines
@echo "###"
--
1.7.10.4
���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m����������?�I�
Quoted 1 line · Mark
Reviewed-by mark gross<[email protected]>
Not sure that's a valid email address, so I added a space.
Cheers,
Rusty.
Sorry. I don't use my outlook email on LMKL stuff hardly ever because of this sort of thing.
--mgross
http://umgwiki.intel.com/wiki/?title=Kernel
Quoted 15 lines
-----Original Message-----
From: Rusty Russell [mailto:[email protected]]
Sent: Wednesday, April 10, 2013 12:29 AM
To: Gross, Mark; Cohen, David A; [email protected]
Cc: [email protected]
Subject: RE: [PATCH v2] MODSIGN: do not send garbage to stderr when enabling modules signatureQuoted 1 line · Mark
Reviewed-by mark gross<[email protected]>Not sure that's a valid email address, so I added a space.
Cheers,
Rusty.
Quoted 8 lines · David Cohen
openssl may send garbage to stderr when generating X.509 key pair for modules signature regardless there was an error or not. It makes more difficult to create scripts based on kernel error/warning messages.
When compiling kernel with -jN (N > 1), all warning/error messages printed while openssl is generating key pair may get mixed dots and other symbols openssl sends to stderr. This patch makes sure openssl logs go to default stdout.
Ah! Not garbage, but it writes progress dots and status messages to stderr?
I trimmed your commit message as shown below.
Thanks!
Rusty.
From: David Cohen <[email protected]>
Subject: MODSIGN: do not send garbage to stderr when enabling modules signature
When compiling kernel with -jN (N > 1), all warning/error messages printed while openssl is generating key pair may get mixed dots and other symbols openssl sends to stderr. This patch makes sure openssl logs go to default stdout.
Example of the garbage on stderr:
crypto/anubis.c:581: warning: ‘inter’ is used uninitialized in this function
Generating a 4096 bit RSA private key
.........drivers/gpu/drm/i915/i915_gem_gtt.c: In function ‘gen6_ggtt_insert_entries’:drivers/gpu/drm/i915/i915_gem_gtt.c:440: warning: ‘addr’ may be used uninitialized in this function.net/mac80211/tx.c: In function ‘ieee80211_subif_start_xmit’:net/mac80211/tx.c:1780: warning: ‘chanctx_conf’ may be used uninitialized in this function ..drivers/isdn/hardware/mISDN/hfcpci.c: In function ‘hfcpci_softirq’:.....drivers/isdn/hardware/mISDN/hfcpci.c:2298: warning: ignoring return value of ‘driver_for_each_device’, declared with attribute warn_unused_result
--- kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/Makefile +1 -1
@@ -175,7 +175,7 @@ signing_key.priv signing_key.x509: x509.genkey openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days 36500 \ -batch -x509 -config x509.genkey \ -outform DER -out signing_key.x509 \ - -keyout signing_key.priv + -keyout signing_key.priv 2>&1 @echo "###" @echo "### Key pair generated." @echo "###"
David Howells
Acked-byQuoted 20 lines · Rusty Russell
From: David Cohen <[email protected]>
Subject: MODSIGN: do not send garbage to stderr when enabling modules signatureWhen compiling kernel with -jN (N > 1), all warning/error messages printed while openssl is generating key pair may get mixed dots and other symbols openssl sends to stderr. This patch makes sure openssl logs go to default stdout.
Example of the garbage on stderr:
crypto/anubis.c:581: warning: ‘inter’ is used uninitialized in this function
Generating a 4096 bit RSA private key
.........drivers/gpu/drm/i915/i915_gem_gtt.c: In function ‘gen6_ggtt_insert_entries’:drivers/gpu/drm/i915/i915_gem_gtt.c:440: warning: ‘addr’ may be used uninitialized in this function.net/mac80211/tx.c: In function ‘ieee80211_subif_start_xmit’:net/mac80211/tx.c:1780: warning: ‘chanctx_conf’ may be used uninitialized in this function..drivers/isdn/hardware/mISDN/hfcpci.c: In function ‘hfcpci_softirq’:.....drivers/isdn/hardware/mISDN/hfcpci.c:2298: warning: ignoring return value of ‘driver_for_each_device’, declared with attributewarn_unused_result
Quoted 3 lines
Signed-off-by David Cohen <[email protected]>Reviewed-by mark gross <[email protected]>Signed-off-by Rusty Russell <[email protected]>
Quoted 5 lines · Rusty Russell
Quoted 4 lines · David Cohen
openssl may send garbage to stderr when generating X.509 key pair for modules signature regardless there was an error or not. It makes more difficult to create scripts based on kernel error/warning messages.
Quoted 8 lines
Quoted 4 lines
When compiling kernel with -jN (N > 1), all warning/error messages printed while openssl is generating key pair may get mixed dots and other symbols openssl sends to stderr. This patch makes sure openssl logs go to default stdout.
Ah! Not garbage, but it writes progress dots and status messages to stderr?
I trimmed your commit message as shown below.
Thanks! The new commit message looks fine.
But it's not the dots. It prints the whole logs to stderr, but the dots are more likely to get mixed.
Br, David
Quoted 45 lines
Thanks!
Rusty.From: David Cohen <[email protected]>
Subject: MODSIGN: do not send garbage to stderr when enabling modules signatureWhen compiling kernel with -jN (N > 1), all warning/error messages printed while openssl is generating key pair may get mixed dots and other symbols openssl sends to stderr. This patch makes sure openssl logs go to default stdout.
Example of the garbage on stderr:
crypto/anubis.c:581: warning: ‘inter’ is used uninitialized in this function
Generating a 4096 bit RSA private key
.........drivers/gpu/drm/i915/i915_gem_gtt.c: In function ‘gen6_ggtt_insert_entries’:drivers/gpu/drm/i915/i915_gem_gtt.c:440: warning: ‘addr’ may be used uninitialized in this function.net/mac80211/tx.c: In function ‘ieee80211_subif_start_xmit’:net/mac80211/tx.c:1780: warning: ‘chanctx_conf’ may be used uninitialized in this function..drivers/isdn/hardware/mISDN/hfcpci.c: In function ‘hfcpci_softirq’:.....drivers/isdn/hardware/mISDN/hfcpci.c:2298: warning: ignoring return value of ‘driver_for_each_device’, declared with attributewarn_unused_resultSigned-off-by David Cohen <[email protected]>Reviewed-by mark gross <[email protected]>Signed-off-by Rusty Russell <[email protected]>--- kernel/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/Makefile +1
-1@@ -175,7 +175,7 @@ signing_key.priv signing_key.x509: x509.genkey openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days 36500 \ -batch -x509 -config x509.genkey \ -outform DER -out signing_key.x509 \ - -keyout signing_key.priv + -keyout signing_key.priv 2>&1 @echo "###" @echo "### Key pair generated." @echo "###"
Quoted 13 lines · David Cohen
Quoted 12 lines · Rusty Russell
Quoted 8 lines · David Cohen
openssl may send garbage to stderr when generating X.509 key pair for modules signature regardless there was an error or not. It makes more difficult to create scripts based on kernel error/warning messages.
When compiling kernel with -jN (N > 1), all warning/error messages printed while openssl is generating key pair may get mixed dots and other symbols openssl sends to stderr. This patch makes sure openssl logs go to default stdout.
Ah! Not garbage, but it writes progress dots and status messages to stderr?
Quoted 7 lines
Quoted 1 line
I trimmed your commit message as shown below.
Thanks! The new commit message looks fine.
But it's not the dots. It prints the whole logs to stderr, but the dots are more likely to get mixed.Br, David
Seems like Linus didn't bite, so I've put it in my modules-next tree.
Thanks,
Rusty.