Skip to contentSkip to conversation

Fix build errors with do_exit() to make_task_dead() transition

PATCH In review Nathan Chancellor 3 participants 11 messages Dec 27, 2021 – Dec 29, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Fix build errors with do_exit() to make_task_dead() transition

Hi Eric,

I noticed that ARCH=hexagon defconfig was broken after commit 0e25498f8cd4 ("exit: Add and use make_task_dead.") in -next because of a typo ("make_dead_task" vs. "make_task_dead") and I saw the same thing happened for csky and h8300. Feel free to squash these into that change.

Cheers,
Nathan

Nathan Chancellor (3):
hexagon: Fix function name in die()
h8300: Fix build errors from do_exit() to make_task_dead() transition
csky: Fix function name in csky_alignment() and die()

 arch/csky/abiv1/alignment.c | 2 +-
 arch/csky/kernel/traps.c    | 2 +-
 arch/h8300/kernel/traps.c   | 3 ++-
 arch/h8300/mm/fault.c       | 2 +-
 arch/hexagon/kernel/traps.c | 2 +-
 5 files changed, 6 insertions(+), 5 deletions(-)

base-commit: 329b30af470abd854fd301865f1072fa298cc8d6

Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/3 hexagon: Fix function name in die()

When building ARCH=hexagon defconfig:

arch/hexagon/kernel/traps.c:217:2: error: implicit declaration of function 'make_dead_task' [-Werror,-Wimplicit-function-declaration]

        make_dead_task(err);
        ^

The function's name is make_task_dead(), change it so there is no more build error.

Fixes 0e25498f8cd4 ("exit: Add and use make_task_dead.")
---
 arch/hexagon/kernel/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/hexagon/kernel/traps.c +1 -1
index 6dd6cf0ab711..1240f038cce0 100644
@@ -214,7 +214,7 @@ int die(const char *str, struct pt_regs *regs, long err)
 		panic("Fatal exception");
 
 	oops_exit();
-	make_dead_task(err);
+	make_task_dead(err);
 	return 0;
 }
 
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/3 h8300: Fix build errors from do_exit() to make_task_dead() transition

In reply to Nathan Chancellor

When building ARCH=h8300 defconfig:

arch/h8300/kernel/traps.c: In function 'die':
arch/h8300/kernel/traps.c:109:2: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration]

  109 |  make_dead_task(SIGSEGV);
      |  ^~~~~~~~~~~~~~

arch/h8300/mm/fault.c: In function 'do_page_fault':
arch/h8300/mm/fault.c:54:2: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration]

   54 |  make_dead_task(SIGKILL);
      |  ^~~~~~~~~~~~~~

The function's name is make_task_dead(), change it so there is no more build error.

Additionally, include linux/sched/task.h in arch/h8300/kernel/traps.c to avoid the same error because do_exit()'s declaration is in kernel.h but make_task_dead()'s is in task.h, which is not included in traps.c.

Fixes 0e25498f8cd4 ("exit: Add and use make_task_dead.")
---
 arch/h8300/kernel/traps.c | 3 ++-
 arch/h8300/mm/fault.c     | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
arch/h8300/kernel/traps.c +2 -1
index 3d4e0bde37ae..a92c39e03802 100644
@@ -17,6 +17,7 @@
 #include <linux/types.h>
 #include <linux/sched.h>
 #include <linux/sched/debug.h>
+#include <linux/sched/task.h>
 #include <linux/mm_types.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -106,7 +107,7 @@ void die(const char *str, struct pt_regs *fp, unsigned long err)
 	dump(fp);
 
 	spin_unlock_irq(&die_lock);
-	make_dead_task(SIGSEGV);
+	make_task_dead(SIGSEGV);
 }
 
 static int kstack_depth_to_print = 24;
arch/h8300/mm/fault.c +1 -1
index 0223528565dd..b465441f490d 100644
@@ -51,7 +51,7 @@ asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address,
 	printk(" at virtual address %08lx\n", address);
 	if (!user_mode(regs))
 		die("Oops", regs, error_code);
-	make_dead_task(SIGKILL);
+	make_task_dead(SIGKILL);
 
 	return 1;
 }
Signature · 1 line
2.34.1
#3 lore raw

PATCH 3/3 csky: Fix function name in csky_alignment() and die()

In reply to Nathan Chancellor

When building ARCH=csky defconfig:

arch/csky/kernel/traps.c: In function 'die':
arch/csky/kernel/traps.c:112:17: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration]

  112 |                 make_dead_task(SIGSEGV);
      |                 ^~~~~~~~~~~~~~

The function's name is make_task_dead(), change it so there is no more build error.

Fixes 0e25498f8cd4 ("exit: Add and use make_task_dead.")
---
 arch/csky/abiv1/alignment.c | 2 +-
 arch/csky/kernel/traps.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/csky/abiv1/alignment.c +1 -1
index 5e2fb45d605c..2df115d0e210 100644
@@ -294,7 +294,7 @@ void csky_alignment(struct pt_regs *regs)
 				__func__, opcode, rz, rx, imm, addr);
 		show_regs(regs);
 		bust_spinlocks(0);
-		make_dead_task(SIGKILL);
+		make_task_dead(SIGKILL);
 	}
 
 	force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
arch/csky/kernel/traps.c +1 -1
index 88a47035b925..50481d12d236 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)
 	if (panic_on_oops)
 		panic("Fatal exception");
 	if (ret != NOTIFY_STOP)
-		make_dead_task(SIGSEGV);
+		make_task_dead(SIGSEGV);
 }
 
 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
Signature · 1 line
2.34.1
maintainer
#4 lore raw

Re: [PATCH 3/3] csky: Fix function name in csky_alignment() and die()

Hi Nathan,

Three wrong parts in csky! you forgot mm/fault.c.

Eric's patch seems not to cc me? Why arm64 is correct, csky is wrong. -_*!

here is the wrong patch part:

arch/arm64/mm/fault.c +0 -0
index 9ae24e3b72be1..11a28cace2d25 100644
@@ -302,7 +302,7 @@ static void die_kernel_fault(const char *msg,

unsigned long addr,
show_pte(addr);
die("Oops", regs, esr);
bust_spinlocks(0);
- do_exit(SIGKILL);
+ make_task_dead(SIGKILL);
}
#ifdef CONFIG_KASAN_HW_TAGS

arch/csky/abiv1/alignment.c +0 -0
index cb2a0d94a144d..5e2fb45d605cf 100644
@@ -294,7 +294,7 @@ bad_area:

__func__, opcode, rz, rx, imm, addr); show_regs(regs);
bust_spinlocks(0);
- do_exit(SIGKILL);
+ make_dead_task(SIGKILL);
}
force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);

arch/csky/kernel/traps.c +0 -0
index e5fbf8653a215..88a47035b9256 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)

if (panic_on_oops)
panic("Fatal exception");
if (ret != NOTIFY_STOP)
- do_exit(SIGSEGV);
+ make_dead_task(SIGSEGV);
}
void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)

arch/csky/mm/fault.c +0 -0
index 466ad949818a6..7215a46b6b8eb 100644
@@ -67,7 +67,7 @@ static inline void no_context(struct pt_regs *regs,

unsigned long addr)
pr_alert("Unable to handle kernel paging request at virtual " "addr 0x%08lx, pc: 0x%08lx\n", addr, regs->pc); die(regs, "Oops");
- do_exit(SIGKILL);
+ make_task_dead(SIGKILL);
}

Quoted 48 lines · Nathan Chancellor

When building ARCH=csky defconfig:

arch/csky/kernel/traps.c: In function 'die':
arch/csky/kernel/traps.c:112:17: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration]

  112 |                 make_dead_task(SIGSEGV);
      |                 ^~~~~~~~~~~~~~

The function's name is make_task_dead(), change it so there is no more build error.

Fixes 0e25498f8cd4 ("exit: Add and use make_task_dead.")
---
 arch/csky/abiv1/alignment.c | 2 +-
 arch/csky/kernel/traps.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/csky/abiv1/alignment.c +1 -1
index 5e2fb45d605c..2df115d0e210 100644
@@ -294,7 +294,7 @@ void csky_alignment(struct pt_regs *regs)
                                __func__, opcode, rz, rx, imm, addr);
                show_regs(regs);
                bust_spinlocks(0);
-               make_dead_task(SIGKILL);
+               make_task_dead(SIGKILL);
        }
 
        force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
arch/csky/kernel/traps.c +1 -2
index 88a47035b925..50481d12d236 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)
        if (panic_on_oops)
                panic("Fatal exception");
        if (ret != NOTIFY_STOP)
-               make_dead_task(SIGSEGV);
+               make_task_dead(SIGSEGV);
 }
 
 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
--

2.34.1

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/
maintainer Reviewed-by
#5 lore raw

Re: [PATCH 3/3] csky: Fix function name in csky_alignment() and die()

Sorry mm/fault.c is okay.

Quoted 114 lines · Guo Ren

Hi Nathan,

Three wrong parts in csky! you forgot mm/fault.c.

Eric's patch seems not to cc me? Why arm64 is correct, csky is wrong. -_*!

here is the wrong patch part:

arch/arm64/mm/fault.c +1 -1
index 9ae24e3b72be1..11a28cace2d25 100644
@@ -302,7 +302,7 @@ static void die_kernel_fault(const char *msg,
 unsigned long addr,
 show_pte(addr);
 die("Oops", regs, esr);
 bust_spinlocks(0);
- do_exit(SIGKILL);
+ make_task_dead(SIGKILL);
 }
 #ifdef CONFIG_KASAN_HW_TAGS
arch/csky/abiv1/alignment.c +1 -1
index cb2a0d94a144d..5e2fb45d605cf 100644
@@ -294,7 +294,7 @@ bad_area:
 __func__, opcode, rz, rx, imm, addr);
 show_regs(regs);
 bust_spinlocks(0);
- do_exit(SIGKILL);
+ make_dead_task(SIGKILL);
 }
 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
arch/csky/kernel/traps.c +1 -1
index e5fbf8653a215..88a47035b9256 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)
 if (panic_on_oops)
 panic("Fatal exception");
 if (ret != NOTIFY_STOP)
- do_exit(SIGSEGV);
+ make_dead_task(SIGSEGV);
 }
 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
arch/csky/mm/fault.c +0 -0
index 466ad949818a6..7215a46b6b8eb 100644
@@ -67,7 +67,7 @@ static inline void no_context(struct pt_regs *regs,
 unsigned long addr)

pr_alert("Unable to handle kernel paging request at virtual " "addr 0x%08lx, pc: 0x%08lx\n", addr, regs->pc); die(regs, "Oops");
- do_exit(SIGKILL);
+ make_task_dead(SIGKILL);
}

Quoted 46 lines · Nathan Chancellor

When building ARCH=csky defconfig:

arch/csky/kernel/traps.c: In function 'die':
arch/csky/kernel/traps.c:112:17: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration]

  112 |                 make_dead_task(SIGSEGV);
      |                 ^~~~~~~~~~~~~~

The function's name is make_task_dead(), change it so there is no more build error.

Fixes 0e25498f8cd4 ("exit: Add and use make_task_dead.")
---
 arch/csky/abiv1/alignment.c | 2 +-
 arch/csky/kernel/traps.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/csky/abiv1/alignment.c +1 -1
index 5e2fb45d605c..2df115d0e210 100644
@@ -294,7 +294,7 @@ void csky_alignment(struct pt_regs *regs)
                                __func__, opcode, rz, rx, imm, addr);
                show_regs(regs);
                bust_spinlocks(0);
-               make_dead_task(SIGKILL);
+               make_task_dead(SIGKILL);
        }
 
        force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
arch/csky/kernel/traps.c +1 -2
index 88a47035b925..50481d12d236 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)
        if (panic_on_oops)
                panic("Fatal exception");
        if (ret != NOTIFY_STOP)
-               make_dead_task(SIGSEGV);
+               make_task_dead(SIGSEGV);
 }
 
 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
--
Quoted 2 lines

2.34.1

--
Best Regards
Guo Ren

ML: https://lore.kernel.org/linux-csky/

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/
maintainer
#6 lore raw

Re: [PATCH 3/3] csky: Fix function name in csky_alignment() and die()

I would pick up csky's & make pull-request immediately.

Quoted 128 lines · Guo Ren

Sorry mm/fault.c is okay.

Quoted 113 lines · Guo Ren

Hi Nathan,

Three wrong parts in csky! you forgot mm/fault.c.

Eric's patch seems not to cc me? Why arm64 is correct, csky is wrong. -_*!

here is the wrong patch part:

arch/arm64/mm/fault.c +1 -1
index 9ae24e3b72be1..11a28cace2d25 100644
@@ -302,7 +302,7 @@ static void die_kernel_fault(const char *msg,
 unsigned long addr,
 show_pte(addr);
 die("Oops", regs, esr);
 bust_spinlocks(0);
- do_exit(SIGKILL);
+ make_task_dead(SIGKILL);
 }
 #ifdef CONFIG_KASAN_HW_TAGS
arch/csky/abiv1/alignment.c +1 -1
index cb2a0d94a144d..5e2fb45d605cf 100644
@@ -294,7 +294,7 @@ bad_area:
 __func__, opcode, rz, rx, imm, addr);
 show_regs(regs);
 bust_spinlocks(0);
- do_exit(SIGKILL);
+ make_dead_task(SIGKILL);
 }
 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
arch/csky/kernel/traps.c +1 -1
index e5fbf8653a215..88a47035b9256 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)
 if (panic_on_oops)
 panic("Fatal exception");
 if (ret != NOTIFY_STOP)
- do_exit(SIGSEGV);
+ make_dead_task(SIGSEGV);
 }
 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
arch/csky/mm/fault.c +0 -0
index 466ad949818a6..7215a46b6b8eb 100644
@@ -67,7 +67,7 @@ static inline void no_context(struct pt_regs *regs,
 unsigned long addr)

pr_alert("Unable to handle kernel paging request at virtual " "addr 0x%08lx, pc: 0x%08lx\n", addr, regs->pc); die(regs, "Oops");
- do_exit(SIGKILL);
+ make_task_dead(SIGKILL);
}

Quoted 46 lines · Nathan Chancellor

When building ARCH=csky defconfig:

arch/csky/kernel/traps.c: In function 'die':
arch/csky/kernel/traps.c:112:17: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration]

  112 |                 make_dead_task(SIGSEGV);
      |                 ^~~~~~~~~~~~~~

The function's name is make_task_dead(), change it so there is no more build error.

Fixes 0e25498f8cd4 ("exit: Add and use make_task_dead.")
---
 arch/csky/abiv1/alignment.c | 2 +-
 arch/csky/kernel/traps.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/csky/abiv1/alignment.c +1 -1
index 5e2fb45d605c..2df115d0e210 100644
@@ -294,7 +294,7 @@ void csky_alignment(struct pt_regs *regs)
                                __func__, opcode, rz, rx, imm, addr);
                show_regs(regs);
                bust_spinlocks(0);
-               make_dead_task(SIGKILL);
+               make_task_dead(SIGKILL);
        }
 
        force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
arch/csky/kernel/traps.c +1 -2
index 88a47035b925..50481d12d236 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)
        if (panic_on_oops)
                panic("Fatal exception");
        if (ret != NOTIFY_STOP)
-               make_dead_task(SIGSEGV);
+               make_task_dead(SIGSEGV);
 }
 
 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
--
Quoted 2 lines

2.34.1

--
Best Regards
Guo Ren

Quoted 1 line

ML: https://lore.kernel.org/linux-csky/

--
Best Regards
Guo Ren

ML: https://lore.kernel.org/linux-csky/

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/
maintainer
#7 lore raw

Re: [PATCH 3/3] csky: Fix function name in csky_alignment() and die()

Hi Nathan & Eric,

Seems Eric's patch is not in Linus tree, right? Abandoned?

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0e25498f8cd43c1b5aa327f373dd094e9a006da7

Quoted 140 lines · Guo Ren

I would pick up csky's & make pull-request immediately.

Quoted 123 lines · Guo Ren

Sorry mm/fault.c is okay.

Quoted 113 lines · Guo Ren

Hi Nathan,

Three wrong parts in csky! you forgot mm/fault.c.

Eric's patch seems not to cc me? Why arm64 is correct, csky is wrong. -_*!

here is the wrong patch part:

arch/arm64/mm/fault.c +1 -1
index 9ae24e3b72be1..11a28cace2d25 100644
@@ -302,7 +302,7 @@ static void die_kernel_fault(const char *msg,
 unsigned long addr,
 show_pte(addr);
 die("Oops", regs, esr);
 bust_spinlocks(0);
- do_exit(SIGKILL);
+ make_task_dead(SIGKILL);
 }
 #ifdef CONFIG_KASAN_HW_TAGS
arch/csky/abiv1/alignment.c +1 -1
index cb2a0d94a144d..5e2fb45d605cf 100644
@@ -294,7 +294,7 @@ bad_area:
 __func__, opcode, rz, rx, imm, addr);
 show_regs(regs);
 bust_spinlocks(0);
- do_exit(SIGKILL);
+ make_dead_task(SIGKILL);
 }
 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
arch/csky/kernel/traps.c +1 -1
index e5fbf8653a215..88a47035b9256 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)
 if (panic_on_oops)
 panic("Fatal exception");
 if (ret != NOTIFY_STOP)
- do_exit(SIGSEGV);
+ make_dead_task(SIGSEGV);
 }
 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
arch/csky/mm/fault.c +0 -0
index 466ad949818a6..7215a46b6b8eb 100644
@@ -67,7 +67,7 @@ static inline void no_context(struct pt_regs *regs,
 unsigned long addr)

pr_alert("Unable to handle kernel paging request at virtual " "addr 0x%08lx, pc: 0x%08lx\n", addr, regs->pc); die(regs, "Oops");
- do_exit(SIGKILL);
+ make_task_dead(SIGKILL);
}

Quoted 46 lines · Nathan Chancellor

When building ARCH=csky defconfig:

arch/csky/kernel/traps.c: In function 'die':
arch/csky/kernel/traps.c:112:17: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration]

  112 |                 make_dead_task(SIGSEGV);
      |                 ^~~~~~~~~~~~~~

The function's name is make_task_dead(), change it so there is no more build error.

Fixes 0e25498f8cd4 ("exit: Add and use make_task_dead.")
---
 arch/csky/abiv1/alignment.c | 2 +-
 arch/csky/kernel/traps.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/csky/abiv1/alignment.c +1 -1
index 5e2fb45d605c..2df115d0e210 100644
@@ -294,7 +294,7 @@ void csky_alignment(struct pt_regs *regs)
                                __func__, opcode, rz, rx, imm, addr);
                show_regs(regs);
                bust_spinlocks(0);
-               make_dead_task(SIGKILL);
+               make_task_dead(SIGKILL);
        }
 
        force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
arch/csky/kernel/traps.c +1 -2
index 88a47035b925..50481d12d236 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)
        if (panic_on_oops)
                panic("Fatal exception");
        if (ret != NOTIFY_STOP)
-               make_dead_task(SIGSEGV);
+               make_task_dead(SIGSEGV);
 }
 
 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
--
Quoted 2 lines

2.34.1

--
Best Regards
Guo Ren

Quoted 1 line

ML: https://lore.kernel.org/linux-csky/

Quoted 5 lines

--
Best Regards
Guo Ren

ML: https://lore.kernel.org/linux-csky/

--
Best Regards
Guo Ren

ML: https://lore.kernel.org/linux-csky/

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/
#8 lore raw

Re: [PATCH 3/3] csky: Fix function name in csky_alignment() and die()

Hi Guo,

Quoted 5 lines · Guo Ren

Hi Nathan & Eric,

Seems Eric's patch is not in Linus tree, right? Abandoned?

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0e25498f8cd43c1b5aa327f373dd094e9a006da7

Correct, Eric's patch is not in Linus' tree. It is in his signal-for-v5.17 branch, which is currently flowing into -next:

https://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git/log/?h=signal-for-v5.17

Apologies for not spelling this out in the cover letter. Aside from a review/ack/test, there should not be anything else that you need to do.

Cheers,
Nathan

Quoted 149 lines · Guo Ren
Quoted 140 lines

I would pick up csky's & make pull-request immediately.

Quoted 123 lines · Guo Ren

Sorry mm/fault.c is okay.

Quoted 113 lines · Guo Ren

Hi Nathan,

Three wrong parts in csky! you forgot mm/fault.c.

Eric's patch seems not to cc me? Why arm64 is correct, csky is wrong. -_*!

here is the wrong patch part:

arch/arm64/mm/fault.c +1 -1
index 9ae24e3b72be1..11a28cace2d25 100644
@@ -302,7 +302,7 @@ static void die_kernel_fault(const char *msg,
 unsigned long addr,
 show_pte(addr);
 die("Oops", regs, esr);
 bust_spinlocks(0);
- do_exit(SIGKILL);
+ make_task_dead(SIGKILL);
 }
 #ifdef CONFIG_KASAN_HW_TAGS
arch/csky/abiv1/alignment.c +1 -1
index cb2a0d94a144d..5e2fb45d605cf 100644
@@ -294,7 +294,7 @@ bad_area:
 __func__, opcode, rz, rx, imm, addr);
 show_regs(regs);
 bust_spinlocks(0);
- do_exit(SIGKILL);
+ make_dead_task(SIGKILL);
 }
 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
arch/csky/kernel/traps.c +1 -1
index e5fbf8653a215..88a47035b9256 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)
 if (panic_on_oops)
 panic("Fatal exception");
 if (ret != NOTIFY_STOP)
- do_exit(SIGSEGV);
+ make_dead_task(SIGSEGV);
 }
 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
arch/csky/mm/fault.c +0 -0
index 466ad949818a6..7215a46b6b8eb 100644
@@ -67,7 +67,7 @@ static inline void no_context(struct pt_regs *regs,
 unsigned long addr)

pr_alert("Unable to handle kernel paging request at virtual " "addr 0x%08lx, pc: 0x%08lx\n", addr, regs->pc); die(regs, "Oops");
- do_exit(SIGKILL);
+ make_task_dead(SIGKILL);
}

Quoted 46 lines · Nathan Chancellor

When building ARCH=csky defconfig:

arch/csky/kernel/traps.c: In function 'die':
arch/csky/kernel/traps.c:112:17: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration]

  112 |                 make_dead_task(SIGSEGV);
      |                 ^~~~~~~~~~~~~~

The function's name is make_task_dead(), change it so there is no more build error.

Fixes 0e25498f8cd4 ("exit: Add and use make_task_dead.")
---
 arch/csky/abiv1/alignment.c | 2 +-
 arch/csky/kernel/traps.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/csky/abiv1/alignment.c +1 -1
index 5e2fb45d605c..2df115d0e210 100644
@@ -294,7 +294,7 @@ void csky_alignment(struct pt_regs *regs)
                                __func__, opcode, rz, rx, imm, addr);
                show_regs(regs);
                bust_spinlocks(0);
-               make_dead_task(SIGKILL);
+               make_task_dead(SIGKILL);
        }
 
        force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
arch/csky/kernel/traps.c +1 -2
index 88a47035b925..50481d12d236 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)
        if (panic_on_oops)
                panic("Fatal exception");
        if (ret != NOTIFY_STOP)
-               make_dead_task(SIGSEGV);
+               make_task_dead(SIGSEGV);
 }
 
 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
--
Quoted 2 lines

2.34.1

--
Best Regards
Guo Ren

Quoted 1 line

ML: https://lore.kernel.org/linux-csky/

Quoted 5 lines

--
Best Regards
Guo Ren

ML: https://lore.kernel.org/linux-csky/

--
Best Regards
Guo Ren

ML: https://lore.kernel.org/linux-csky/

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/
maintainer
#9 lore raw

Re: [PATCH 3/3] csky: Fix function name in csky_alignment() and die()

Quoted 10 lines · Nathan Chancellor

Hi Guo,

Quoted 5 lines · Guo Ren

Hi Nathan & Eric,

Seems Eric's patch is not in Linus tree, right? Abandoned?

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0e25498f8cd43c1b5aa327f373dd094e9a006da7

Quoted 7 lines

Correct, Eric's patch is not in Linus' tree. It is in his signal-for-v5.17 branch, which is currently flowing into -next:

https://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git/log/?h=signal-for-v5.17

Apologies for not spelling this out in the cover letter. Aside from a review/ack/test, there should not be anything else that you need to do.

Good

Quoted 153 lines

Cheers,
Nathan

Quoted 149 lines · Guo Ren
Quoted 135 lines

I would pick up csky's & make pull-request immediately.

Quoted 123 lines · Guo Ren

Sorry mm/fault.c is okay.

Quoted 113 lines · Guo Ren

Hi Nathan,

Three wrong parts in csky! you forgot mm/fault.c.

Eric's patch seems not to cc me? Why arm64 is correct, csky is wrong. -_*!

here is the wrong patch part:

arch/arm64/mm/fault.c +1 -1
index 9ae24e3b72be1..11a28cace2d25 100644
@@ -302,7 +302,7 @@ static void die_kernel_fault(const char *msg,
 unsigned long addr,
 show_pte(addr);
 die("Oops", regs, esr);
 bust_spinlocks(0);
- do_exit(SIGKILL);
+ make_task_dead(SIGKILL);
 }
 #ifdef CONFIG_KASAN_HW_TAGS
arch/csky/abiv1/alignment.c +1 -1
index cb2a0d94a144d..5e2fb45d605cf 100644
@@ -294,7 +294,7 @@ bad_area:
 __func__, opcode, rz, rx, imm, addr);
 show_regs(regs);
 bust_spinlocks(0);
- do_exit(SIGKILL);
+ make_dead_task(SIGKILL);
 }
 force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
arch/csky/kernel/traps.c +1 -1
index e5fbf8653a215..88a47035b9256 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)
 if (panic_on_oops)
 panic("Fatal exception");
 if (ret != NOTIFY_STOP)
- do_exit(SIGSEGV);
+ make_dead_task(SIGSEGV);
 }
 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
arch/csky/mm/fault.c +0 -0
index 466ad949818a6..7215a46b6b8eb 100644
@@ -67,7 +67,7 @@ static inline void no_context(struct pt_regs *regs,
 unsigned long addr)

pr_alert("Unable to handle kernel paging request at virtual " "addr 0x%08lx, pc: 0x%08lx\n", addr, regs->pc); die(regs, "Oops");
- do_exit(SIGKILL);
+ make_task_dead(SIGKILL);
}

Quoted 46 lines · Nathan Chancellor

When building ARCH=csky defconfig:

arch/csky/kernel/traps.c: In function 'die':
arch/csky/kernel/traps.c:112:17: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration]

  112 |                 make_dead_task(SIGSEGV);
      |                 ^~~~~~~~~~~~~~

The function's name is make_task_dead(), change it so there is no more build error.

Fixes 0e25498f8cd4 ("exit: Add and use make_task_dead.")
---
 arch/csky/abiv1/alignment.c | 2 +-
 arch/csky/kernel/traps.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/csky/abiv1/alignment.c +1 -1
index 5e2fb45d605c..2df115d0e210 100644
@@ -294,7 +294,7 @@ void csky_alignment(struct pt_regs *regs)
                                __func__, opcode, rz, rx, imm, addr);
                show_regs(regs);
                bust_spinlocks(0);
-               make_dead_task(SIGKILL);
+               make_task_dead(SIGKILL);
        }
 
        force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)addr);
arch/csky/kernel/traps.c +1 -2
index 88a47035b925..50481d12d236 100644
@@ -109,7 +109,7 @@ void die(struct pt_regs *regs, const char *str)
        if (panic_on_oops)
                panic("Fatal exception");
        if (ret != NOTIFY_STOP)
-               make_dead_task(SIGSEGV);
+               make_task_dead(SIGSEGV);
 }
 
 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)
--
Quoted 2 lines

2.34.1

--
Best Regards
Guo Ren

Quoted 1 line

ML: https://lore.kernel.org/linux-csky/

Quoted 5 lines

--
Best Regards
Guo Ren

ML: https://lore.kernel.org/linux-csky/

Quoted 5 lines

--
Best Regards
Guo Ren

ML: https://lore.kernel.org/linux-csky/

--
Best Regards
Guo Ren

ML: https://lore.kernel.org/linux-csky/

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/
#10 lore raw

Re: [PATCH 3/3] csky: Fix function name in csky_alignment() and die()

In reply to Guo Ren
Quoted 5 lines · Guo Ren

Hi Nathan,

Three wrong parts in csky! you forgot mm/fault.c.

Eric's patch seems not to cc me? Why arm64 is correct, csky is wrong. -_*!

Human frailty and the unfortunate fact I could not find a compiler for csky, h8300, or hexagon.

Since I could not find a compiler I could not even compile test my changes. Nor I presume could any of the automated bots.

The good thing is that Nathan caught my typo before the change made it to Linus.

I will get these changes applied to my tree shortly.

Eric