* [PR PATCH] pinebookpro-kernel: fix build w/ gcc10
@ 2020-09-05 17:22 pullmoll
2020-09-05 19:21 ` ericonr
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: pullmoll @ 2020-09-05 17:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
There is a new pull request by pullmoll against master on the void-packages repository
https://github.com/pullmoll/void-packages pbk-kernel
https://github.com/void-linux/void-packages/pull/24699
pinebookpro-kernel: fix build w/ gcc10
With gcc10 the patched piece of code does not compile when the XORs (^)
are done inside the initializer, so I added local variables for the
four initializers besides kiv.
[ci skip]
A patch file from https://github.com/void-linux/void-packages/pull/24699.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pbk-kernel-24699.patch --]
[-- Type: text/x-diff, Size: 1965 bytes --]
From d1497929eb138229e5c4f881a3ace486ea5c43c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= <pullmoll@t-online.de>
Date: Sat, 5 Sep 2020 19:21:54 +0200
Subject: [PATCH] pinebookpro-kernel: fix build w/ gcc10
With gcc10 the patched piece of code does not compile when the XORs (^)
are done inside the initializer, so I added local variables for the
four initializers besides kiv.
[ci skip]
---
.../patches/crypto_aegis_init_neon.patch | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 srcpkgs/pinebookpro-kernel/patches/crypto_aegis_init_neon.patch
diff --git a/srcpkgs/pinebookpro-kernel/patches/crypto_aegis_init_neon.patch b/srcpkgs/pinebookpro-kernel/patches/crypto_aegis_init_neon.patch
new file mode 100644
index 00000000000..e5fd5a83886
--- /dev/null
+++ b/srcpkgs/pinebookpro-kernel/patches/crypto_aegis_init_neon.patch
@@ -0,0 +1,33 @@
+--- a/crypto/aegis128-neon-inner.c 2020-09-05 19:09:33.377243984 +0200
++++ b/crypto/aegis128-neon-inner.c 2020-09-05 19:11:29.457249973 +0200
+@@ -131,23 +131,21 @@
+
+ void crypto_aegis128_init_neon(void *state, const void *key, const void *iv)
+ {
+- static const uint8_t const0[] = {
++ static uint8_t const const0[] = {
+ 0x00, 0x01, 0x01, 0x02, 0x03, 0x05, 0x08, 0x0d,
+ 0x15, 0x22, 0x37, 0x59, 0x90, 0xe9, 0x79, 0x62,
+ };
+- static const uint8_t const1[] = {
++ static uint8_t const const1[] = {
+ 0xdb, 0x3d, 0x18, 0x55, 0x6d, 0xc2, 0x2f, 0xf1,
+ 0x20, 0x11, 0x31, 0x42, 0x73, 0xb5, 0x28, 0xdd,
+ };
+ uint8x16_t k = vld1q_u8(key);
+ uint8x16_t kiv = k ^ vld1q_u8(iv);
+- struct aegis128_state st = {{
+- kiv,
+- vld1q_u8(const1),
+- vld1q_u8(const0),
+- k ^ vld1q_u8(const0),
+- k ^ vld1q_u8(const1),
+- }};
++ uint8x16_t c0 = vld1q_u8(const0);
++ uint8x16_t c1 = vld1q_u8(const1);
++ uint8x16_t kc0 = k ^ c0;
++ uint8x16_t kc1 = k ^ c1;
++ struct aegis128_state st = { kiv, c1, c0, kc0, kc1 };
+ int i;
+
+ preload_sbox();
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
@ 2020-09-05 19:21 ` ericonr
2020-09-05 19:51 ` CameronNemo
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ericonr @ 2020-09-05 19:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/24699#issuecomment-687651503
Comment:
@CameronNemo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
2020-09-05 19:21 ` ericonr
@ 2020-09-05 19:51 ` CameronNemo
2020-09-05 20:19 ` pullmoll
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: CameronNemo @ 2020-09-05 19:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 220 bytes --]
New comment by CameronNemo on void-packages repository
https://github.com/void-linux/void-packages/pull/24699#issuecomment-687655027
Comment:
Seems alright to me. Is this only for the pbp kernel, or other kernels too?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
2020-09-05 19:21 ` ericonr
2020-09-05 19:51 ` CameronNemo
@ 2020-09-05 20:19 ` pullmoll
2020-09-05 20:23 ` pullmoll
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pullmoll @ 2020-09-05 20:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
New comment by pullmoll on void-packages repository
https://github.com/void-linux/void-packages/pull/24699#issuecomment-687658249
Comment:
I think other kernels have the same function so that would apply there too.
I'd have to try and build all of them for aarch64 to tell which ones need that same patch.
Of course just inspecting the `crypto_aegis128_init_neon` function in `crypto/aegis128-neon-inner.c` in other kernels should tell that as well. OTOH I believe kernels will sooner or later have this fixed for gcc10 anyway.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
` (2 preceding siblings ...)
2020-09-05 20:19 ` pullmoll
@ 2020-09-05 20:23 ` pullmoll
2020-09-05 20:42 ` pullmoll
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pullmoll @ 2020-09-05 20:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 692 bytes --]
New comment by pullmoll on void-packages repository
https://github.com/void-linux/void-packages/pull/24699#issuecomment-687658249
Comment:
I think other kernels have the same function so that would apply there too.
I'd have to try and build all of them for aarch64 to tell which ones need that same patch.
Of course just inspecting the `crypto_aegis128_init_neon` function in `crypto/aegis128-neon-inner.c` in other kernels should tell that as well. OTOH I believe kernels will sooner or later have this fixed for gcc10 anyway.
Edit: I already built 5.7.17 for aarch64{,-musl} so there it does not seem to be required.
5.8.5 did build for aarch64-musl, update to 5.8.6 is pending.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
` (3 preceding siblings ...)
2020-09-05 20:23 ` pullmoll
@ 2020-09-05 20:42 ` pullmoll
2020-09-05 23:58 ` pullmoll
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pullmoll @ 2020-09-05 20:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]
New comment by pullmoll on void-packages repository
https://github.com/void-linux/void-packages/pull/24699#issuecomment-687658249
Comment:
I think other kernels have the same function so that would apply there too.
I'd have to try and build all of them for aarch64 to tell which ones need that same patch.
Of course just inspecting the `crypto_aegis128_init_neon` function in `crypto/aegis128-neon-inner.c` in other kernels should tell that as well. OTOH I believe kernels will sooner or later have this fixed for gcc10 anyway.
Edit: I already built 5.7.17 for aarch64{,-musl} so there it does not seem to be required.
5.8.5 did build for aarch64-musl, update to ~~5.8.6~~ 5.8.7 is pending.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
` (4 preceding siblings ...)
2020-09-05 20:42 ` pullmoll
@ 2020-09-05 23:58 ` pullmoll
2020-09-06 0:05 ` q66
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pullmoll @ 2020-09-05 23:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 677 bytes --]
New comment by pullmoll on void-packages repository
https://github.com/void-linux/void-packages/pull/24699#issuecomment-687677856
Comment:
It seems as if only pinebookpro-kernel is affected by this build error. `linux5.7-5.7.19` built fine.
`linux5.8.7` asks some questions so needs an update for its `arm64-dotconfig`:
```
*
* ARMv8.5 architectural features
*
Branch Target Identification support (ARM64_BTI) [Y/n/?] y
Use Branch Target Identification for kernel (ARM64_BTI_KERNEL) [Y/n/?] (NEW)
Enable support for E0PD (ARM64_E0PD) [Y/n/?] y
Enable support for random number generation (ARCH_RANDOM) [Y/n/?] y
#
# configuration written to .config
#
```
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
` (5 preceding siblings ...)
2020-09-05 23:58 ` pullmoll
@ 2020-09-06 0:05 ` q66
2020-09-06 0:12 ` q66
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: q66 @ 2020-09-06 0:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
New comment by q66 on void-packages repository
https://github.com/void-linux/void-packages/pull/24699#issuecomment-687678460
Comment:
our standard kernels disable aegis128 so we don't need it
pinebookpro kernel uses defconfig from its upstream, which kinda sucks since we don't have control over the features
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
` (6 preceding siblings ...)
2020-09-06 0:05 ` q66
@ 2020-09-06 0:12 ` q66
2020-09-06 0:13 ` q66
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: q66 @ 2020-09-06 0:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 996 bytes --]
New comment by q66 on void-packages repository
https://github.com/void-linux/void-packages/pull/24699#issuecomment-687678976
Comment:
also, there are no issues with `linux5.8-5.8.7` on `aarch64` here:
```
=> linux5.8-5.8.7_1: running do_configure ...
=> Detected a .config file for your arch, using it.
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
YACC scripts/kconfig/parser.tab.[ch]
LEX scripts/kconfig/lexer.lex.c
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTCC scripts/kconfig/lexer.lex.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
=> linux5.8-5.8.7_1: running pre-build hook: 02-script-wrapper ...
=> linux5.8-5.8.7_1: running do_build ...
scripts/kconfig/conf --syncconfig Kconfig
```
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
` (7 preceding siblings ...)
2020-09-06 0:12 ` q66
@ 2020-09-06 0:13 ` q66
2020-09-22 21:19 ` [PR PATCH] [Closed]: " pullmoll
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: q66 @ 2020-09-06 0:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]
New comment by q66 on void-packages repository
https://github.com/void-linux/void-packages/pull/24699#issuecomment-687678976
Comment:
also, there are no issues with `linux5.8-5.8.7` on `aarch64` here (so any config changes must be due to gcc10):
```
=> linux5.8-5.8.7_1: running do_configure ...
=> Detected a .config file for your arch, using it.
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
YACC scripts/kconfig/parser.tab.[ch]
LEX scripts/kconfig/lexer.lex.c
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTCC scripts/kconfig/lexer.lex.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
=> linux5.8-5.8.7_1: running pre-build hook: 02-script-wrapper ...
=> linux5.8-5.8.7_1: running do_build ...
scripts/kconfig/conf --syncconfig Kconfig
```
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PR PATCH] [Closed]: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
` (8 preceding siblings ...)
2020-09-06 0:13 ` q66
@ 2020-09-22 21:19 ` pullmoll
2020-09-30 1:01 ` CameronNemo
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pullmoll @ 2020-09-22 21:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 570 bytes --]
There's a closed pull request on the void-packages repository
pinebookpro-kernel: fix build w/ gcc10
https://github.com/void-linux/void-packages/pull/24699
Description:
With gcc10 the patched piece of code does not compile when the XORs (^)
are done inside the initializer, so I added local variables for the
four initializers besides kiv.
The changes of `const uint8_t ...` to `uint8_t const ...` is just to match the [official docs for vld1q_u8()](https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics?search=vld1q_u8)
[ci skip]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
` (9 preceding siblings ...)
2020-09-22 21:19 ` [PR PATCH] [Closed]: " pullmoll
@ 2020-09-30 1:01 ` CameronNemo
2020-09-30 6:10 ` pullmoll
2020-09-30 6:36 ` CameronNemo
12 siblings, 0 replies; 14+ messages in thread
From: CameronNemo @ 2020-09-30 1:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
New comment by CameronNemo on void-packages repository
https://github.com/void-linux/void-packages/pull/24699#issuecomment-701098415
Comment:
Hmm what happened to this?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
` (10 preceding siblings ...)
2020-09-30 1:01 ` CameronNemo
@ 2020-09-30 6:10 ` pullmoll
2020-09-30 6:36 ` CameronNemo
12 siblings, 0 replies; 14+ messages in thread
From: pullmoll @ 2020-09-30 6:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
New comment by pullmoll on void-packages repository
https://github.com/void-linux/void-packages/pull/24699#issuecomment-701178222
Comment:
9e67fa5282234beefbca2bcd307e12d3604a8905 and the patch would be required if, when we switch to gcc10, the pinebookpro-kernel is still at 5.7.0.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: pinebookpro-kernel: fix build w/ gcc10
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
` (11 preceding siblings ...)
2020-09-30 6:10 ` pullmoll
@ 2020-09-30 6:36 ` CameronNemo
12 siblings, 0 replies; 14+ messages in thread
From: CameronNemo @ 2020-09-30 6:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 272 bytes --]
New comment by CameronNemo on void-packages repository
https://github.com/void-linux/void-packages/pull/24699#issuecomment-701188801
Comment:
I have a 5.9.0-rc7 build -- but it is somewhat hacked together. I'll ping you when the actual release is made, is that alright?
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2020-09-30 6:36 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-05 17:22 [PR PATCH] pinebookpro-kernel: fix build w/ gcc10 pullmoll
2020-09-05 19:21 ` ericonr
2020-09-05 19:51 ` CameronNemo
2020-09-05 20:19 ` pullmoll
2020-09-05 20:23 ` pullmoll
2020-09-05 20:42 ` pullmoll
2020-09-05 23:58 ` pullmoll
2020-09-06 0:05 ` q66
2020-09-06 0:12 ` q66
2020-09-06 0:13 ` q66
2020-09-22 21:19 ` [PR PATCH] [Closed]: " pullmoll
2020-09-30 1:01 ` CameronNemo
2020-09-30 6:10 ` pullmoll
2020-09-30 6:36 ` CameronNemo
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).