On 5/27/20 9:39 PM, Christoph Hellwig wrote:
On Wed, May 27, 2020 at 07:26:30PM -0700, Yonghong Song wrote:
--- a/kernel/trace/bpf_trace.c~xxx
+++ a/kernel/trace/bpf_trace.c
@@ -588,15 +588,22 @@ BPF_CALL_5(bpf_seq_printf, struct seq_fi
}
if (fmt[i] == 's') {
+
On Wed, May 27, 2020 at 07:26:30PM -0700, Yonghong Song wrote:
>> --- a/kernel/trace/bpf_trace.c~xxx
>> +++ a/kernel/trace/bpf_trace.c
>> @@ -588,15 +588,22 @@ BPF_CALL_5(bpf_seq_printf, struct seq_fi
>> }
>> if (fmt[i] == 's') {
>> +void *unsafe_ptr;
>
On 5/27/20 7:04 PM, Andrew Morton wrote:
On Thu, 21 May 2020 17:22:50 +0200 Christoph Hellwig wrote:
User the proper helper for kernel or userspace addresses based on
TASK_SIZE instead of the dangerous strncpy_from_unsafe function.
...
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf
On Thu, 21 May 2020 17:22:50 +0200 Christoph Hellwig wrote:
> User the proper helper for kernel or userspace addresses based on
> TASK_SIZE instead of the dangerous strncpy_from_unsafe function.
>
> ...
>
> --- a/kernel/trace/bpf_trace.c
> +++ b/kernel/trace/bpf_trace.c
> @@ -331,8 +331,11 @@ st
On Thu, May 21, 2020 at 8:24 AM Christoph Hellwig wrote:
>
> User the proper helper for kernel or userspace addresses based on
> TASK_SIZE instead of the dangerous strncpy_from_unsafe function.
>
> Signed-off-by: Christoph Hellwig
> ---
Acked-by: Andrii Nakryiko
> kernel/trace/bpf_trace.c | 7
User the proper helper for kernel or userspace addresses based on
TASK_SIZE instead of the dangerous strncpy_from_unsafe function.
Signed-off-by: Christoph Hellwig
---
kernel/trace/bpf_trace.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/bpf_trace.c b/k