linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the random tree with the net-next tree
@ 2013-11-12  4:55 Stephen Rothwell
  2013-11-12  8:55 ` Daniel Borkmann
  0 siblings, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2013-11-12  4:55 UTC (permalink / raw)
  To: Theodore Ts'o
  Cc: linux-next, linux-kernel, Hannes Frederic Sowa, David Miller,
	netdev, Daniel Borkmann

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

Hi Ted,

Today's linux-next merge of the random tree got a conflict in
drivers/char/random.c between commit 0244ad004a54 ("random32: add
prandom_reseed_late() and call when nonblocking pool becomes
initialized") from the net-next tree and commit 301f0595c0e7 ("random:
printk notifications for urandom pool initialization") from the random
tree.

I fixed it up (probably not properly - see below) and can carry the fix
as necessary (no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/char/random.c
index 4fe5609eeb72,cdf4cfb2da4d..000000000000
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@@ -255,8 -255,12 +255,9 @@@
  #include <linux/fips.h>
  #include <linux/ptrace.h>
  #include <linux/kmemcheck.h>
 +#include <linux/irq.h>
+ #include <linux/workqueue.h>
  
 -#ifdef CONFIG_GENERIC_HARDIRQS
 -# include <linux/irq.h>
 -#endif
 -
  #include <asm/processor.h>
  #include <asm/uaccess.h>
  #include <asm/irq.h>
@@@ -601,12 -654,14 +651,16 @@@ retry
  	if (cmpxchg(&r->entropy_count, orig, entropy_count) != orig)
  		goto retry;
  
+ 	r->entropy_total += nbits;
  	if (!r->initialized && nbits > 0) {
- 		r->entropy_total += nbits;
  		if (r->entropy_total > 128) {
+ 			if (r == &nonblocking_pool)
+ 				pr_notice("random: %s pool is initialized\n",
+ 					  r->name);
  			r->initialized = 1;
 +			if (r == &nonblocking_pool)
 +				prandom_reseed_late();
+ 			r->entropy_total = 0;
  		}
  	}
  

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the random tree with the net-next tree
  2013-11-12  4:55 linux-next: manual merge of the random tree with the net-next tree Stephen Rothwell
@ 2013-11-12  8:55 ` Daniel Borkmann
  2013-11-12 20:46   ` Stephen Rothwell
  2013-11-12 23:02   ` Theodore Ts'o
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel Borkmann @ 2013-11-12  8:55 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Theodore Ts'o, linux-next, linux-kernel,
	Hannes Frederic Sowa, David Miller, netdev

Hi Stephen,

On 11/12/2013 05:55 AM, Stephen Rothwell wrote:
> Hi Ted,
>
> Today's linux-next merge of the random tree got a conflict in
> drivers/char/random.c between commit 0244ad004a54 ("random32: add
> prandom_reseed_late() and call when nonblocking pool becomes
> initialized") from the net-next tree and commit 301f0595c0e7 ("random:
> printk notifications for urandom pool initialization") from the random
> tree.
>
> I fixed it up (probably not properly - see below) and can carry the fix
> as necessary (no action is required).

As per Hannes' suggestion, the result should look like (see cover
letter in [1]):

if (r->entropy_total > 128) {
	r->initialized = 1;
	r->entropy_total = 0;
	if (r == &nonblocking_pool) {
		prandom_reseed_late();
		pr_notice("random: %s pool is initialized\n",
			  r->name);
	}
}

Cheers,

Daniel

  [1] http://thread.gmane.org/gmane.linux.network/290303

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the random tree with the net-next tree
  2013-11-12  8:55 ` Daniel Borkmann
@ 2013-11-12 20:46   ` Stephen Rothwell
  2013-11-14 15:17     ` Markos Chandras
  2013-11-12 23:02   ` Theodore Ts'o
  1 sibling, 1 reply; 8+ messages in thread
From: Stephen Rothwell @ 2013-11-12 20:46 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Theodore Ts'o, linux-next, linux-kernel,
	Hannes Frederic Sowa, David Miller, netdev

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

Hi Daniel,

On Tue, 12 Nov 2013 09:55:29 +0100 Daniel Borkmann <dborkman@redhat.com> wrote:
>
> On 11/12/2013 05:55 AM, Stephen Rothwell wrote:
> >
> > Today's linux-next merge of the random tree got a conflict in
> > drivers/char/random.c between commit 0244ad004a54 ("random32: add
> > prandom_reseed_late() and call when nonblocking pool becomes
> > initialized") from the net-next tree and commit 301f0595c0e7 ("random:
> > printk notifications for urandom pool initialization") from the random
> > tree.
> >
> > I fixed it up (probably not properly - see below) and can carry the fix
> > as necessary (no action is required).
> 
> As per Hannes' suggestion, the result should look like (see cover
> letter in [1]):
> 
> if (r->entropy_total > 128) {
> 	r->initialized = 1;
> 	r->entropy_total = 0;
> 	if (r == &nonblocking_pool) {
> 		prandom_reseed_late();
> 		pr_notice("random: %s pool is initialized\n",
> 			  r->name);
> 	}
> }

I will use that from today.  Thanks.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the random tree with the net-next tree
  2013-11-12  8:55 ` Daniel Borkmann
  2013-11-12 20:46   ` Stephen Rothwell
@ 2013-11-12 23:02   ` Theodore Ts'o
  2013-11-12 23:13     ` Hannes Frederic Sowa
  2013-11-12 23:17     ` David Miller
  1 sibling, 2 replies; 8+ messages in thread
From: Theodore Ts'o @ 2013-11-12 23:02 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Stephen Rothwell, linux-next, linux-kernel, Hannes Frederic Sowa,
	David Miller, netdev

On Tue, Nov 12, 2013 at 09:55:29AM +0100, Daniel Borkmann wrote:
> 
> As per Hannes' suggestion, the result should look like (see cover
> letter in [1]):
> 
> if (r->entropy_total > 128) {
> 	r->initialized = 1;
> 	r->entropy_total = 0;
> 	if (r == &nonblocking_pool) {
> 		prandom_reseed_late();
> 		pr_notice("random: %s pool is initialized\n",
> 			  r->name);
> 	}
> }

Agreed.  What's the schedule for pushing net-dev to Linus?  I'm
currently at Korea Linux Forum, and I was originally planning on
pushing random.git to Linus sometime today, but I'm also willing to
wait for net-dev to go first.  Either way, we should make sure Linus
is aware of the agreed-upon resolution of the merge conflict.

Cheers,

						- Ted

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the random tree with the net-next tree
  2013-11-12 23:02   ` Theodore Ts'o
@ 2013-11-12 23:13     ` Hannes Frederic Sowa
  2013-11-12 23:17     ` David Miller
  1 sibling, 0 replies; 8+ messages in thread
From: Hannes Frederic Sowa @ 2013-11-12 23:13 UTC (permalink / raw)
  To: Theodore Ts'o, Daniel Borkmann, Stephen Rothwell, linux-next,
	linux-kernel, David Miller, netdev

On Tue, Nov 12, 2013 at 06:02:42PM -0500, Theodore Ts'o wrote:
> On Tue, Nov 12, 2013 at 09:55:29AM +0100, Daniel Borkmann wrote:
> > 
> > As per Hannes' suggestion, the result should look like (see cover
> > letter in [1]):
> > 
> > if (r->entropy_total > 128) {
> > 	r->initialized = 1;
> > 	r->entropy_total = 0;
> > 	if (r == &nonblocking_pool) {
> > 		prandom_reseed_late();
> > 		pr_notice("random: %s pool is initialized\n",
> > 			  r->name);
> > 	}
> > }
> 
> Agreed.  What's the schedule for pushing net-dev to Linus?  I'm
> currently at Korea Linux Forum, and I was originally planning on
> pushing random.git to Linus sometime today, but I'm also willing to
> wait for net-dev to go first.  Either way, we should make sure Linus
> is aware of the agreed-upon resolution of the merge conflict.

net-next is already on its way: http://markmail.org/message/ihccweynhtpdd66u

Greetings,

  Hannes

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the random tree with the net-next tree
  2013-11-12 23:02   ` Theodore Ts'o
  2013-11-12 23:13     ` Hannes Frederic Sowa
@ 2013-11-12 23:17     ` David Miller
  2013-11-12 23:24       ` Theodore Ts'o
  1 sibling, 1 reply; 8+ messages in thread
From: David Miller @ 2013-11-12 23:17 UTC (permalink / raw)
  To: tytso; +Cc: dborkman, sfr, linux-next, linux-kernel, hannes, netdev

From: Theodore Ts'o <tytso@mit.edu>
Date: Tue, 12 Nov 2013 18:02:42 -0500

> On Tue, Nov 12, 2013 at 09:55:29AM +0100, Daniel Borkmann wrote:
>> 
>> As per Hannes' suggestion, the result should look like (see cover
>> letter in [1]):
>> 
>> if (r->entropy_total > 128) {
>> 	r->initialized = 1;
>> 	r->entropy_total = 0;
>> 	if (r == &nonblocking_pool) {
>> 		prandom_reseed_late();
>> 		pr_notice("random: %s pool is initialized\n",
>> 			  r->name);
>> 	}
>> }
> 
> Agreed.  What's the schedule for pushing net-dev to Linus?  I'm
> currently at Korea Linux Forum, and I was originally planning on
> pushing random.git to Linus sometime today, but I'm also willing to
> wait for net-dev to go first.  Either way, we should make sure Linus
> is aware of the agreed-upon resolution of the merge conflict.

Linus is going to pull it soon, I sent the pull request last night but
he was away from decent internet access at the time.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the random tree with the net-next tree
  2013-11-12 23:17     ` David Miller
@ 2013-11-12 23:24       ` Theodore Ts'o
  0 siblings, 0 replies; 8+ messages in thread
From: Theodore Ts'o @ 2013-11-12 23:24 UTC (permalink / raw)
  To: David Miller; +Cc: dborkman, sfr, linux-next, linux-kernel, hannes, netdev

On Tue, Nov 12, 2013 at 06:17:17PM -0500, David Miller wrote:
> > Agreed.  What's the schedule for pushing net-dev to Linus?  I'm
> > currently at Korea Linux Forum, and I was originally planning on
> > pushing random.git to Linus sometime today, but I'm also willing to
> > wait for net-dev to go first.  Either way, we should make sure Linus
> > is aware of the agreed-upon resolution of the merge conflict.
> 
> Linus is going to pull it soon, I sent the pull request last night but
> he was away from decent internet access at the time.

Great, I'll wait for net-dev to show up in Linus's tree before I send
the pull request for random.git.

Thanks,

						- Ted

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: linux-next: manual merge of the random tree with the net-next tree
  2013-11-12 20:46   ` Stephen Rothwell
@ 2013-11-14 15:17     ` Markos Chandras
  0 siblings, 0 replies; 8+ messages in thread
From: Markos Chandras @ 2013-11-14 15:17 UTC (permalink / raw)
  To: Stephen Rothwell, Daniel Borkmann
  Cc: Theodore Ts'o, linux-next, linux-kernel,
	Hannes Frederic Sowa, David Miller, netdev

On 11/12/2013 08:46 PM, Stephen Rothwell wrote:
> Hi Daniel,
>
> On Tue, 12 Nov 2013 09:55:29 +0100 Daniel Borkmann <dborkman@redhat.com> wrote:
>>
>> On 11/12/2013 05:55 AM, Stephen Rothwell wrote:
>>>
>>> Today's linux-next merge of the random tree got a conflict in
>>> drivers/char/random.c between commit 0244ad004a54 ("random32: add
>>> prandom_reseed_late() and call when nonblocking pool becomes
>>> initialized") from the net-next tree and commit 301f0595c0e7 ("random:
>>> printk notifications for urandom pool initialization") from the random
>>> tree.
>>>
>>> I fixed it up (probably not properly - see below) and can carry the fix
>>> as necessary (no action is required).
>>
>> As per Hannes' suggestion, the result should look like (see cover
>> letter in [1]):
>>
>> if (r->entropy_total > 128) {
>> 	r->initialized = 1;
>> 	r->entropy_total = 0;
>> 	if (r == &nonblocking_pool) {
>> 		prandom_reseed_late();
>> 		pr_notice("random: %s pool is initialized\n",
>> 			  r->name);
>> 	}
>> }
>
> I will use that from today.  Thanks.
>

Hi Stephen,

This broke the build for MIPS for the malta_defconfig when using the 
latest Mentor toolchain.

In file included from include/linux/fs.h:16:0,
                  from fs/fuse/fuse_i.h:13,
                  from fs/fuse/file.c:9:
fs/fuse/file.c: In function 'fuse_file_poll':
include/linux/rbtree.h:82:28: warning: 'parent' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
fs/fuse/file.c:2580:27: note: 'parent' was declared here
drivers/char/random.c: In function 'init_std_data':
drivers/char/random.c:1249:1: internal compiler error: in 
add_insn_before, at emit-rtl.c:3857
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourcery.mentor.com/GNUToolchain/> for instructions.
make[2]: *** [drivers/char/random.o] Error 1
make[1]: *** [drivers/char] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....


If you want to reproduce it you can do the following steps:
- Get a MIPS Mentor toolchain from 
https://sourcery.mentor.com/GNUToolchain/release2554
- make ARCH=mips CROSS_COMPILE=$TOOLCHAIN_PATH/bin/mips-linux-gnu- 
malta_defconfig
- make ARCH=mips CROSS_COMPILE=$TOOLCHAIN_PATH/bin/mips-linux-gnu-


We are working with the toolchain group to come up with a workaround in 
the code to resolve the problem.

-- 
markos

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-11-14 15:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-12  4:55 linux-next: manual merge of the random tree with the net-next tree Stephen Rothwell
2013-11-12  8:55 ` Daniel Borkmann
2013-11-12 20:46   ` Stephen Rothwell
2013-11-14 15:17     ` Markos Chandras
2013-11-12 23:02   ` Theodore Ts'o
2013-11-12 23:13     ` Hannes Frederic Sowa
2013-11-12 23:17     ` David Miller
2013-11-12 23:24       ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).