Skip to content

v1.5 backport 2020-02-18 #10253

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

Merged
merged 2 commits into from
Feb 21, 2020
Merged

v1.5 backport 2020-02-18 #10253

merged 2 commits into from
Feb 21, 2020

Conversation

jrfastab
Copy link
Contributor

@jrfastab jrfastab commented Feb 20, 2020

v1.5 backports 2020-02-19

PR #10168 had to be written by hand it does not apply cleanly at all.

Once this PR is merged, you can update the PR labels via:

$ for pr in 10173 10168; do contrib/backporting/set-labels.py $pr done 1.5; done

This change is Reviewable

[ upstream commit 9f492a1 ]

The Go's GC is unable to track objects referred by uintptr [1] [2].

A consequence of this is that the GC might collect such objects
when a blocking syscall is executed. This might corrupt memory of
other Go objects e.g. if the reclaimed memory is used for new objects and
the kernel modifies the objects in the context of the blocking syscall.

To prevent from this, we protect each pointer to objects with
runtime.KeepAlive() which marks the objects as alive at least until
runtime.KeepAlive() has been called.

[1]: golang/go#13372 (comment)
[2]: https://utcc.utoronto.ca/~cks/space/blog/programming/GoUintptrVsUnsafePointer

Co-developed-by: André Martins <andre@cilium.io>
Co-developed-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Martynas Pumputis <m@lambda.lt>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
@jrfastab jrfastab requested a review from a team as a code owner February 20, 2020 06:10
@maintainer-s-little-helper maintainer-s-little-helper bot added backport/1.5 kind/backports This PR provides functionality previously merged into master. labels Feb 20, 2020
@jrfastab
Copy link
Contributor Author

test-me-please

@jrfastab jrfastab requested a review from brb February 20, 2020 06:12
@aanm
Copy link
Member

aanm commented Feb 20, 2020

@jrfastab the script ./contrib/backporting/check-stable will generate the PR description if you run it like ./contrib/backporting/check-stable 1.5 pr-description.txt && cat pr-description.txt please copy paste the content of that file into the PR description.

@aanm
Copy link
Member

aanm commented Feb 20, 2020

never-tell-me-the-odds

[ upstream commit 4630078 ]

Fix the space hack which stopped working with make v4.3 (works with
v4.2 though):

    [..]
    " [-DENABLE_HOST_REDIRECT-DENABLE_IPV4-DENABLE_IPV6-DENABLE_NAT46]";
    clang -DENABLE_HOST_REDIRECT-DENABLE_IPV4-DENABLE_IPV6-DENABLE_NAT46
    -I/home/brb/sandbox/gopath/src/github.com/cilium/cilium/bpf/include
    -I/home/brb/sandbox/gopath/src/github.com/cilium/cilium/bpf
    -D__NR_CPUS__=8 -O2 -g -target bpf -emit-llvm -Wall -Werror
    -Wno-address-of-packed-member -Wno-unknown-warning-option -c bpf_lxc.c
    -o bpf_lxc.ll; llc -march=bpf -mcpu=probe -mattr=dwarfris -o /dev/null
    bpf_lxc.ll;  \
    fi
    In file included from <built-in>:323:
    <command line>:1:20: error: ISO C99 requires whitespace after the macro
    name [-Werror,-Wc99-extensions]
    #define ENABLE_IPV4-DHAVE_LPM_MAP_TYPE 1

Signed-off-by: Martynas Pumputis <m@lambda.lt>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
@jrfastab jrfastab force-pushed the pr/v1.5-backport-2020-02-19 branch from 9018f58 to be967a2 Compare February 20, 2020 19:19
@jrfastab
Copy link
Contributor Author

test-me-please

@jrfastab
Copy link
Contributor Author

never-tell-me-the-odds

@joestringer
Copy link
Member

test-upstream-k8s

@aanm aanm merged commit 51c3715 into v1.5 Feb 21, 2020
@aanm aanm deleted the pr/v1.5-backport-2020-02-19 branch February 21, 2020 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/backports This PR provides functionality previously merged into master.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants