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] [day] [month] [year] [list]
Date:	Thu, 15 Sep 2011 07:44:11 -0700
From:	Andrew Lutomirski <luto@....edu>
To:	Jan Beulich <JBeulich@...e.com>
Cc:	mingo@...e.hu, tglx@...utronix.de, hpa@...or.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86-64: add default case to emulate_vsyscall() to silence
 compiler warning

On Thu, Sep 15, 2011 at 1:38 AM, Jan Beulich <JBeulich@...e.com> wrote:
> ... since the compiler can't possibly know that vsyscall_nr is limited
> to three values, and hence 'ret' must appear possibly uninitialized to
> it.

Hmm.  I actually wrote that thing carefully to avoid needing a default
case.  My copy of gcc (Red Hat 4.6.0-10) doesn't warn.

I guess that older versions do warn.  I have no strong preference on
what to do avoid it.

--Andy

>
> Signed-off-by: Jan Beulich <jbeulich@...ell.com>
> Cc: Andy Lutomirski <luto@....edu>
>
> ---
>  arch/x86/kernel/vsyscall_64.c |    3 +++
>  1 file changed, 3 insertions(+)
>
> --- 3.1-rc6/arch/x86/kernel/vsyscall_64.c
> +++ 3.1-rc6-x86_64-emul-vsyscall/arch/x86/kernel/vsyscall_64.c
> @@ -195,6 +195,9 @@ bool emulate_vsyscall(struct pt_regs *re
>                                 (unsigned __user *)regs->si,
>                                 0);
>                break;
> +       default:
> +               ret = -ENOSYS;
> +               break;
>        }
>
>        if (ret == -EFAULT) {
>
>
>
>
--
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