From: Song Liu <songliubraving@fb.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: Rick P Edgecombe <rick.p.edgecombe@intel.com>,
Song Liu <song@kernel.org>, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Kernel Team <Kernel-team@fb.com>,
Peter Zijlstra <peterz@infradead.org>,
"x86@kernel.org" <x86@kernel.org>,
"iii@linux.ibm.com" <iii@linux.ibm.com>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"regressions@lists.linux.dev" <regressions@lists.linux.dev>
Subject: Re: BUG: Bad page state in process systemd-udevd (was: [PATCH v9 bpf-next 1/9] x86/Kconfig: select HAVE_ARCH_HUGE_VMALLOC with HAVE_ARCH_HUGE_VMAP)
Date: Mon, 28 Mar 2022 19:24:06 +0000 [thread overview]
Message-ID: <44B009D1-2BF8-4C69-9F09-B0F553A48B78@fb.com> (raw)
In-Reply-To: <4a49a98a-d958-8e48-10eb-24bb220e24ed@molgen.mpg.de>
> On Mar 27, 2022, at 11:51 PM, Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>
> Dear Song,
>
>
> Am 28.03.22 um 08:37 schrieb Song Liu:
>> Thanks Paul for highlighting the issue.
>
> Thank you for getting back to me so quickly.
>
>> + Rick, who highlighted some potential issues with this. (also attached
>> the stack trace).
>
> I already had added him, but forgot to document it in the message. Sorry for that.
>
>>> On Mar 27, 2022, at 3:36 AM, Paul Menzel <pmenzel@molgen.mpg.de> wrote:
>
>>> Am 26.03.22 um 19:46 schrieb Paul Menzel:
>>>> #regzbot introduced: fac54e2bfb5be2b0bbf115fe80d45f59fd773048
>>>> #regzbot title: BUG: Bad page state in process systemd-udevd
>>>
>>>> Am 04.02.22 um 19:57 schrieb Song Liu:
>>>>> From: Song Liu <songliubraving@fb.com>
>>>>>
>>>>> This enables module_alloc() to allocate huge page for 2MB+ requests.
>>>>> To check the difference of this change, we need enable config
>>>>> CONFIG_PTDUMP_DEBUGFS, and call module_alloc(2MB). Before the change,
>>>>> /sys/kernel/debug/page_tables/kernel shows pte for this map. With the
>>>>> change, /sys/kernel/debug/page_tables/ show pmd for thie map.
>>>>>
>>>>> Signed-off-by: Song Liu <songliubraving@fb.com>
>>>>> ---
>>>>> arch/x86/Kconfig | 1 +
>>>>> 1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>>>>> index 6fddb63271d9..e0e0d00cf103 100644
>>>>> --- a/arch/x86/Kconfig
>>>>> +++ b/arch/x86/Kconfig
>>>>> @@ -159,6 +159,7 @@ config X86
>>>>> select HAVE_ALIGNED_STRUCT_PAGE if SLUB
>>>>> select HAVE_ARCH_AUDITSYSCALL
>>>>> select HAVE_ARCH_HUGE_VMAP if X86_64 || X86_PAE
>>>>> + select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP
>>>>> select HAVE_ARCH_JUMP_LABEL
>>>>> select HAVE_ARCH_JUMP_LABEL_RELATIVE
>>>>> select HAVE_ARCH_KASAN if X86_64
>>>> Testing Linus’ current master branch, Linux logs critical messages like below:
>>>> BUG: Bad page state in process systemd-udevd pfn:102e03
>>>> I bisected to your commit fac54e2bfb5 (x86/Kconfig: select
>>>> HAVE_ARCH_HUGE_VMALLOC with HAVE_ARCH_HUGE_VMAP).
>>> Sorry, I forget to mention, that this is a 32-bit (i686) userspace,
>>> but a 64-bit Linux kernel, so it might be the same issue as
>>> mentioned in commit eed1fcee556f (x86: Disable
>>> HAVE_ARCH_HUGE_VMALLOC on 32-bit x86), but didn’t fix the issue for
>>> 64-bit Linux kernel and 32-bit userspace.
>> I will look more into this tomorrow. To clarify, what is the 32-bit
>> user space that triggers this? Is it systemd-udevd? Is the systemd
>> also i686?
>
> Yes, everything – also systemd – is i686. You can build a 32-bit VM image with grml-debootstrap [1]:
>
> sudo DEBOOTSTRAP=mmdebstrap ~/src/grml-debootstrap/grml-debootstrap --vm --vmfile --vmsize 3G --target /dev/shm/debian-32.img -r sid --arch i686 --filesystem ext4
>
> Then run that with QEMU, but pass the 64-bit Linux kernel to QEMU directly with the switches `-kernel` and `-append`, or install the amd64 Linux kernel into the Debian VM image or the package created with `make bindeb-pkg` with `dpkg -i …`.
Thanks for these information!
I tried the following, but couldn't reproduce the issue.
sudo ./grml-debootstrap --vm --vmfile --vmsize 3G --target ../debian-32.img -r sid --arch i386 --filesystem ext4
Note: s/i686/i386/. Also I run this on Fedora, so I didn't specify DEBOOTSTRAP.
Then I run it with
qemu-system-x86_64 \
-boot d ./debian-32.img -m 1024 -smp 4 \
-kernel ./bzImage \
-nographic -append 'root=/dev/sda1 ro console=ttyS0,115200'
The VM boots fine. The config being used is x86_64_defconfig +
CONFIG_DRM_FBDEV_EMULATION.
I wonder whether this is caused by different config or different image.
Could you please share your config?
Thanks,
Song
PS: I couldn't figure out the root password of the image, --password
option of grml-debootstrap doesn't seem to work.
next prev parent reply other threads:[~2022-03-28 19:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-04 18:57 [PATCH v9 bpf-next 0/9] bpf_prog_pack allocator Song Liu
2022-02-04 18:57 ` [PATCH v9 bpf-next 1/9] x86/Kconfig: select HAVE_ARCH_HUGE_VMALLOC with HAVE_ARCH_HUGE_VMAP Song Liu
2022-03-26 0:06 ` Edgecombe, Rick P
2022-03-28 23:27 ` Song Liu
2022-03-29 0:18 ` Edgecombe, Rick P
2022-03-29 8:23 ` Song Liu
2022-03-29 18:39 ` Edgecombe, Rick P
2022-03-29 19:13 ` Song Liu
2022-03-29 21:36 ` Edgecombe, Rick P
2022-03-29 22:12 ` Song Liu
2022-03-26 18:46 ` BUG: Bad page state in process systemd-udevd (was: [PATCH v9 bpf-next 1/9] x86/Kconfig: select HAVE_ARCH_HUGE_VMALLOC with HAVE_ARCH_HUGE_VMAP) Paul Menzel
2022-03-27 10:36 ` Paul Menzel
2022-03-28 6:37 ` Song Liu
2022-03-28 6:51 ` Paul Menzel
2022-03-28 19:24 ` Song Liu [this message]
2022-03-28 20:14 ` Paul Menzel
2022-03-28 21:57 ` Song Liu
2022-03-28 19:21 ` Edgecombe, Rick P
2022-02-04 18:57 ` [PATCH v9 bpf-next 2/9] bpf: use bytes instead of pages for bpf_jit_[charge|uncharge]_modmem Song Liu
2022-02-04 18:57 ` [PATCH v9 bpf-next 3/9] bpf: use size instead of pages in bpf_binary_header Song Liu
2022-02-04 18:57 ` [PATCH v9 bpf-next 4/9] bpf: use prog->jited_len in bpf_prog_ksym_set_addr() Song Liu
2022-02-04 18:57 ` [PATCH v9 bpf-next 5/9] x86/alternative: introduce text_poke_copy Song Liu
2022-02-04 18:57 ` [PATCH v9 bpf-next 6/9] bpf: introduce bpf_arch_text_copy Song Liu
2022-02-04 18:57 ` [PATCH v9 bpf-next 7/9] bpf: introduce bpf_prog_pack allocator Song Liu
2022-02-04 18:57 ` [PATCH v9 bpf-next 8/9] bpf: introduce bpf_jit_binary_pack_[alloc|finalize|free] Song Liu
2022-02-04 18:57 ` [PATCH v9 bpf-next 9/9] bpf, x86_64: use bpf_jit_binary_pack_alloc Song Liu
2022-02-08 2:24 ` Alexei Starovoitov
2022-07-03 3:02 ` Andres Freund
2022-07-03 3:03 ` Alexei Starovoitov
2022-07-03 3:14 ` Andres Freund
2022-02-08 2:30 ` [PATCH v9 bpf-next 0/9] bpf_prog_pack allocator patchwork-bot+netdevbpf
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=44B009D1-2BF8-4C69-9F09-B0F553A48B78@fb.com \
--to=songliubraving@fb.com \
--cc=Kernel-team@fb.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bp@alien8.de \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dave.hansen@linux.intel.com \
--cc=iii@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=pmenzel@molgen.mpg.de \
--cc=regressions@lists.linux.dev \
--cc=rick.p.edgecombe@intel.com \
--cc=song@kernel.org \
--cc=tglx@linutronix.de \
--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).