[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a68d118d-ee03-399c-df02-82848e2197a2@intel.com>
Date: Sun, 25 Sep 2022 09:44:45 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: syzbot <syzbot+cdcd5043ce8155d92ab1@...kaller.appspotmail.com>,
bp@...en8.de, brijesh.singh@....com, dan.j.williams@...el.com,
dave.hansen@...ux.intel.com, hpa@...or.com, jane.chu@...cle.com,
kirill.shutemov@...ux.intel.com, linux-kernel@...r.kernel.org,
luto@...nel.org, mingo@...hat.com, peterz@...radead.org,
seanjc@...gle.com, syzkaller-bugs@...glegroups.com,
tglx@...utronix.de, thomas.lendacky@....com, x86@...nel.org,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
John Fastabend <john.fastabend@...il.com>,
"open list:BPF (Safe dynamic programs and tools)"
<bpf@...r.kernel.org>
Subject: Re: [syzbot] WARNING in __change_page_attr_set_clr
On 9/25/22 04:18, syzbot wrote:
> ------------[ cut here ]------------
> CPA refuse W^X violation: 8000000000000163 -> 0000000000000163 range: 0xffffffffa0401000 - 0xffffffffa0401fff PFN 7d8d5
> WARNING: CPU: 0 PID: 3607 at arch/x86/mm/pat/set_memory.c:600 verify_rwx arch/x86/mm/pat/set_memory.c:600 [inline]
> WARNING: CPU: 0 PID: 3607 at arch/x86/mm/pat/set_memory.c:600 __change_page_attr arch/x86/mm/pat/set_memory.c:1569 [inline]
> WARNING: CPU: 0 PID: 3607 at arch/x86/mm/pat/set_memory.c:600 __change_page_attr_set_clr+0x1f40/0x2020 arch/x86/mm/pat/set_memory.c:1691
> Modules linked in:
Yay, one of these that isn't due to wonky 32-bit kernels!
This one looks to be naughty intentionally:
> void *bpf_jit_alloc_exec_page(void)
> {
...
> /* Keep image as writeable. The alternative is to keep flipping ro/rw
> * every time new program is attached or detached.
> */
> set_memory_x((long)image, 1);
> return image;
> }
For STRICT_KERNEL_RWX kernels, I think we would really rather that this
code *did* flip ro/rw every time a new BPF program is attached or detached.
Powered by blists - more mailing lists