linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: syzbot <syzbot+cdcd5043ce8155d92ab1@syzkaller.appspotmail.com>,
	bp@alien8.de, brijesh.singh@amd.com, dan.j.williams@intel.com,
	dave.hansen@linux.intel.com, hpa@zytor.com, jane.chu@oracle.com,
	kirill.shutemov@linux.intel.com, linux-kernel@vger.kernel.org,
	luto@kernel.org, mingo@redhat.com, peterz@infradead.org,
	seanjc@google.com, syzkaller-bugs@googlegroups.com,
	tglx@linutronix.de, thomas.lendacky@amd.com, x86@kernel.org,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	John Fastabend <john.fastabend@gmail.com>,
	"open list:BPF (Safe dynamic programs and tools)" 
	<bpf@vger.kernel.org>
Subject: Re: [syzbot] WARNING in __change_page_attr_set_clr
Date: Sun, 25 Sep 2022 09:44:45 -0700	[thread overview]
Message-ID: <a68d118d-ee03-399c-df02-82848e2197a2@intel.com> (raw)
In-Reply-To: <00000000000076f3a305e97e9229@google.com>

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.

  reply	other threads:[~2022-09-25 16:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25 11:18 [syzbot] WARNING in __change_page_attr_set_clr syzbot
2022-09-25 16:44 ` Dave Hansen [this message]
2022-09-25 21:55   ` Alexei Starovoitov
2022-09-25 23:16     ` Theodore Ts'o
2022-09-25 23:21     ` Randy Dunlap
2022-09-26  0:10     ` Dave Hansen
2022-09-26  8:24       ` Peter Zijlstra
2022-09-26  8:20     ` Peter Zijlstra
2022-09-26 13:28     ` [Tech-board] " Steven Rostedt
2024-09-06 10:39 ` [syzbot] syzbot

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=a68d118d-ee03-399c-df02-82848e2197a2@intel.com \
    --to=dave.hansen@intel.com \
    --cc=ast@kernel.org \
    --cc=bp@alien8.de \
    --cc=bpf@vger.kernel.org \
    --cc=brijesh.singh@amd.com \
    --cc=dan.j.williams@intel.com \
    --cc=daniel@iogearbox.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jane.chu@oracle.com \
    --cc=john.fastabend@gmail.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=seanjc@google.com \
    --cc=syzbot+cdcd5043ce8155d92ab1@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).