Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 687798 Details for
Bug 769614
arch/ia64/kernel/ptrace.c ia64_syscall_get_set_arguments off-by-one
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-ia64-fix-ptrace-PTRACE_SYSCALL_INFO_EXIT-sign.patch
0001-ia64-fix-ptrace-PTRACE_SYSCALL_INFO_EXIT-sign.patch (text/plain), 1.96 KB, created by
Sergei Trofimovich (RETIRED)
on 2021-02-21 00:01:49 UTC
(
hide
)
Description:
0001-ia64-fix-ptrace-PTRACE_SYSCALL_INFO_EXIT-sign.patch
Filename:
MIME Type:
Creator:
Sergei Trofimovich (RETIRED)
Created:
2021-02-21 00:01:49 UTC
Size:
1.96 KB
patch
obsolete
>From ed17bcf46d16cc5f24a9d5d3f7f56c028718f3a0 Mon Sep 17 00:00:00 2001 >From: Sergei Trofimovich <slyfox@gentoo.org> >Date: Sat, 20 Feb 2021 23:27:02 +0000 >Subject: [PATCH] ia64: fix ptrace(PTRACE_SYSCALL_INFO_EXIT) sign > >In https://bugs.gentoo.org/769614 Dmitry noticed that >`ptrace(PTRACE_GET_SYSCALL_INFO)` does not return error sign properly. > >The bug is in mismatch between get/set errors: > >static inline long syscall_get_error(struct task_struct *task, > struct pt_regs *regs) >{ > return regs->r10 == -1 ? regs->r8:0; >} > >static inline long syscall_get_return_value(struct task_struct *task, > struct pt_regs *regs) >{ > return regs->r8; >} > >static inline void syscall_set_return_value(struct task_struct *task, > struct pt_regs *regs, > int error, long val) >{ > if (error) { > /* error < 0, but ia64 uses > 0 return value */ > regs->r8 = -error; > regs->r10 = -1; > } else { > regs->r8 = val; > regs->r10 = 0; > } >} > >Tested on v5.10 on rx3600 machine (ia64 9040 CPU). > >Reported-by: Dmitry V. Levin <ldv@altlinux.org> >Bug: https://bugs.gentoo.org/769614 >Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> >--- > arch/ia64/include/asm/syscall.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/arch/ia64/include/asm/syscall.h b/arch/ia64/include/asm/syscall.h >index 6c6f16e409a8..0d23c0049301 100644 >--- a/arch/ia64/include/asm/syscall.h >+++ b/arch/ia64/include/asm/syscall.h >@@ -32,7 +32,7 @@ static inline void syscall_rollback(struct task_struct *task, > static inline long syscall_get_error(struct task_struct *task, > struct pt_regs *regs) > { >- return regs->r10 == -1 ? regs->r8:0; >+ return regs->r10 == -1 ? -regs->r8:0; > } > > static inline long syscall_get_return_value(struct task_struct *task, >-- >2.30.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 769614
:
687792
| 687798