Movatterモバイル変換
[0]ホーム
This is the mail archive of thelibc-alpha@sourceware.orgmailing list for theglibc project.
[RFC PATCH 27/27] arm64/sve: signal: Include SVE when computing AT_MINSIGSTKSZ
- From: Dave Martin <Dave dot Martin at arm dot com>
- To: linux-arm-kernel at lists dot infradead dot org
- Cc: Catalin Marinas <catalin dot marinas at arm dot com>,Will Deacon <will dot deacon at arm dot com>,Ard Biesheuvel <ard dot biesheuvel at linaro dot org>,Szabolcs Nagy <szabolcs dot nagy at arm dot com>,Richard Sandiford <richard dot sandiford at arm dot com>,kvmarm at lists dot cs dot columbia dot edu,libc-alpha at sourceware dot org,linux-arch at vger dot kernel dot org,Michael Ellerman <mpe at ellerman dot id dot au>
- Date: Wed, 9 Aug 2017 13:05:33 +0100
- Subject: [RFC PATCH 27/27] arm64/sve: signal: Include SVE when computing AT_MINSIGSTKSZ
- Authentication-results: sourceware.org; auth=none
- References: <1502280338-23002-1-git-send-email-Dave.Martin@arm.com>
The SVE context block in the signal frame needs to be consideredtoo when computing the maximum possible signal frame size.Because the size of this block depends on the vector length, thispatch computes the size based not on the thread's current vectorlength but instead on the maximum possible vector length: thisdetermines the maximum size of SVE context block that can beobserved in any signal frame for the lifetime of the process.Signed-off-by: Dave Martin <Dave.Martin@arm.com>--- arch/arm64/kernel/signal.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.cindex 221bcf2..cb01353 100644--- a/arch/arm64/kernel/signal.c+++ b/arch/arm64/kernel/signal.c@@ -586,11 +586,18 @@ static int setup_sigframe_layout(struct rt_sigframe_user_layout *user, } if (system_supports_sve()) {-unsigned int vq = 0;+unsigned int vq; -if (test_thread_flag(TIF_SVE)) {-BUG_ON(!sve_vl_valid(current->thread.sve_vl));-vq = sve_vq_from_vl(current->thread.sve_vl);+if (!add_all && !test_thread_flag(TIF_SVE))+vq = 0;+else {+unsigned int vl = sve_max_vl;++if (!add_all)+vl = current->thread.sve_vl;++BUG_ON(!sve_vl_valid(vl));+vq = sve_vq_from_vl(vl); } err = sigframe_alloc(user, &user->sve_offset,-- 2.1.4
[8]ページ先頭