-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Invalid initializer': spl-0.6.58 + Gentoo sys-kernel/hardened-sources-4.7.9 (grsec) #5390
Comments
@globalcitizen Thanks for opening the bug. Reviewing things on hardened is on my to do list. |
I might have time to look in to this further on Wednesday or Thursday. |
@globalcitizen KRANDSTACK was ages ago when i was mistaken. the option that causes problems is RANDSTRUCT. do you have that one disabled? Also, can you show more of the build.log that you're getting? |
I'm on the road and the system in question is in another city. I will take a look in a day or two when I am with the machine again and try to get the log copied here. |
Sorry - I ran out of time with the server and had to put it in colo today. Good luck tracking down the issue! |
So this is a problem with mainline now, as CONFIG_GCC_PLUGIN_RANDSTRUCT is available since 4.13 and randomizes all structures that aren't marked with __no_randomize_layout since 4.14. Maybe the relevant structures should be marked or the underlying issue resolved, if it can be. I don't understand much about the matter, if I'm honest, I just ran into this issue recently. |
I'm working on this. I have a WIP that mostly builds. I'll be kinda busy the next few days but will hopefully push a PR soon so the buildbots can run on it. |
Fix build errors with gcc 7.2.0 on Gentoo with kernel 4.14 built with CONFIG_GCC_PLUGIN_RANDSTRUCT=y such as: module/nvpair/nvpair.c:2810:2:error: positional initialization of field in ?struct? declared with 'designated_init' attribute [-Werror=designated-init] nvs_native_nvlist, ^~~~~~~~~~~~~~~~~ Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Mark Wright <[email protected]> Closes openzfs#5390 Closes openzfs#6903 Requires-spl: refs/pull/669/head
Fix build errors with gcc 7.2.0 on Gentoo with kernel 4.14 built with CONFIG_GCC_PLUGIN_RANDSTRUCT=y such as: module/nvpair/nvpair.c:2810:2:error: positional initialization of field in ?struct? declared with 'designated_init' attribute [-Werror=designated-init] nvs_native_nvlist, ^~~~~~~~~~~~~~~~~ Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Mark Wright <[email protected]> Closes openzfs#5390 Closes openzfs#6903 Requires-spl: refs/pull/669/head
Fix build errors with gcc 7.2.0 on Gentoo with kernel 4.14 built with CONFIG_GCC_PLUGIN_RANDSTRUCT=y such as: module/nvpair/nvpair.c:2810:2:error: positional initialization of field in ?struct? declared with 'designated_init' attribute [-Werror=designated-init] nvs_native_nvlist, ^~~~~~~~~~~~~~~~~ Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Mark Wright <[email protected]> Closes #5390 Closes #6903
Fix build errors with gcc 7.2.0 on Gentoo with kernel 4.14 built with CONFIG_GCC_PLUGIN_RANDSTRUCT=y such as: module/nvpair/nvpair.c:2810:2:error: positional initialization of field in ?struct? declared with 'designated_init' attribute [-Werror=designated-init] nvs_native_nvlist, ^~~~~~~~~~~~~~~~~ Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Mark Wright <[email protected]> Closes openzfs#5390 Closes openzfs#6903
Fix build errors with gcc 7.2.0 on Gentoo with kernel 4.14 built with CONFIG_GCC_PLUGIN_RANDSTRUCT=y such as: module/nvpair/nvpair.c:2810:2:error: positional initialization of field in ?struct? declared with 'designated_init' attribute [-Werror=designated-init] nvs_native_nvlist, ^~~~~~~~~~~~~~~~~ Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Mark Wright <[email protected]> Closes openzfs#5390 Closes openzfs#6903
Fix build errors with gcc 7.2.0 on Gentoo with kernel 4.14 built with CONFIG_GCC_PLUGIN_RANDSTRUCT=y such as: module/nvpair/nvpair.c:2810:2:error: positional initialization of field in ?struct? declared with 'designated_init' attribute [-Werror=designated-init] nvs_native_nvlist, ^~~~~~~~~~~~~~~~~ Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Mark Wright <[email protected]> Closes openzfs#5390 Closes openzfs#6903
Saw some older bugs mentioning this sort of 'invalid initializer' error compiling
spl
, suggestingKRANDSTACK
was the issue. Well, disabling that didn't work this time, but disabling grsec entirely did. After rebuilding the kernel (no other changes)spl
andzfs
/zfs-kmod
compile and install fine.I am still not sure what the particular grsec feature is which causes this.
The text was updated successfully, but these errors were encountered: