Skip to content

binder: Export more constants via the defs module. - #314

Merged
ojeda merged 1 commit into
Rust-for-Linux:rustfrom
wedsonaf:defs
May 28, 2021
Merged

binder: Export more constants via the defs module.#314
ojeda merged 1 commit into
Rust-for-Linux:rustfrom
wedsonaf:defs

Conversation

@wedsonaf

Copy link
Copy Markdown

This to reduce the usage of the bindings module.

Introducing TF_ACCEPT_FDS, FLAT_BINDER_FLAG_ACCEPTS_FDS, and
BINDER_TYPE_FD. They will be used in a subsequent commit that adds
support for transferring FDs.

No behaviour change is intended with this PR.

Signed-off-by: Wedson Almeida Filho wedsonaf@google.com

This to reduce the usage of the `bindings` module.
Introducing TF_ACCEPT_FDS, FLAT_BINDER_FLAG_ACCEPTS_FDS, and
BINDER_TYPE_FD. They will be used in a subsequent commit that adds
support for transferring FDs.
Signed-off-by: Wedson Almeida Filho <wedsonaf@google.com>
@ksquirrel

Copy link
Copy Markdown
Member

Review of 71763f8dc392:

@ojeda

Copy link
Copy Markdown
Member

LGTM

@ojeda
ojeda merged commit 82057dd into Rust-for-Linux:rustMay 28, 2021
@wedsonaf
wedsonaf deleted the defs branch May 28, 2021 19:24
metaspace pushed a commit to metaspace/linux that referenced this pull request Apr 16, 2024
In case when is64 == 1 in emit(A64_REV32(is64, dst, dst), ctx) the
generated insn reverses byte order for both high and low 32-bit words,
resuling in an incorrect swap as indicated by the jit test:
[ 9757.262607] test_bpf: Rust-for-Linux#312 BSWAP 16: 0x0123456789abcdef -> 0xefcd jited:1 8 PASS
[ 9757.264435] test_bpf: Rust-for-Linux#313 BSWAP 32: 0x0123456789abcdef -> 0xefcdab89 jited:1 ret 1460850314 != -271733879 (0x5712ce8a != 0xefcdab89)FAIL (1 times)
[ 9757.266260] test_bpf: Rust-for-Linux#314 BSWAP 64: 0x0123456789abcdef -> 0x67452301 jited:1 8 PASS
[ 9757.268000] test_bpf: Rust-for-Linux#315 BSWAP 64: 0x0123456789abcdef >> 32 -> 0xefcdab89 jited:1 8 PASS
[ 9757.269686] test_bpf: Rust-for-Linux#316 BSWAP 16: 0xfedcba9876543210 -> 0x1032 jited:1 8 PASS
[ 9757.271380] test_bpf: Rust-for-Linux#317 BSWAP 32: 0xfedcba9876543210 -> 0x10325476 jited:1 ret -1460850316 != 271733878 (0xa8ed3174 != 0x10325476)FAIL (1 times)
[ 9757.273022] test_bpf: Rust-for-Linux#318 BSWAP 64: 0xfedcba9876543210 -> 0x98badcfe jited:1 7 PASS
[ 9757.274721] test_bpf: Rust-for-Linux#319 BSWAP 64: 0xfedcba9876543210 >> 32 -> 0x10325476 jited:1 9 PASS
Fix this by forcing 32bit variant of rev32.
Fixes: 1104247 ("bpf, arm64: Support unconditional bswap")
Signed-off-by: Artem Savkov <asavkov@redhat.com>
Tested-by: Puranjay Mohan <puranjay12@gmail.com>
Acked-by: Puranjay Mohan <puranjay12@gmail.com>
Acked-by: Xu Kuohai <xukuohai@huawei.com>
Message-ID: <20240321081809.158803-1-asavkov@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@wedsonaf@ksquirrel@ojeda