mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/6] arm64/signal: Signal handling cleanups
Date: Tue, 31 Jan 2023 12:51:33 +0000	[thread overview]
Message-ID: <Y9kO1egKjKNqE0zg@arm.com> (raw)
In-Reply-To: <20221212-arm64-signal-cleanup-v2-0-14a8f3e088b7@kernel.org>

Hi Mark,

On Tue, Jan 03, 2023 at 08:25:15PM +0000, Mark Brown wrote:
> This series collects a number of small cleanups to the signal handling
> code which removes redundant validation of size information and avoids
> reading the same data from userspace twice.
> 
> There are some overlaps with both the TPIDR2 signal handling and SME2
> serieses which are also in flight, applying this will require
> adjustments in those serieses and vice versa.
[...]
> Mark Brown (6):
>       arm64/signal: Don't redundantly verify FPSIMD magic
>       arm64/signal: Remove redundant size validation from parse_user_sigframe()
>       arm64/signal: Make interface for restore_fpsimd_context() consistent

I'm fine with the first three patches, they seem correct and make the
frame checking more consistent.

>       arm64/signal: Avoid rereading context frame sizes
>       arm64/signal: Only read new data when parsing the SVE context
>       arm64/signal: Only read new data when parsing the ZA context

I'm not sure these add much to the code readability (and the performance
improvement I guess is negligible). We avoid some copy_from_user() into
the context structures but rely on data read previously or some
get_user() into local variables. Personally I'd make the
restore_fpsimd_context() also do a copy_from_user() for consistency with
the current sve and za frames restoring.

Personal preference, not sure whether Will has the same view.

-- 
Catalin

  parent reply	other threads:[~2023-01-31 12:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 20:25 Mark Brown
2023-01-03 20:25 ` [PATCH v2 1/6] arm64/signal: Don't redundantly verify FPSIMD magic Mark Brown
2023-01-03 20:25 ` [PATCH v2 2/6] arm64/signal: Remove redundant size validation from parse_user_sigframe() Mark Brown
2023-01-03 20:25 ` [PATCH v2 3/6] arm64/signal: Make interface for restore_fpsimd_context() consistent Mark Brown
2023-01-03 20:25 ` [PATCH v2 4/6] arm64/signal: Avoid rereading context frame sizes Mark Brown
2023-01-03 20:25 ` [PATCH v2 5/6] arm64/signal: Only read new data when parsing the SVE context Mark Brown
2023-01-03 20:25 ` [PATCH v2 6/6] arm64/signal: Only read new data when parsing the ZA context Mark Brown
2023-01-31 12:51 ` Catalin Marinas [this message]
2023-01-31 13:14   ` [PATCH v2 0/6] arm64/signal: Signal handling cleanups Mark Brown
2023-01-31 15:38   ` Will Deacon
2023-02-01 11:52     ` Catalin Marinas

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=Y9kO1egKjKNqE0zg@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=broonie@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®