* [PATCH 2/3] nios2: Cleanup deprecated function strlen_user
2021-04-20 13:37 [PATCH 1/3] nds32: Cleanup deprecated function strlen_user guoren
@ 2021-04-20 13:37 ` guoren
2021-04-20 14:32 ` Arnd Bergmann
2021-04-20 13:37 ` [PATCH 3/3] riscv: " guoren
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: guoren @ 2021-04-20 13:37 UTC (permalink / raw)
To: guoren, arnd; +Cc: linux-riscv, linux-kernel, linux-csky, linux-arch, Guo Ren
From: Guo Ren <guoren@linux.alibaba.com>
$ grep strlen_user * -r
arch/csky/include/asm/uaccess.h:#define strlen_user(str) strnlen_user(str, 32767)
arch/csky/lib/usercopy.c: * strlen_user: - Get the size of a string in user space.
arch/ia64/lib/strlen.S: // Please note that in the case of strlen() as opposed to strlen_user()
arch/mips/lib/strnlen_user.S: * make strlen_user and strnlen_user access the first few KSEG0
arch/nds32/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user * str);
arch/nios2/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user *str);
arch/riscv/include/asm/uaccess.h:extern long __must_check strlen_user(const char __user *str);
kernel/trace/trace_probe_tmpl.h:static nokprobe_inline int fetch_store_strlen_user(unsigned long addr);
kernel/trace/trace_probe_tmpl.h: ret += fetch_store_strlen_user(val + code->offset);
kernel/trace/trace_uprobe.c:fetch_store_strlen_user(unsigned long addr)
kernel/trace/trace_kprobe.c:fetch_store_strlen_user(unsigned long addr)
kernel/trace/trace_kprobe.c: return fetch_store_strlen_user(addr);
See grep result, nobody uses it.
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Cc: Arnd Bergmann <arnd@arndb.de>
---
arch/nios2/include/asm/uaccess.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/nios2/include/asm/uaccess.h b/arch/nios2/include/asm/uaccess.h
index a741abb..ba9340e 100644
--- a/arch/nios2/include/asm/uaccess.h
+++ b/arch/nios2/include/asm/uaccess.h
@@ -83,7 +83,6 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n);
extern long strncpy_from_user(char *__to, const char __user *__from,
long __len);
-extern __must_check long strlen_user(const char __user *str);
extern __must_check long strnlen_user(const char __user *s, long n);
/* Optimized macros */
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] nios2: Cleanup deprecated function strlen_user
2021-04-20 13:37 ` [PATCH 2/3] nios2: " guoren
@ 2021-04-20 14:32 ` Arnd Bergmann
2021-04-20 14:49 ` Al Viro
2021-04-21 8:28 ` Guo Ren
0 siblings, 2 replies; 8+ messages in thread
From: Arnd Bergmann @ 2021-04-20 14:32 UTC (permalink / raw)
To: Guo Ren
Cc: linux-riscv, Linux Kernel Mailing List, linux-csky, linux-arch, Guo Ren
On Tue, Apr 20, 2021 at 3:37 PM <guoren@kernel.org> wrote:
>
> From: Guo Ren <guoren@linux.alibaba.com>
>
> $ grep strlen_user * -r
> arch/csky/include/asm/uaccess.h:#define strlen_user(str) strnlen_user(str, 32767)
> arch/csky/lib/usercopy.c: * strlen_user: - Get the size of a string in user space.
> arch/ia64/lib/strlen.S: // Please note that in the case of strlen() as opposed to strlen_user()
> arch/mips/lib/strnlen_user.S: * make strlen_user and strnlen_user access the first few KSEG0
> arch/nds32/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user * str);
> arch/nios2/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user *str);
> arch/riscv/include/asm/uaccess.h:extern long __must_check strlen_user(const char __user *str);
> kernel/trace/trace_probe_tmpl.h:static nokprobe_inline int fetch_store_strlen_user(unsigned long addr);
> kernel/trace/trace_probe_tmpl.h: ret += fetch_store_strlen_user(val + code->offset);
> kernel/trace/trace_uprobe.c:fetch_store_strlen_user(unsigned long addr)
> kernel/trace/trace_kprobe.c:fetch_store_strlen_user(unsigned long addr)
> kernel/trace/trace_kprobe.c: return fetch_store_strlen_user(addr);
I would suggest using "grep strlen_user * -rw", to let the whole-word match
filter out the irrelevant ones for the changelog.
> See grep result, nobody uses it.
>
> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
All three patches
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Do you want me to pick them up in the asm-generic tree?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] nios2: Cleanup deprecated function strlen_user
2021-04-20 14:32 ` Arnd Bergmann
@ 2021-04-20 14:49 ` Al Viro
2021-04-21 8:28 ` Guo Ren
1 sibling, 0 replies; 8+ messages in thread
From: Al Viro @ 2021-04-20 14:49 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Guo Ren, linux-riscv, Linux Kernel Mailing List, linux-csky,
linux-arch, Guo Ren
On Tue, Apr 20, 2021 at 04:32:33PM +0200, Arnd Bergmann wrote:
> On Tue, Apr 20, 2021 at 3:37 PM <guoren@kernel.org> wrote:
> >
> > From: Guo Ren <guoren@linux.alibaba.com>
> >
> > $ grep strlen_user * -r
> > arch/csky/include/asm/uaccess.h:#define strlen_user(str) strnlen_user(str, 32767)
> > arch/csky/lib/usercopy.c: * strlen_user: - Get the size of a string in user space.
> > arch/ia64/lib/strlen.S: // Please note that in the case of strlen() as opposed to strlen_user()
> > arch/mips/lib/strnlen_user.S: * make strlen_user and strnlen_user access the first few KSEG0
> > arch/nds32/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user * str);
> > arch/nios2/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user *str);
> > arch/riscv/include/asm/uaccess.h:extern long __must_check strlen_user(const char __user *str);
> > kernel/trace/trace_probe_tmpl.h:static nokprobe_inline int fetch_store_strlen_user(unsigned long addr);
> > kernel/trace/trace_probe_tmpl.h: ret += fetch_store_strlen_user(val + code->offset);
> > kernel/trace/trace_uprobe.c:fetch_store_strlen_user(unsigned long addr)
> > kernel/trace/trace_kprobe.c:fetch_store_strlen_user(unsigned long addr)
> > kernel/trace/trace_kprobe.c: return fetch_store_strlen_user(addr);
>
> I would suggest using "grep strlen_user * -rw", to let the whole-word match
> filter out the irrelevant ones for the changelog.
>
> > See grep result, nobody uses it.
> >
> > Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> > Cc: Arnd Bergmann <arnd@arndb.de>
>
> All three patches
>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
>
> Do you want me to pick them up in the asm-generic tree?
Might make sense to check -next from time to time... See
a0d8d552783b "whack-a-mole: kill strlen_user() (again)" in there
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] nios2: Cleanup deprecated function strlen_user
2021-04-20 14:32 ` Arnd Bergmann
2021-04-20 14:49 ` Al Viro
@ 2021-04-21 8:28 ` Guo Ren
1 sibling, 0 replies; 8+ messages in thread
From: Guo Ren @ 2021-04-21 8:28 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-riscv, Linux Kernel Mailing List, linux-csky, linux-arch, Guo Ren
Thx Arnd,
On Tue, Apr 20, 2021 at 10:32 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Tue, Apr 20, 2021 at 3:37 PM <guoren@kernel.org> wrote:
> >
> > From: Guo Ren <guoren@linux.alibaba.com>
> >
> > $ grep strlen_user * -r
> > arch/csky/include/asm/uaccess.h:#define strlen_user(str) strnlen_user(str, 32767)
> > arch/csky/lib/usercopy.c: * strlen_user: - Get the size of a string in user space.
> > arch/ia64/lib/strlen.S: // Please note that in the case of strlen() as opposed to strlen_user()
> > arch/mips/lib/strnlen_user.S: * make strlen_user and strnlen_user access the first few KSEG0
> > arch/nds32/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user * str);
> > arch/nios2/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user *str);
> > arch/riscv/include/asm/uaccess.h:extern long __must_check strlen_user(const char __user *str);
> > kernel/trace/trace_probe_tmpl.h:static nokprobe_inline int fetch_store_strlen_user(unsigned long addr);
> > kernel/trace/trace_probe_tmpl.h: ret += fetch_store_strlen_user(val + code->offset);
> > kernel/trace/trace_uprobe.c:fetch_store_strlen_user(unsigned long addr)
> > kernel/trace/trace_kprobe.c:fetch_store_strlen_user(unsigned long addr)
> > kernel/trace/trace_kprobe.c: return fetch_store_strlen_user(addr);
>
> I would suggest using "grep strlen_user * -rw", to let the whole-word match
> filter out the irrelevant ones for the changelog.
>
> > See grep result, nobody uses it.
> >
> > Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> > Cc: Arnd Bergmann <arnd@arndb.de>
>
> All three patches
>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
>
> Do you want me to pick them up in the asm-generic tree?
Yes, please take them.
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] riscv: Cleanup deprecated function strlen_user
2021-04-20 13:37 [PATCH 1/3] nds32: Cleanup deprecated function strlen_user guoren
2021-04-20 13:37 ` [PATCH 2/3] nios2: " guoren
@ 2021-04-20 13:37 ` guoren
2021-04-20 14:38 ` [PATCH 1/3] nds32: " Christoph Hellwig
2021-04-20 15:20 ` Greentime Hu
3 siblings, 0 replies; 8+ messages in thread
From: guoren @ 2021-04-20 13:37 UTC (permalink / raw)
To: guoren, arnd; +Cc: linux-riscv, linux-kernel, linux-csky, linux-arch, Guo Ren
From: Guo Ren <guoren@linux.alibaba.com>
$ grep strlen_user * -r
arch/csky/include/asm/uaccess.h:#define strlen_user(str) strnlen_user(str, 32767)
arch/csky/lib/usercopy.c: * strlen_user: - Get the size of a string in user space.
arch/ia64/lib/strlen.S: // Please note that in the case of strlen() as opposed to strlen_user()
arch/mips/lib/strnlen_user.S: * make strlen_user and strnlen_user access the first few KSEG0
arch/nds32/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user * str);
arch/nios2/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user *str);
arch/riscv/include/asm/uaccess.h:extern long __must_check strlen_user(const char __user *str);
kernel/trace/trace_probe_tmpl.h:static nokprobe_inline int fetch_store_strlen_user(unsigned long addr);
kernel/trace/trace_probe_tmpl.h: ret += fetch_store_strlen_user(val + code->offset);
kernel/trace/trace_uprobe.c:fetch_store_strlen_user(unsigned long addr)
kernel/trace/trace_kprobe.c:fetch_store_strlen_user(unsigned long addr)
kernel/trace/trace_kprobe.c: return fetch_store_strlen_user(addr);
See grep result, nobody uses it.
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Cc: Arnd Bergmann <arnd@arndb.de>
---
arch/riscv/include/asm/uaccess.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/riscv/include/asm/uaccess.h b/arch/riscv/include/asm/uaccess.h
index 824b2c9..4297f43 100644
--- a/arch/riscv/include/asm/uaccess.h
+++ b/arch/riscv/include/asm/uaccess.h
@@ -372,7 +372,6 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n)
extern long strncpy_from_user(char *dest, const char __user *src, long count);
-extern long __must_check strlen_user(const char __user *str);
extern long __must_check strnlen_user(const char __user *str, long n);
extern
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] nds32: Cleanup deprecated function strlen_user
2021-04-20 13:37 [PATCH 1/3] nds32: Cleanup deprecated function strlen_user guoren
2021-04-20 13:37 ` [PATCH 2/3] nios2: " guoren
2021-04-20 13:37 ` [PATCH 3/3] riscv: " guoren
@ 2021-04-20 14:38 ` Christoph Hellwig
2021-04-20 15:20 ` Greentime Hu
3 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2021-04-20 14:38 UTC (permalink / raw)
To: guoren; +Cc: arnd, linux-riscv, linux-kernel, linux-csky, linux-arch, Guo Ren
Can you also clean up the reference to strlen_user in the comments
in the ia64 and mips code, please?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] nds32: Cleanup deprecated function strlen_user
2021-04-20 13:37 [PATCH 1/3] nds32: Cleanup deprecated function strlen_user guoren
` (2 preceding siblings ...)
2021-04-20 14:38 ` [PATCH 1/3] nds32: " Christoph Hellwig
@ 2021-04-20 15:20 ` Greentime Hu
3 siblings, 0 replies; 8+ messages in thread
From: Greentime Hu @ 2021-04-20 15:20 UTC (permalink / raw)
To: Guo Ren
Cc: Arnd Bergmann, linux-riscv, Linux Kernel Mailing List,
linux-csky, linux-arch, Guo Ren
<guoren@kernel.org> 於 2021年4月20日 週二 下午9:38寫道:
>
> From: Guo Ren <guoren@linux.alibaba.com>
>
> $ grep strlen_user * -r
> arch/csky/include/asm/uaccess.h:#define strlen_user(str) strnlen_user(str, 32767)
> arch/csky/lib/usercopy.c: * strlen_user: - Get the size of a string in user space.
> arch/ia64/lib/strlen.S: // Please note that in the case of strlen() as opposed to strlen_user()
> arch/mips/lib/strnlen_user.S: * make strlen_user and strnlen_user access the first few KSEG0
> arch/nds32/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user * str);
> arch/nios2/include/asm/uaccess.h:extern __must_check long strlen_user(const char __user *str);
> arch/riscv/include/asm/uaccess.h:extern long __must_check strlen_user(const char __user *str);
> kernel/trace/trace_probe_tmpl.h:static nokprobe_inline int fetch_store_strlen_user(unsigned long addr);
> kernel/trace/trace_probe_tmpl.h: ret += fetch_store_strlen_user(val + code->offset);
> kernel/trace/trace_uprobe.c:fetch_store_strlen_user(unsigned long addr)
> kernel/trace/trace_kprobe.c:fetch_store_strlen_user(unsigned long addr)
> kernel/trace/trace_kprobe.c: return fetch_store_strlen_user(addr);
>
> See grep result, nobody uses it.
>
> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/nds32/include/asm/uaccess.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/nds32/include/asm/uaccess.h b/arch/nds32/include/asm/uaccess.h
> index 010ba5f..d4cbf06 100644
> --- a/arch/nds32/include/asm/uaccess.h
> +++ b/arch/nds32/include/asm/uaccess.h
> @@ -260,7 +260,6 @@ do { \
>
> extern unsigned long __arch_clear_user(void __user * addr, unsigned long n);
> extern long strncpy_from_user(char *dest, const char __user * src, long count);
> -extern __must_check long strlen_user(const char __user * str);
> extern __must_check long strnlen_user(const char __user * str, long n);
> extern unsigned long __arch_copy_from_user(void *to, const void __user * from,
> unsigned long n);
Thank you, Guo.
Acked-by: Greentime Hu <green.hu@gmail.com>
^ permalink raw reply [flat|nested] 8+ messages in thread