All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu.inc: Drop rng-tools
@ 2017-11-13 17:35 Richard Purdie
  2017-11-13 19:30 ` Otavio Salvador
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Purdie @ 2017-11-13 17:35 UTC (permalink / raw)
  To: openembedded-core

This was included to allow hwrng to feed data to /dev/random. Since the
kernel does this itself (confirmed by the recent kernel Kconfig text change
, code inspection and local testing), we can drop rng-tools from these
images.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/conf/machine/include/qemu.inc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/conf/machine/include/qemu.inc b/meta/conf/machine/include/qemu.inc
index 0e4103b..9094279 100644
--- a/meta/conf/machine/include/qemu.inc
+++ b/meta/conf/machine/include/qemu.inc
@@ -26,6 +26,4 @@ EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native"
 # Provide the nfs server kernel module for all qemu images
 KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
 
-MACHINE_EXTRA_RRECOMMENDS += "rng-tools"
-
 IMAGE_CLASSES += "qemuboot"
-- 
2.7.4



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

* Re: [PATCH] qemu.inc: Drop rng-tools
  2017-11-13 17:35 [PATCH] qemu.inc: Drop rng-tools Richard Purdie
@ 2017-11-13 19:30 ` Otavio Salvador
  2017-11-13 19:55   ` Burton, Ross
  0 siblings, 1 reply; 12+ messages in thread
From: Otavio Salvador @ 2017-11-13 19:30 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

On Mon, Nov 13, 2017 at 3:35 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> This was included to allow hwrng to feed data to /dev/random. Since the
> kernel does this itself (confirmed by the recent kernel Kconfig text change
> , code inspection and local testing), we can drop rng-tools from these
> images.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

This is still needed for QEMU ARM.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH] qemu.inc: Drop rng-tools
  2017-11-13 19:30 ` Otavio Salvador
@ 2017-11-13 19:55   ` Burton, Ross
  2017-11-14 17:16     ` Otavio Salvador
  0 siblings, 1 reply; 12+ messages in thread
From: Burton, Ross @ 2017-11-13 19:55 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

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

Can you explain why?

Ross

On 13 November 2017 at 19:30, Otavio Salvador <
otavio.salvador@ossystems.com.br> wrote:

> On Mon, Nov 13, 2017 at 3:35 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > This was included to allow hwrng to feed data to /dev/random. Since the
> > kernel does this itself (confirmed by the recent kernel Kconfig text
> change
> > , code inspection and local testing), we can drop rng-tools from these
> > images.
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> This is still needed for QEMU ARM.
>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 2144 bytes --]

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

* Re: [PATCH] qemu.inc: Drop rng-tools
  2017-11-13 19:55   ` Burton, Ross
@ 2017-11-14 17:16     ` Otavio Salvador
  2017-11-15 12:26       ` Burton, Ross
  0 siblings, 1 reply; 12+ messages in thread
From: Otavio Salvador @ 2017-11-14 17:16 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

Hello Ross,

On Mon, Nov 13, 2017 at 5:55 PM, Burton, Ross <ross.burton@intel.com> wrote:
> Can you explain why?

We are using QEMU ARM for runtime tests on CI for updatehub, on this,
when we run something that required entropy just after boot and
especially if running inside of a Docker, it fails badly for 140s.
Adding rng-tools solves it :-)

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH] qemu.inc: Drop rng-tools
  2017-11-14 17:16     ` Otavio Salvador
@ 2017-11-15 12:26       ` Burton, Ross
  2017-11-15 19:59         ` Otavio Salvador
  0 siblings, 1 reply; 12+ messages in thread
From: Burton, Ross @ 2017-11-15 12:26 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

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

On 14 November 2017 at 17:16, Otavio Salvador <
otavio.salvador@ossystems.com.br> wrote:

> Hello Ross,
>
> On Mon, Nov 13, 2017 at 5:55 PM, Burton, Ross <ross.burton@intel.com>
> wrote:
> > Can you explain why?
>
> We are using QEMU ARM for runtime tests on CI for updatehub, on this,
> when we run something that required entropy just after boot and
> especially if running inside of a Docker, it fails badly for 140s.
> Adding rng-tools solves it :-)


Are you enabling the virtio-rng driver so qemu can bridge the host entropy
into the guest?

Ross

[-- Attachment #2: Type: text/html, Size: 973 bytes --]

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

* Re: [PATCH] qemu.inc: Drop rng-tools
  2017-11-15 12:26       ` Burton, Ross
@ 2017-11-15 19:59         ` Otavio Salvador
  2017-11-16 13:11           ` Burton, Ross
  0 siblings, 1 reply; 12+ messages in thread
From: Otavio Salvador @ 2017-11-15 19:59 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

On Wed, Nov 15, 2017 at 10:26 AM, Burton, Ross <ross.burton@intel.com> wrote:
> On 14 November 2017 at 17:16, Otavio Salvador
> <otavio.salvador@ossystems.com.br> wrote:
>>
>> Hello Ross,
>>
>> On Mon, Nov 13, 2017 at 5:55 PM, Burton, Ross <ross.burton@intel.com>
>> wrote:
>> > Can you explain why?
>>
>> We are using QEMU ARM for runtime tests on CI for updatehub, on this,
>> when we run something that required entropy just after boot and
>> especially if running inside of a Docker, it fails badly for 140s.
>> Adding rng-tools solves it :-)
>
>
> Are you enabling the virtio-rng driver so qemu can bridge the host entropy
> into the guest?

I am not. Do you have an example of command line for it?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH] qemu.inc: Drop rng-tools
  2017-11-15 19:59         ` Otavio Salvador
@ 2017-11-16 13:11           ` Burton, Ross
  2017-11-16 13:14             ` Richard Purdie
  0 siblings, 1 reply; 12+ messages in thread
From: Burton, Ross @ 2017-11-16 13:11 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

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

On 15 November 2017 at 19:59, Otavio Salvador <
otavio.salvador@ossystems.com.br> wrote:

> > Are you enabling the virtio-rng driver so qemu can bridge the host
> entropy
> > into the guest?
>
> I am not. Do you have an example of command line for it?


 https://wiki.qemu.org/Features/VirtIORNG talks about qemu's support and
what to turn on there (the default qemu machines enable that).

http://elixir.free-electrons.com/linux/latest/source/drivers/char/hw_random/Kconfig
documents HW_RANDOM_VIRTIO and says at the top that the devices feed into
the kernel pool.

Ross

[-- Attachment #2: Type: text/html, Size: 1230 bytes --]

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

* Re: [PATCH] qemu.inc: Drop rng-tools
  2017-11-16 13:11           ` Burton, Ross
@ 2017-11-16 13:14             ` Richard Purdie
  2017-11-16 13:26               ` Otavio Salvador
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Purdie @ 2017-11-16 13:14 UTC (permalink / raw)
  To: Burton, Ross, Otavio Salvador
  Cc: Patches and discussions about the oe-core layer

On Thu, 2017-11-16 at 13:11 +0000, Burton, Ross wrote:
> On 15 November 2017 at 19:59, Otavio Salvador <otavio.salvador@ossyst
> ems.com.br> wrote:
> > > Are you enabling the virtio-rng driver so qemu can bridge the
> > host entropy
> > > into the guest?
> > 
> > I am not. Do you have an example of command line for it?
>  https://wiki.qemu.org/Features/VirtIORNG talks about qemu's support
> and what to turn on there (the default qemu machines enable that).
> 
> http://elixir.free-electrons.com/linux/latest/source/drivers/char/hw_
> random/Kconfig documents HW_RANDOM_VIRTIO and says at the top that
> the devices feed into the kernel pool.

Just to add, for qemuarm:

machine/qemuarm.conf:QB_OPT_APPEND = "-show-cursor -usb -device usb-tablet -device virtio-rng-pci"

the key piece being virtio-rng-pci on the commandline.

Cheers,

Richard


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

* Re: [PATCH] qemu.inc: Drop rng-tools
  2017-11-16 13:14             ` Richard Purdie
@ 2017-11-16 13:26               ` Otavio Salvador
  2018-11-22 17:39                 ` Martin Jansa
  0 siblings, 1 reply; 12+ messages in thread
From: Otavio Salvador @ 2017-11-16 13:26 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

Hello Richard,
Hello Ross,

On Thu, Nov 16, 2017 at 11:14 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Thu, 2017-11-16 at 13:11 +0000, Burton, Ross wrote:
>> On 15 November 2017 at 19:59, Otavio Salvador <otavio.salvador@ossyst
>> ems.com.br> wrote:
>> > > Are you enabling the virtio-rng driver so qemu can bridge the
>> > host entropy
>> > > into the guest?
>> >
>> > I am not. Do you have an example of command line for it?
>>  https://wiki.qemu.org/Features/VirtIORNG talks about qemu's support
>> and what to turn on there (the default qemu machines enable that).
>>
>> http://elixir.free-electrons.com/linux/latest/source/drivers/char/hw_
>> random/Kconfig documents HW_RANDOM_VIRTIO and says at the top that
>> the devices feed into the kernel pool.
>
> Just to add, for qemuarm:
>
> machine/qemuarm.conf:QB_OPT_APPEND = "-show-cursor -usb -device usb-tablet -device virtio-rng-pci"
>
> the key piece being virtio-rng-pci on the commandline.

I did try it here. Thanks for the pointers.

We use a Docker container to run QEMU and in this environment, it does
not work well. At least I did not get it working.

I don't know if it is a problem or not for OE-Core. Possibly people
will run things inside a container and keep rng-tools makes it working
in those environments.

I will keep investigating here if I can make it work in a container ...

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH] qemu.inc: Drop rng-tools
  2017-11-16 13:26               ` Otavio Salvador
@ 2018-11-22 17:39                 ` Martin Jansa
  2018-11-22 17:48                   ` Otavio Salvador
  0 siblings, 1 reply; 12+ messages in thread
From: Martin Jansa @ 2018-11-22 17:39 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

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

Hi all,

I was just hit by this issue as well, we're using VirtualBox instead of
QEmu, so of course we were missing "-device virtio-rng-pci" and I haven't
found some equivalent of this for VirtualBox.

Adding rng-tools back to our images allows to use ssh again (without
rng-tools sshd never started because ssh-keygen got stuck trying to read
/dev/random).

I don't know how many people are using VirtualBox or docker to run qemu
images built with OE, but it's probably worth mentioning in 2.6 release
notes.

Cheers,

On Thu, Nov 16, 2017 at 2:26 PM Otavio Salvador <
otavio.salvador@ossystems.com.br> wrote:

> Hello Richard,
> Hello Ross,
>
> On Thu, Nov 16, 2017 at 11:14 AM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Thu, 2017-11-16 at 13:11 +0000, Burton, Ross wrote:
> >> On 15 November 2017 at 19:59, Otavio Salvador <otavio.salvador@ossyst
> >> ems.com.br> wrote:
> >> > > Are you enabling the virtio-rng driver so qemu can bridge the
> >> > host entropy
> >> > > into the guest?
> >> >
> >> > I am not. Do you have an example of command line for it?
> >>  https://wiki.qemu.org/Features/VirtIORNG talks about qemu's support
> >> and what to turn on there (the default qemu machines enable that).
> >>
> >> http://elixir.free-electrons.com/linux/latest/source/drivers/char/hw_
> >> random/Kconfig documents HW_RANDOM_VIRTIO and says at the top that
> >> the devices feed into the kernel pool.
> >
> > Just to add, for qemuarm:
> >
> > machine/qemuarm.conf:QB_OPT_APPEND = "-show-cursor -usb -device
> usb-tablet -device virtio-rng-pci"
> >
> > the key piece being virtio-rng-pci on the commandline.
>
> I did try it here. Thanks for the pointers.
>
> We use a Docker container to run QEMU and in this environment, it does
> not work well. At least I did not get it working.
>
> I don't know if it is a problem or not for OE-Core. Possibly people
> will run things inside a container and keep rng-tools makes it working
> in those environments.
>
> I will keep investigating here if I can make it work in a container ...
>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 3851 bytes --]

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

* Re: [PATCH] qemu.inc: Drop rng-tools
  2018-11-22 17:39                 ` Martin Jansa
@ 2018-11-22 17:48                   ` Otavio Salvador
  0 siblings, 0 replies; 12+ messages in thread
From: Otavio Salvador @ 2018-11-22 17:48 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Thu, Nov 22, 2018 at 3:40 PM Martin Jansa <martin.jansa@gmail.com> wrote:
> I was just hit by this issue as well, we're using VirtualBox instead of QEmu, so of course we were missing "-device virtio-rng-pci" and I haven't found some equivalent of this for VirtualBox.
>
> Adding rng-tools back to our images allows to use ssh again (without rng-tools sshd never started because ssh-keygen got stuck trying to read /dev/random).
>
> I don't know how many people are using VirtualBox or docker to run qemu images built with OE, but it's probably worth mentioning in 2.6 release notes.

Agreed :-)

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750


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

* [PATCH] qemu.inc: Drop rng-tools
@ 2017-11-13 17:34 Richard Purdie
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Purdie @ 2017-11-13 17:34 UTC (permalink / raw)
  To: openembedded-core

This was included to allow hwrng to feed data to /dev/random. Since the
kernel does this itself (confirmed by the recent kernel Kconfig text change
, code inspection and local testing), we can drop rng-tools from these
images.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/conf/machine/include/qemu.inc | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/meta/conf/machine/include/qemu.inc b/meta/conf/machine/include/qemu.inc
index 0e4103b..eb387d0 100644
--- a/meta/conf/machine/include/qemu.inc
+++ b/meta/conf/machine/include/qemu.inc
@@ -26,6 +26,3 @@ EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native"
 # Provide the nfs server kernel module for all qemu images
 KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
 
-MACHINE_EXTRA_RRECOMMENDS += "rng-tools"
-
-IMAGE_CLASSES += "qemuboot"
-- 
2.7.4



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

end of thread, other threads:[~2018-11-22 17:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 17:35 [PATCH] qemu.inc: Drop rng-tools Richard Purdie
2017-11-13 19:30 ` Otavio Salvador
2017-11-13 19:55   ` Burton, Ross
2017-11-14 17:16     ` Otavio Salvador
2017-11-15 12:26       ` Burton, Ross
2017-11-15 19:59         ` Otavio Salvador
2017-11-16 13:11           ` Burton, Ross
2017-11-16 13:14             ` Richard Purdie
2017-11-16 13:26               ` Otavio Salvador
2018-11-22 17:39                 ` Martin Jansa
2018-11-22 17:48                   ` Otavio Salvador
  -- strict thread matches above, loose matches on Subject: below --
2017-11-13 17:34 Richard Purdie

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.