From: Yauheni Kaliuta <ykaliuta@redhat.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: bpf <bpf@vger.kernel.org>
Subject: Re: test_kmod.sh fails with constant blinding
Date: Fri, 01 Jul 2022 14:05:20 +0300 [thread overview]
Message-ID: <xunyr135ytxr.fsf@redhat.com> (raw)
In-Reply-To: <6e86e8c4-4eaf-3e4e-ee72-035a215b48d3@iogearbox.net> (Daniel Borkmann's message of "Thu, 30 Jun 2022 22:57:37 +0200")
Hi, Daniel!
>>>>> On Thu, 30 Jun 2022 22:57:37 +0200, Daniel Borkmann wrote:
> On 6/30/22 3:19 PM, Yauheni Kaliuta wrote:
>> Hi!
>> test_kmod.sh fails for hardened 2 check with
>> test_bpf: #964 Staggered jumps: JMP_JA FAIL to select_runtime
>> err=-524
>> (-ERANGE during constant blinding)
>> Did I miss something?
> That could be expected if one of bpf_adj_delta_to_imm() / bpf_adj_delta_to_off()
> fails given the targets go out of range.
I believe that, but how to fix the test? It should not fail.
> How do the generated insn look?
The instruction when it fails is
(gdb) p/x insn[0]
$8 = {code = 0xb7, dst_reg = 0x0, src_reg = 0x0, off = 0x0, imm = 0x2aaa}
And it's rewritten as
(gdb) p rewritten
$9 = 3
(gdb) p/x insn_buff[0]
$10 = {code = 0xb7, dst_reg = 0xb, src_reg = 0x0, off = 0x0, imm = 0x68ad0283}
(gdb) p/x insn_buff[1]
$11 = {code = 0xa7, dst_reg = 0xb, src_reg = 0x0, off = 0x0, imm = 0x68ad2829}
(gdb) p/x insn_buff[2]
$12 = {code = 0xbf, dst_reg = 0x0, src_reg = 0xb, off = 0x0, imm = 0x0}
IIUC.
--
WBR,
Yauheni Kaliuta
next prev parent reply other threads:[~2022-07-01 11:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 13:19 test_kmod.sh fails with constant blinding Yauheni Kaliuta
2022-06-30 20:57 ` Daniel Borkmann
2022-07-01 11:05 ` Yauheni Kaliuta [this message]
2022-07-04 8:21 ` Yauheni Kaliuta
2022-07-05 8:07 ` Johan Almbladh
2022-07-05 8:31 ` Yauheni Kaliuta
2022-09-01 10:01 ` Yauheni Kaliuta
-- strict thread matches above, loose matches on Subject: below --
2024-01-02 15:11 Bram Schuur
2024-01-02 16:56 ` Yonghong Song
2024-01-02 17:47 ` Eduard Zingerman
2024-01-02 19:41 ` Yonghong Song
2024-01-02 22:39 ` Eduard Zingerman
2024-01-03 0:02 ` Jan-Gerd Tenberge
2024-01-03 7:23 ` Bram Schuur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xunyr135ytxr.fsf@redhat.com \
--to=ykaliuta@redhat.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.