Skip to content
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

Add READ access of mmap() in docker env #10761

Closed
wants to merge 1 commit into from

Conversation

yhwang
Copy link
Contributor

@yhwang yhwang commented Feb 11, 2020

In docker multi-architecture environment, calling the
mmap() with only PROT_WRITE would fail the following
write(). Adding PROT_READ access would solve the issue.
The logic there only needs WRITE access, however, it
should be fine to assign READ access too. Actually,
PROT_WRITE is offen implementated as PROT_READ|PROT_WRITE.

fix: #7135.

Signed-off-by: Yihong Wang yh.wang@ibm.com

In docker multi-architecture environment, calling the
mmap() with only PROT_WRITE would fail the following
write(). Adding PROT_READ access would solve the issue.
The logic there only needs WRITE access, however, it
should be fine to assign READ access too. Actually,
PROT_WRITE is offen implementated as PROT_READ|PROT_WRITE.

fix: bazelbuild#7135.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
@yhwang
Copy link
Contributor Author

yhwang commented Feb 12, 2020

I verified this fix on:

Linux pi64 4.19.76-linuxkit #1 SMP Thu Oct 17 19:31:58 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux

and

Linux pi4 4.19.76-linuxkit #1 SMP Thu Oct 17 19:31:58 UTC 2019 armv7l armv7l armv7l GNU/Linux

and used the Docker version 19.03.5, build 633a0ea on MacOS

@aiuto aiuto requested a review from philwo February 12, 2020 19:17
@aiuto aiuto added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Feb 12, 2020
@aiuto
Copy link
Contributor

aiuto commented Feb 12, 2020

@philwo I'm not really sure if this is your area right now. It seems to be correct to me, but I'm not sure who really owns ijar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bazel cannot build itself in arm64 docker container
3 participants