All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Will Deacon <will@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Mark Brown <broonie@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] kselftest/arm64: Copy whole EXTRA context
Date: Tue,  7 Feb 2023 18:54:20 +0000	[thread overview]
Message-ID: <167579605776.3462867.12167648868281737543.b4-ty@arm.com> (raw)
In-Reply-To: <20230201-arm64-kselftest-full-extra-v1-1-93741f32dd29@kernel.org>

On Thu, 02 Feb 2023 17:30:44 +0000, Mark Brown wrote:
> When copying the EXTRA context our calculation of the amount of data we
> need to copy is incorrect, we only calculate the amount of data needed
> within uc_mcontext.__reserved, not taking account of the fixed portion
> of the context. Add in the offset of the reserved data so that we copy
> everything we should.
> 
> This will only cause test failures in cases where the last context in the
> EXTRA context is smaller than the missing data since we don't currently
> validate any of the register data and all the buffers we copy into are
> statically allocated so default to zero meaning that if we walk beyond the
> end of what we copied we'll encounter what looks like a context with magic
> and length both 0 which is a valid terminator record.
> 
> [...]

Applied to arm64 (for-next/kselftest), thanks!

[1/1] kselftest/arm64: Copy whole EXTRA context
      https://git.kernel.org/arm64/c/6012b8202022

-- 
Catalin


WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: Will Deacon <will@kernel.org>, Shuah Khan <shuah@kernel.org>,
	Mark Brown <broonie@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] kselftest/arm64: Copy whole EXTRA context
Date: Tue,  7 Feb 2023 18:54:20 +0000	[thread overview]
Message-ID: <167579605776.3462867.12167648868281737543.b4-ty@arm.com> (raw)
In-Reply-To: <20230201-arm64-kselftest-full-extra-v1-1-93741f32dd29@kernel.org>

On Thu, 02 Feb 2023 17:30:44 +0000, Mark Brown wrote:
> When copying the EXTRA context our calculation of the amount of data we
> need to copy is incorrect, we only calculate the amount of data needed
> within uc_mcontext.__reserved, not taking account of the fixed portion
> of the context. Add in the offset of the reserved data so that we copy
> everything we should.
> 
> This will only cause test failures in cases where the last context in the
> EXTRA context is smaller than the missing data since we don't currently
> validate any of the register data and all the buffers we copy into are
> statically allocated so default to zero meaning that if we walk beyond the
> end of what we copied we'll encounter what looks like a context with magic
> and length both 0 which is a valid terminator record.
> 
> [...]

Applied to arm64 (for-next/kselftest), thanks!

[1/1] kselftest/arm64: Copy whole EXTRA context
      https://git.kernel.org/arm64/c/6012b8202022

-- 
Catalin


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-02-07 18:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 17:30 [PATCH] kselftest/arm64: Copy whole EXTRA context Mark Brown
2023-02-02 17:30 ` Mark Brown
2023-02-07 18:54 ` Catalin Marinas [this message]
2023-02-07 18:54   ` 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=167579605776.3462867.12167648868281737543.b4-ty@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=broonie@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@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 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.