On Tue, May 19, 2020 at 9:14 AM Christoph Hellwig wrote:
>
> I don't think we need it as the case of
>
> case 'a':
> case 'b':
> do_stuff();
> break;
>
> has always been fine even with the fallthough warnings. And the
> rest of the stuff gets remove
On Tue, May 19, 2020 at 09:07:55AM -0700, Linus Torvalds wrote:
> On Tue, May 19, 2020 at 6:45 AM Christoph Hellwig wrote:
> >
> > + switch (fmt_ptype) {
> > + case 's':
> > +#ifdef CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
> > + strncpy_from_unsafe(buf, unsafe_ptr, b
On Tue, May 19, 2020 at 6:45 AM Christoph Hellwig wrote:
>
> + switch (fmt_ptype) {
> + case 's':
> +#ifdef CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
> + strncpy_from_unsafe(buf, unsafe_ptr, bufsz);
> + break;
> +#endif
> + case 'k':
> +
Split out a helper to do the fault free access to the string pointer
to get it out of a crazy indentation level.
Signed-off-by: Christoph Hellwig
---
kernel/trace/bpf_trace.c | 42 +++-
1 file changed, 24 insertions(+), 18 deletions(-)
diff --git a/kernel/tra