Message ID | 20170704060528.17290-1-joel@jms.id.au |
---|---|
State | Accepted, archived |
Headers | show |
On Tue, 2017-07-04 at 15:35 +0930, Joel Stanley wrote: > From the timeriomem_rng bindings: > > quality: estimated number of bits of true entropy per 1024 bits read > from the rng. Defaults to zero which causes the kernel's default > quality to be used instead. Note that the default quality is usually > zero which disables using this rng to automatically fill the kernel's > entropy pool. This does not appear in the 4.12 kernel's bindings at Documentation/devicetree/bindings/rng/timeriomem_rng.txt, and doesn't appear in Ted T'so's dev branch[1]. Where did you find this binding description? Andrew [1] https://git.kernel.org/pub/scm/linux/kernel/git/tytso/random.git/tree/Documentation/devicetree/bindings/rng/timeriomem_rng.txt?h=dev > > As to the recommended value for us to use: > > > Rick Altherr <raltherr@google.com> wrote: > > Quality is #bit of entropy per 1000 bits read. 100 is a > > conservative value that was suggested by those in the know. > > Signed-off-by: Joel Stanley <joel@jms.id.au> > --- > arch/arm/boot/dts/aspeed-g4.dtsi | 1 + > arch/arm/boot/dts/aspeed-g5.dtsi | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi > index 9cc959fccfa0..470a6335399a 100644 > --- a/arch/arm/boot/dts/aspeed-g4.dtsi > +++ b/arch/arm/boot/dts/aspeed-g4.dtsi > @@ -193,6 +193,7 @@ > > compatible = "timeriomem_rng"; > > reg = <0x1e6e2078 0x4>; > > period = <1>; > > + quality = <100>; > > }; > > > > pinctrl: pinctrl@1e6e2000 { > diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi > index 992242d3b22e..466b322951e1 100644 > --- a/arch/arm/boot/dts/aspeed-g5.dtsi > +++ b/arch/arm/boot/dts/aspeed-g5.dtsi > @@ -232,6 +232,7 @@ > > compatible = "timeriomem_rng"; > > reg = <0x1e6e2078 0x4>; > > period = <1>; > > + quality = <100>; > > }; > > > > gfx: display@1e6e6000 {
On 4 Jul. 2017 19:43, "Andrew Jeffery" <andrew@aj.id.au> wrote: On Tue, 2017-07-04 at 15:35 +0930, Joel Stanley wrote: > From the timeriomem_rng bindings: > > quality: estimated number of bits of true entropy per 1024 bits read > from the rng. Defaults to zero which causes the kernel's default > quality to be used instead. Note that the default quality is usually > zero which disables using this rng to automatically fill the kernel's > entropy pool. This does not appear in the 4.12 kernel's bindings at Documentation/devicetree/bindings/rng/timeriomem_rng.txt, and doesn't appear in Ted T'so's dev branch[1]. Where did you find this binding description? Herbet's tree. They will be in 4.13. Cheers, Joel Andrew [1] https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ random.git/tree/Documentation/devicetree/bindings/rng/ timeriomem_rng.txt?h=dev > > As to the recommended value for us to use: > > > Rick Altherr <raltherr@google.com> wrote: > > Quality is #bit of entropy per 1000 bits read. 100 is a > > conservative value that was suggested by those in the know. > > Signed-off-by: Joel Stanley <joel@jms.id.au> > --- > arch/arm/boot/dts/aspeed-g4.dtsi | 1 + > arch/arm/boot/dts/aspeed-g5.dtsi | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi > index 9cc959fccfa0..470a6335399a 100644 > --- a/arch/arm/boot/dts/aspeed-g4.dtsi > +++ b/arch/arm/boot/dts/aspeed-g4.dtsi > @@ -193,6 +193,7 @@ > > compatible = "timeriomem_rng"; > > reg = <0x1e6e2078 0x4>; > > period = <1>; > > + quality = <100>; > > }; > > > > pinctrl: pinctrl@1e6e2000 { > diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi > index 992242d3b22e..466b322951e1 100644 > --- a/arch/arm/boot/dts/aspeed-g5.dtsi > +++ b/arch/arm/boot/dts/aspeed-g5.dtsi > @@ -232,6 +232,7 @@ > > compatible = "timeriomem_rng"; > > reg = <0x1e6e2078 0x4>; > > period = <1>; > > + quality = <100>; > > }; > > > > gfx: display@1e6e6000 {
On Tue, 2017-07-04 at 21:51 +0930, Joel Stanley wrote: > > > > On 4 Jul. 2017 19:43, "Andrew Jeffery" <andrew@aj.id.au> wrote: > On Tue, 2017-07-04 at 15:35 +0930, Joel Stanley wrote: > > From the timeriomem_rng bindings: > > > > quality: estimated number of bits of true entropy per 1024 bits read > > from the rng. Defaults to zero which causes the kernel's default > > quality to be used instead. Note that the default quality is usually > > zero which disables using this rng to automatically fill the kernel's > > entropy pool. > > This does not appear in the 4.12 kernel's bindings at > Documentation/devicetree/bindings/rng/timeriomem_rng.txt, and doesn't > appear in Ted T'so's dev branch[1]. > > Where did you find this binding description? > > Herbet's tree. They will be in 4.13. Okay, I found it here: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git/tree/Documentation/devicetree/bindings/rng/timeriomem_rng.txt Looks like to be useful we need to cherry-pick https://patchwork.kernel .org/patch/9741401/ as well. Were you planning to do that (as the patch doesn't appear to be in dev-4.10 as of this morning), or is your intent just to future-proof us for when the patch gets pulled in through general progress? Andrew > > Cheers, > > Joel > > > Andrew > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/tytso/random.git/tree/Documentation/devicetree/bindings/rng/timeriomem_rng.txt?h=dev > > > > > As to the recommended value for us to use: > > > > > > Rick Altherr <raltherr@google.com> wrote: > > > Quality is #bit of entropy per 1000 bits read. 100 is a > > > conservative value that was suggested by those in the know. > > > > > Signed-off-by: Joel Stanley <joel@jms.id.au> > > --- > > arch/arm/boot/dts/aspeed-g4.dtsi | 1 + > > arch/arm/boot/dts/aspeed-g5.dtsi | 1 + > > 2 files changed, 2 insertions(+) > > > > diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi > > index 9cc959fccfa0..470a6335399a 100644 > > --- a/arch/arm/boot/dts/aspeed-g4.dtsi > > +++ b/arch/arm/boot/dts/aspeed-g4.dtsi > > @@ -193,6 +193,7 @@ > > > compatible = "timeriomem_rng"; > > > reg = <0x1e6e2078 0x4>; > > > period = <1>; > > > + quality = <100>; > > > }; > > > > > > > pinctrl: pinctrl@1e6e2000 { > > diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi > > index 992242d3b22e..466b322951e1 100644 > > --- a/arch/arm/boot/dts/aspeed-g5.dtsi > > +++ b/arch/arm/boot/dts/aspeed-g5.dtsi > > @@ -232,6 +232,7 @@ > > > compatible = "timeriomem_rng"; > > > reg = <0x1e6e2078 0x4>; > > > period = <1>; > > > + quality = <100>; > > > }; > > > > > > > gfx: display@1e6e6000 { >
diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi index 9cc959fccfa0..470a6335399a 100644 --- a/arch/arm/boot/dts/aspeed-g4.dtsi +++ b/arch/arm/boot/dts/aspeed-g4.dtsi @@ -193,6 +193,7 @@ compatible = "timeriomem_rng"; reg = <0x1e6e2078 0x4>; period = <1>; + quality = <100>; }; pinctrl: pinctrl@1e6e2000 { diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi index 992242d3b22e..466b322951e1 100644 --- a/arch/arm/boot/dts/aspeed-g5.dtsi +++ b/arch/arm/boot/dts/aspeed-g5.dtsi @@ -232,6 +232,7 @@ compatible = "timeriomem_rng"; reg = <0x1e6e2078 0x4>; period = <1>; + quality = <100>; }; gfx: display@1e6e6000 {