Skip to content

Commit 919a224

Browse files
authored
Disable ASLR to work around QEMU aarch64 issues (#229)
It seems that QEMU and Address Space Layout Randomization do not work well toghether currently. Linux kernel security hardening efforts which make ASLR more random seem to cause SEGFAULTs randomly when building things for aarch64. It seems that the QEMU for aarch64 made assumptions about how the memory layout is laid out, and/or has bugs in the implementation which are exarbated by the new ASLR scheme. In any case, disabling ASLR during build time avvoids hitting the QEMU bugs.
1 parent fec5caf commit 919a224

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ runs:
4646
run: |
4747
env > "${{ github.action_path }}/env_file"
4848
sed -i "/\(HOME\|TERM\|PWD\|HOSTNAME\|PATH\|SHLVL\|USER\|GOROOT\)/d" "${{ github.action_path }}/env_file"
49+
# Work around QEMU aarch64 bugs
50+
# https://github.com/tonistiigi/binfmt/issues/215#issuecomment-2613567455
51+
sudo sysctl kernel.randomize_va_space=0
4952
5053
docker run --rm --privileged \
5154
-v /var/run/docker.sock:/var/run/docker.sock:ro \
@@ -55,6 +58,8 @@ runs:
5558
ghcr.io/home-assistant/amd64-builder:${{ steps.version.outputs.version }} \
5659
${{ inputs.args }}
5760
61+
sudo sysctl kernel.randomize_va_space=2
62+
5863
- shell: bash
5964
id: verify
6065
run: |

0 commit comments

Comments
 (0)