]> git.dujemihanovic.xyz Git - linux.git/commitdiff
s390: rename PIF_SYSCALL_RESTART to PIF_EXECVE_PGSTE_RESTART
authorSven Schnelle <svens@linux.ibm.com>
Wed, 30 Jun 2021 12:02:41 +0000 (14:02 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 8 Jul 2021 20:12:17 +0000 (22:12 +0200)
PIF_SYSCALL_RESTART is now only used to restart execve when loading
PGSTE binaries. Rename the flag to reflect that, and avoid people
thinking that this bit has anything to do with generic syscall
restarting.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/elf.h
arch/s390/include/asm/ptrace.h
arch/s390/kernel/syscall.c

index 1376bd2b03926b079cff39cbbe32406b2776fa2c..bd00c94620d3cd4b5fbead036fbbe4fb6982d221 100644 (file)
@@ -172,7 +172,7 @@ struct arch_elf_state {
            !current->mm->context.alloc_pgste) {                \
                set_thread_flag(TIF_PGSTE);                     \
                set_pt_regs_flag(task_pt_regs(current),         \
-                                PIF_SYSCALL_RESTART);          \
+                                PIF_EXECVE_PGSTE_RESTART);     \
                _state->rc = -EAGAIN;                           \
        }                                                       \
        _state->rc;                                             \
index 808da21235ab7ed5010d0d8eca5b5e51f2cc43e3..61b22aa990e75dd70dc04370676489c138e2c4b6 100644 (file)
 #include <uapi/asm/ptrace.h>
 #include <asm/tpi.h>
 
-#define PIF_SYSCALL            0       /* inside a system call */
-#define PIF_SYSCALL_RESTART    1       /* restart the current system call */
-#define PIF_SYSCALL_RET_SET    2       /* return value was set via ptrace */
-#define PIF_GUEST_FAULT                3       /* indicates program check in sie64a */
-
-#define _PIF_SYSCALL           BIT(PIF_SYSCALL)
-#define _PIF_SYSCALL_RESTART   BIT(PIF_SYSCALL_RESTART)
-#define _PIF_SYSCALL_RET_SET   BIT(PIF_SYSCALL_RET_SET)
-#define _PIF_GUEST_FAULT       BIT(PIF_GUEST_FAULT)
+#define PIF_SYSCALL                    0       /* inside a system call */
+#define PIF_EXECVE_PGSTE_RESTART       1       /* restart execve for PGSTE binaries */
+#define PIF_SYSCALL_RET_SET            2       /* return value was set via ptrace */
+#define PIF_GUEST_FAULT                        3       /* indicates program check in sie64a */
+
+#define _PIF_SYSCALL                   BIT(PIF_SYSCALL)
+#define _PIF_EXECVE_PGSTE_RESTART      BIT(PIF_EXECVE_PGSTE_RESTART)
+#define _PIF_SYSCALL_RET_SET           BIT(PIF_SYSCALL_RET_SET)
+#define _PIF_GUEST_FAULT               BIT(PIF_GUEST_FAULT)
 
 #ifndef __ASSEMBLY__
 
index 0322f00f84ac4e023d24ae7b3640781cc3969c00..8fe2d23b64f439fd92400b8cd04ecfac68f95bf5 100644 (file)
@@ -134,6 +134,7 @@ static void do_syscall(struct pt_regs *regs)
         * work, the ptrace code sets PIF_SYSCALL_RET_SET, which is checked here
         * and if set, the syscall will be skipped.
         */
+
        if (unlikely(test_and_clear_pt_regs_flag(regs, PIF_SYSCALL_RET_SET)))
                goto out;
        regs->gprs[2] = -ENOSYS;
@@ -141,7 +142,7 @@ static void do_syscall(struct pt_regs *regs)
                goto out;
        do {
                regs->gprs[2] = current->thread.sys_call_table[nr](regs);
-       } while (test_and_clear_pt_regs_flag(regs, PIF_SYSCALL_RESTART));
+       } while (test_and_clear_pt_regs_flag(regs, PIF_EXECVE_PGSTE_RESTART));
 out:
        syscall_exit_to_user_mode_work(regs);
 }