From: Ingo Molnar <mingo@kernel.org>
To: Benjamin Berg <benjamin@sipsolutions.net>
Cc: linux-arch@vger.kernel.org, linux-um@lists.infradead.org,
x86@kernel.org, briannorris@chromium.org,
linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com
Subject: Re: [PATCH 3/3] x86: avoid copying dynamic FP state from init_task
Date: Wed, 26 Feb 2025 14:23:03 +0100 [thread overview]
Message-ID: <Z78Vt8yCcPrFQeqo@gmail.com> (raw)
In-Reply-To: <159a83bf5457edbabcc1e88ee5ab98cf58ca6cb0.camel@sipsolutions.net>
* Benjamin Berg <benjamin@sipsolutions.net> wrote:
> > Note that this patch, while it still applies cleanly, crashes/hangs
> > the x86-64 defconfig kernel bootup in the early boot phase in a KVM
> > guest bootup.
>
> Oh, outch. It seems that arch_task_struct_size can actually become
> smaller than sizeof(init_task) if the CPU does not have certain
> features.
>
> See fpu__init_task_struct_size, which does:
>
> int task_size = sizeof(struct task_struct);
> task_size -= sizeof(current->thread.fpu.__fpstate.regs);
> task_size += fpu_kernel_cfg.default_size;
>
> I'll submit a new version of the patch and then also switch to use
> memcpy_and_pad.
Thank you!
Ingo
prev parent reply other threads:[~2025-02-26 13:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 20:27 [PATCH 0/3] KASAN fix for arch_dup_task_struct (x86, um) Benjamin Berg
2024-12-17 20:27 ` [PATCH 1/3] vmlinux.lds.h: remove entry to place init_task onto init_stack Benjamin Berg
2025-02-26 13:15 ` [tip: x86/fpu] vmlinux.lds.h: Remove " tip-bot2 for Benjamin Berg
2024-12-17 20:27 ` [PATCH 2/3] um: avoid copying FP state from init_task Benjamin Berg
2025-01-20 13:36 ` Thomas Weißschuh
2024-12-17 20:27 ` [PATCH 3/3] x86: avoid copying dynamic " Benjamin Berg
2025-02-26 13:08 ` Ingo Molnar
2025-02-26 13:19 ` Benjamin Berg
2025-02-26 13:23 ` Ingo Molnar [this message]
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=Z78Vt8yCcPrFQeqo@gmail.com \
--to=mingo@kernel.org \
--cc=benjamin@sipsolutions.net \
--cc=briannorris@chromium.org \
--cc=kasan-dev@googlegroups.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--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 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.