lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVYq_2P=gb_zbSGFkPWASTds6uSPTyyhyNAgp2Qm5+feQ@mail.gmail.com>
Date:   Mon, 10 Dec 2018 09:45:42 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     "Dmitry V. Levin" <ldv@...linux.org>
Cc:     Oleg Nesterov <oleg@...hat.com>, Andy Lutomirski <luto@...nel.org>,
        lineprinter@...linux.org, Eugene Syromiatnikov <esyr@...hat.com>,
        linux-m68k <linux-m68k@...ts.linux-m68k.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 13/25] m68k: add asm/syscall.h

Hi Dmitry,

On Mon, Dec 10, 2018 at 5:30 AM Dmitry V. Levin <ldv@...linux.org> wrote:
> syscall_get_* functions are required to be implemented on all
> architectures in order to extend the generic ptrace API with
> PTRACE_GET_SYSCALL_INFO request.
>
> This introduces asm/syscall.h on m68k implementing all 5 syscall_get_*
> functions as documented in asm-generic/syscall.h: syscall_get_nr,
> syscall_get_arguments, syscall_get_error, syscall_get_return_value,
> and syscall_get_arch.
>
> Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
> Cc: Oleg Nesterov <oleg@...hat.com>
> Cc: Andy Lutomirski <luto@...nel.org>
> Cc: Elvira Khabirova <lineprinter@...linux.org>
> Cc: Eugene Syromyatnikov <esyr@...hat.com>
> Cc: linux-m68k@...ts.linux-m68k.org
> Signed-off-by: Dmitry V. Levin <ldv@...linux.org>
> ---
>
> Notes:
>     v5: added syscall_get_nr, syscall_get_arguments, syscall_get_error,
>         and syscall_get_return_value
>     v1: added syscall_get_arch

> --- /dev/null
> +++ b/arch/m68k/include/asm/syscall.h
> @@ -0,0 +1,39 @@

> +static inline void
> +syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,
> +                     unsigned int i, unsigned int n, unsigned long *args)
> +{
> +       BUG_ON(i + n > 6);

Does this have to crash the kernel?
Perhaps you can return an error code instead?

> +       memcpy(args, &regs->d1 + i, n * sizeof(args[0]));
> +}

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ