Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543751 > unrolled thread
| Started by | Kees Cook <keescook@chromium.org> |
|---|---|
| First post | 2016-12-16 22:10 +0100 |
| Last post | 2016-12-16 23:30 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] latent_entropy: fix ARM build error on earlier gcc Kees Cook <keescook@chromium.org> - 2016-12-16 22:10 +0100
Re: [PATCH] latent_entropy: fix ARM build error on earlier gcc "PaX Team" <pageexec@freemail.hu> - 2016-12-16 23:20 +0100
Re: [PATCH] latent_entropy: fix ARM build error on earlier gcc Kees Cook <keescook@chromium.org> - 2016-12-16 23:30 +0100
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Date | 2016-12-16 22:10 +0100 |
| Subject | [PATCH] latent_entropy: fix ARM build error on earlier gcc |
| Message-ID | <sP7Vn-oc-17@gated-at.bofh.it> |
This fixes build errors seen on gcc-4.9.3 or gcc-5.3.1 for an ARM:
arm-soc/init/initramfs.c: In function 'error':
arm-soc/init/initramfs.c:50:1: error: unrecognizable insn:
}
^
(insn 26 25 27 5 (set (reg:SI 111 [ local_entropy.243 ])
(rotatert:SI (reg:SI 116 [ local_entropy.243 ])
(const_int -30 [0xffffffffffffffe2]))) -1
(nil))
Patch from PaX Team <pageexec@freemail.hu>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Brad Spengler <spender@grsecurity.net>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
scripts/gcc-plugins/latent_entropy_plugin.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/gcc-plugins/latent_entropy_plugin.c b/scripts/gcc-plugins/latent_entropy_plugin.c
index ff1939b804ae..eb1964084ccd 100644
--- a/scripts/gcc-plugins/latent_entropy_plugin.c
+++ b/scripts/gcc-plugins/latent_entropy_plugin.c
@@ -328,9 +328,9 @@ static enum tree_code get_op(tree *rhs)
op = LROTATE_EXPR;
/*
* This code limits the value of random_const to
- * the size of a wide int for the rotation
+ * the size of a long for the rotation
*/
- random_const &= HOST_BITS_PER_WIDE_INT - 1;
+ random_const %= TYPE_PRECISION(long_unsigned_type_node);
break;
}
--
2.7.4
--
Kees Cook
Nexus Security
[toc] | [next] | [standalone]
| From | "PaX Team" <pageexec@freemail.hu> |
|---|---|
| Date | 2016-12-16 23:20 +0100 |
| Message-ID | <sP919-11E-45@gated-at.bofh.it> |
| In reply to | #1543751 |
On 16 Dec 2016 at 13:06, Kees Cook wrote: > This fixes build errors seen on gcc-4.9.3 or gcc-5.3.1 for an ARM: > > arm-soc/init/initramfs.c: In function 'error': > arm-soc/init/initramfs.c:50:1: error: unrecognizable insn: > } > ^ > (insn 26 25 27 5 (set (reg:SI 111 [ local_entropy.243 ]) > (rotatert:SI (reg:SI 116 [ local_entropy.243 ]) > (const_int -30 [0xffffffffffffffe2]))) -1 > (nil)) > > Patch from PaX Team <pageexec@freemail.hu> > > Reported-by: Arnd Bergmann <arnd@arndb.de> > Reported-by: Brad Spengler <spender@grsecurity.net> > Signed-off-by: Kees Cook <keescook@chromium.org> Cc: stable@vger.kernel.org perhaps?
[toc] | [prev] | [next] | [standalone]
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Date | 2016-12-16 23:30 +0100 |
| Message-ID | <sP9aN-14V-3@gated-at.bofh.it> |
| In reply to | #1543802 |
On Fri, Dec 16, 2016 at 2:17 PM, PaX Team <pageexec@freemail.hu> wrote: > On 16 Dec 2016 at 13:06, Kees Cook wrote: > >> This fixes build errors seen on gcc-4.9.3 or gcc-5.3.1 for an ARM: >> >> arm-soc/init/initramfs.c: In function 'error': >> arm-soc/init/initramfs.c:50:1: error: unrecognizable insn: >> } >> ^ >> (insn 26 25 27 5 (set (reg:SI 111 [ local_entropy.243 ]) >> (rotatert:SI (reg:SI 116 [ local_entropy.243 ]) >> (const_int -30 [0xffffffffffffffe2]))) -1 >> (nil)) >> >> Patch from PaX Team <pageexec@freemail.hu> >> >> Reported-by: Arnd Bergmann <arnd@arndb.de> >> Reported-by: Brad Spengler <spender@grsecurity.net> >> Signed-off-by: Kees Cook <keescook@chromium.org> > > Cc: stable@vger.kernel.org perhaps? Ah yes, good catch. -Kees -- Kees Cook Nexus Security
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web