[OE-core] [PATCH V2 1/2] openssh: upgrade 7.8p1 -> 7.8p1+git to support openssl 1.1.x

richard.purdie at linuxfoundation.org richard.purdie at linuxfoundation.org
Fri Sep 21 03:47:52 UTC 2018


On Fri, 2018-09-21 at 09:55 +0800, Hongxu Jia wrote:
> On 2018年09月21日 01:54, richard.purdie at linuxfoundation.org wrote:
> > On Fri, 2018-09-21 at 00:25 +0800, Hongxu Jia wrote:
> > > On 2018年09月20日 12:54, richard.purdie at linuxfoundation.org wrote:
> > > > On Thu, 2018-09-20 at 09:45 +0800, Hongxu Jia wrote:
> > > > > I will fix it as my top priority today.
> > > > > 
> > > > > Reproduce steps:
> > > > > 
> > > > > - Build core-image-sato-sdk on qemuarm64
> > > > > - Run qemu
> > > > > - Log over ssh (openssh) failed
> > > > > 
> > > > 
> > > > I did have a little bit of a look at this. It seems to hang
> > > > during
> > > > key
> > > > generation before starting the server during boot.
> > > > 
> > > > I had a suspicion that the problem could be a lack of entropy.
> > > > We're
> > > > supposed to have the virtio entropy generation being passed
> > > > through
> > > > from the host to avoid problems with entropy starvation but I'm
> > > > not
> > > > sure its running for arm64.
> > > > 
> > > > I noticed the .config shows CONFIG_CRYPTO_DEV_VIRTIO=m but
> > > > setting
> > > > that
> > > > to =y didn't help. The virtio rng connects via pci bus iirc and
> > > > CONFIG_PCI isn't set so I'm now looking into that...
> > > > 
> > > > To update, adding this config to the kernel:
> > > > 
> > > > CONFIG_CRYPTO_DEV_VIRTIO=y
> > > > CONFIG_PCI=y
> > > > CONFIG_PCI_HOST_GENERIC=y
> > > 
> > > Hi RP,
> > > 
> > > Without modify config, just revert two commits on kernel source
> > > could
> > > fix the issue
> > > (sshd start successfully)
> > > 
> > > 
> > > 1. Revert "random: fix crng_ready() test"
> > > 
> > > This reverts commit 43838a23a05fbd13e47d750d3dfd77001536dd33
> > > 
> > > 
> > > 2. Revert "random: use a different mixing algorithm for
> > > add_device_randomness()"
> > > 
> > > This reverts commit dc12baacb95f205948f64dc936a47d89ee110117
> > > 
> > > But I am not sure the affect of the modification to other arch,
> > > and
> > > the root
> > > cause the above two commits introduced
> > > 
> > > Still requiring more digging
> > 
> > We do not want to revert those commits. I think the right solution
> > is
> > to enabled:
> > 
> > CONFIG_CRYPTO_DEV_VIRTIO=y
> > CONFIG_PCI=y
> > CONFIG_PCI_HOST_GENERIC=y
> 
> Hi RP,
> 
> I config kernel as you suggested, but the issue (hung) still existed
> 
> [    4.184330] random: udevd: uninitialized urandom read (16 bytes
> read)
> [    4.191186] random: udevd: uninitialized urandom read (16 bytes
> read)
> [    4.193425] random: udevd: uninitialized urandom read (16 bytes
> read)
> 
> root at qemuarm64:~# zcat /proc/config.gz | grep -e
> "CONFIG_CRYPTO_ENGINE=" 
> -e "CONFIG_PCI=" -e "CONFIG_PCI_HOST_GENERIC="
> CONFIG_PCI=y
> CONFIG_PCI_HOST_GENERIC=y
> CONFIG_CRYPTO_ENGINE=y
> 
> The attach is my kernel config, maybe I miss something in config?

The problem I really want to fix is the hang as openssh-server starts.
Without the defconfig options above, openssh server hangs at key
generation. With the changes I've mentioned applied, key generation
proceeds, the server starts and we can ssh into the machine.

The errors you mention above are worrying/annoying but are separate to
the issue of openssh hanging (they could be related in that they both
involve entropy in the random pool).

Cheers,

Richard



More information about the Openembedded-core mailing list