From: Al Viro <viro@zeniv.linux.org.uk>
To: Doug Anderson <dianders@chromium.org>
Cc: Christian Brauner <brauner@kernel.org>,
Eric Biederman <ebiederm@xmission.com>, Jan Kara <jack@suse.cz>,
Kees Cook <keescook@chromium.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, Oleg Nesterov <oleg@redhat.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] regset: use vmalloc() for regset_get_alloc()
Date: Fri, 2 Feb 2024 16:55:24 +0000 [thread overview]
Message-ID: <20240202165524.GD2087318@ZenIV> (raw)
In-Reply-To: <20240202164947.GC2087318@ZenIV>
On Fri, Feb 02, 2024 at 04:49:47PM +0000, Al Viro wrote:
> > +folks from `./scripts/get_maintainer.pl -f arch/arm64/kernel/ptrace.c`
> >
> > Trying to follow the macros to see where "n" comes from is a maze of
> > twisty little passages, all alike. Hopefully someone from the ARM
> > world can help tell if the value of 17474 for n here is correct or if
> > something is wonky.
>
> It might be interesting to have it print the return value of __regset_get()
> in those cases; if *that* is huge, we really have a problem. If it ends up
> small enough to fit into few pages, OTOH...
>
> SVE_VQ_MAX is defined as 255; is that really in units of 128 bits? IOW,
> do we really expect to support 32Kbit registers? That would drive the
> size into that range, all right, but it would really suck on context
> switches.
>
> I could be misreading it, though - the macros in there are not easy to
> follow and I've never dealt with SVE before, so take the above with
> a cartload of salt.
Worse - it's SVE_VQ_MAX is 512; sorry about the confusion. OK, that would
certainly explain the size (header + 32 registers, each up to 512 * 16 bytes),
but... ouch.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Al Viro <viro@zeniv.linux.org.uk>
To: Doug Anderson <dianders@chromium.org>
Cc: Christian Brauner <brauner@kernel.org>,
Eric Biederman <ebiederm@xmission.com>, Jan Kara <jack@suse.cz>,
Kees Cook <keescook@chromium.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, Oleg Nesterov <oleg@redhat.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] regset: use vmalloc() for regset_get_alloc()
Date: Fri, 2 Feb 2024 16:55:24 +0000 [thread overview]
Message-ID: <20240202165524.GD2087318@ZenIV> (raw)
In-Reply-To: <20240202164947.GC2087318@ZenIV>
On Fri, Feb 02, 2024 at 04:49:47PM +0000, Al Viro wrote:
> > +folks from `./scripts/get_maintainer.pl -f arch/arm64/kernel/ptrace.c`
> >
> > Trying to follow the macros to see where "n" comes from is a maze of
> > twisty little passages, all alike. Hopefully someone from the ARM
> > world can help tell if the value of 17474 for n here is correct or if
> > something is wonky.
>
> It might be interesting to have it print the return value of __regset_get()
> in those cases; if *that* is huge, we really have a problem. If it ends up
> small enough to fit into few pages, OTOH...
>
> SVE_VQ_MAX is defined as 255; is that really in units of 128 bits? IOW,
> do we really expect to support 32Kbit registers? That would drive the
> size into that range, all right, but it would really suck on context
> switches.
>
> I could be misreading it, though - the macros in there are not easy to
> follow and I've never dealt with SVE before, so take the above with
> a cartload of salt.
Worse - it's SVE_VQ_MAX is 512; sorry about the confusion. OK, that would
certainly explain the size (header + 32 registers, each up to 512 * 16 bytes),
but... ouch.
next prev parent reply other threads:[~2024-02-02 16:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 1:12 [PATCH] regset: use vmalloc() for regset_get_alloc() Douglas Anderson
2024-02-02 1:22 ` Al Viro
2024-02-02 2:54 ` Doug Anderson
2024-02-02 3:04 ` Al Viro
2024-02-02 3:15 ` Doug Anderson
2024-02-02 3:49 ` Al Viro
2024-02-02 4:05 ` Al Viro
2024-02-02 16:24 ` Doug Anderson
2024-02-02 16:24 ` Doug Anderson
2024-02-02 16:49 ` Al Viro
2024-02-02 16:49 ` Al Viro
2024-02-02 16:55 ` Al Viro [this message]
2024-02-02 16:55 ` Al Viro
2024-02-02 18:07 ` Dave Martin
2024-02-02 18:07 ` Dave Martin
2024-02-02 19:13 ` Doug Anderson
2024-02-02 19:13 ` Doug Anderson
2024-02-02 19:42 ` Mark Brown
2024-02-02 19:42 ` Mark Brown
2024-02-02 20:38 ` Doug Anderson
2024-02-02 20:38 ` Doug Anderson
2024-02-02 17:48 ` Mark Brown
2024-02-02 1:24 ` Matthew Wilcox
2024-02-02 2:58 ` Doug Anderson
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=20240202165524.GD2087318@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=brauner@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=dianders@chromium.org \
--cc=ebiederm@xmission.com \
--cc=jack@suse.cz \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=oleg@redhat.com \
--cc=will@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.