Revision 61bf318eac2c13356f7bd1c6a05421ef504ccc8a authored by Sergei Trofimovich on 13 March 2021, 05:08:27 UTC, committed by Linus Torvalds on 13 March 2021, 19:27:31 UTC
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). Link: https://lkml.kernel.org/r/20210221002554.333076-2-slyfox@gentoo.org Link: https://bugs.gentoo.org/769614 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Reported-by: Dmitry V. Levin <ldv@altlinux.org> Reviewed-by: Dmitry V. Levin <ldv@altlinux.org> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0ceb1ac
File | Mode | Size |
---|---|---|
partitions | ||
Kconfig | -rw-r--r-- | 6.7 KB |
Kconfig.iosched | -rw-r--r-- | 1.3 KB |
Makefile | -rw-r--r-- | 1.7 KB |
badblocks.c | -rw-r--r-- | 14.1 KB |
bfq-cgroup.c | -rw-r--r-- | 38.5 KB |
bfq-iosched.c | -rw-r--r-- | 240.7 KB |
bfq-iosched.h | -rw-r--r-- | 37.0 KB |
bfq-wf2q.c | -rw-r--r-- | 52.4 KB |
bio-integrity.c | -rw-r--r-- | 12.5 KB |
bio.c | -rw-r--r-- | 44.3 KB |
blk-cgroup-rwstat.c | -rw-r--r-- | 3.4 KB |
blk-cgroup-rwstat.h | -rw-r--r-- | 3.9 KB |
blk-cgroup.c | -rw-r--r-- | 50.2 KB |
blk-core.c | -rw-r--r-- | 47.9 KB |
blk-crypto-fallback.c | -rw-r--r-- | 18.5 KB |
blk-crypto-internal.h | -rw-r--r-- | 5.4 KB |
blk-crypto.c | -rw-r--r-- | 12.0 KB |
blk-exec.c | -rw-r--r-- | 2.5 KB |
blk-flush.c | -rw-r--r-- | 15.0 KB |
blk-integrity.c | -rw-r--r-- | 11.8 KB |
blk-ioc.c | -rw-r--r-- | 10.1 KB |
blk-iocost.c | -rw-r--r-- | 96.1 KB |
blk-iolatency.c | -rw-r--r-- | 28.0 KB |
blk-lib.c | -rw-r--r-- | 11.4 KB |
blk-map.c | -rw-r--r-- | 15.7 KB |
blk-merge.c | -rw-r--r-- | 30.3 KB |
blk-mq-cpumap.c | -rw-r--r-- | 2.2 KB |
blk-mq-debugfs-zoned.c | -rw-r--r-- | 435 bytes |
blk-mq-debugfs.c | -rw-r--r-- | 24.4 KB |
blk-mq-debugfs.h | -rw-r--r-- | 2.7 KB |
blk-mq-pci.c | -rw-r--r-- | 1.3 KB |
blk-mq-rdma.c | -rw-r--r-- | 1.3 KB |
blk-mq-sched.c | -rw-r--r-- | 16.8 KB |
blk-mq-sched.h | -rw-r--r-- | 2.4 KB |
blk-mq-sysfs.c | -rw-r--r-- | 8.3 KB |
blk-mq-tag.c | -rw-r--r-- | 17.0 KB |
blk-mq-tag.h | -rw-r--r-- | 2.3 KB |
blk-mq-virtio.c | -rw-r--r-- | 1.3 KB |
blk-mq.c | -rw-r--r-- | 97.6 KB |
blk-mq.h | -rw-r--r-- | 9.4 KB |
blk-pm.c | -rw-r--r-- | 6.8 KB |
blk-pm.h | -rw-r--r-- | 763 bytes |
blk-rq-qos.c | -rw-r--r-- | 7.1 KB |
blk-rq-qos.h | -rw-r--r-- | 5.0 KB |
blk-settings.c | -rw-r--r-- | 29.5 KB |
blk-stat.c | -rw-r--r-- | 4.8 KB |
blk-stat.h | -rw-r--r-- | 4.6 KB |
blk-sysfs.c | -rw-r--r-- | 24.7 KB |
blk-throttle.c | -rw-r--r-- | 67.7 KB |
blk-timeout.c | -rw-r--r-- | 4.1 KB |
blk-wbt.c | -rw-r--r-- | 19.8 KB |
blk-wbt.h | -rw-r--r-- | 2.8 KB |
blk-zoned.c | -rw-r--r-- | 14.7 KB |
blk.h | -rw-r--r-- | 11.2 KB |
bounce.c | -rw-r--r-- | 9.5 KB |
bsg-lib.c | -rw-r--r-- | 9.9 KB |
bsg.c | -rw-r--r-- | 11.1 KB |
cmdline-parser.c | -rw-r--r-- | 4.9 KB |
elevator.c | -rw-r--r-- | 18.5 KB |
genhd.c | -rw-r--r-- | 48.4 KB |
ioctl.c | -rw-r--r-- | 15.7 KB |
ioprio.c | -rw-r--r-- | 5.1 KB |
keyslot-manager.c | -rw-r--r-- | 16.3 KB |
kyber-iosched.c | -rw-r--r-- | 27.8 KB |
mq-deadline.c | -rw-r--r-- | 20.6 KB |
opal_proto.h | -rw-r--r-- | 9.4 KB |
scsi_ioctl.c | -rw-r--r-- | 22.6 KB |
sed-opal.c | -rw-r--r-- | 62.5 KB |
t10-pi.c | -rw-r--r-- | 7.8 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...