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]
Date:	Mon, 27 Jul 2015 11:48:25 -0700
From:	Kees Cook <keescook@...omium.org>
To:	Michael Ellerman <mpe@...erman.id.au>
Cc:	"linuxppc-dev@...abs.org" <linuxppc-dev@...abs.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Andy Lutomirski <luto@...capital.net>,
	Will Drewry <wad@...omium.org>, strosake@...ux.vnet.ibm.com,
	bogdan.purcareata@...escale.com
Subject: Re: [PATCH 03/11] powerpc: Drop unused syscall_get_error()

On Thu, Jul 23, 2015 at 3:21 AM, Michael Ellerman <mpe@...erman.id.au> wrote:
> syscall_get_error() is unused, and never has been.
>
> It's also probably wrong, as it negates r3 before returning it, but that
> depends on what the caller is expecting.
>
> It also doesn't deal with compat, and doesn't deal with TIF_NOERROR.
>
> Although we could fix those, until it has a caller and it's clear what
> semantics the caller wants it's just untested code. So drop it.
>
> Signed-off-by: Michael Ellerman <mpe@...erman.id.au>

Reviewed-by: Kees Cook <keescook@...omium.org>

-Kees

> ---
>  arch/powerpc/include/asm/syscall.h | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/syscall.h
> index ff21b7a2f0cc..c6239dabcfb1 100644
> --- a/arch/powerpc/include/asm/syscall.h
> +++ b/arch/powerpc/include/asm/syscall.h
> @@ -34,12 +34,6 @@ static inline void syscall_rollback(struct task_struct *task,
>         regs->gpr[3] = regs->orig_gpr3;
>  }
>
> -static inline long syscall_get_error(struct task_struct *task,
> -                                    struct pt_regs *regs)
> -{
> -       return (regs->ccr & 0x10000000) ? -regs->gpr[3] : 0;
> -}
> -
>  static inline long syscall_get_return_value(struct task_struct *task,
>                                             struct pt_regs *regs)
>  {
> --
> 2.1.0
>



-- 
Kees Cook
Chrome OS Security
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ