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:   Sat, 26 Jan 2019 02:15:56 -0800
From:   "tip-bot for Gustavo A. R. Silva" <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     x86@...nel.org, bp@...e.de, tglx@...utronix.de,
        gustavo@...eddedor.com, linux-kernel@...r.kernel.org,
        mingo@...nel.org, hpa@...or.com, mingo@...hat.com,
        keescook@...omium.org
Subject: [tip:x86/cleanups] x86/insn-eval: Mark expected switch-case
 fall-through

Commit-ID:  89da3446294a8b811b28a4807e74e7ee7044d49f
Gitweb:     https://git.kernel.org/tip/89da3446294a8b811b28a4807e74e7ee7044d49f
Author:     Gustavo A. R. Silva <gustavo@...eddedor.com>
AuthorDate: Fri, 25 Jan 2019 14:55:20 -0600
Committer:  Borislav Petkov <bp@...e.de>
CommitDate: Sat, 26 Jan 2019 10:46:42 +0100

x86/insn-eval: Mark expected switch-case fall-through

In preparation to enable -Wimplicit-fallthrough by default, mark
switch-case statements where fall-through is intentional, explicitly.

Thus fix the following warning:

  arch/x86/lib/insn-eval.c: In function ‘resolve_default_seg’:
  arch/x86/lib/insn-eval.c:179:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
     if (insn->addr_bytes == 2)
        ^
  arch/x86/lib/insn-eval.c:182:2: note: here
    case -EDOM:
    ^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

This is part of the ongoing efforts to enable -Wimplicit-fallthrough by
default.

 [ bp: Massage commit message. ]

Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Kees Cook <keescook@...omium.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: x86-ml <x86@...nel.org>
Link: https://lkml.kernel.org/r/20190125205520.GA9602@embeddedor
---
 arch/x86/lib/insn-eval.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/lib/insn-eval.c b/arch/x86/lib/insn-eval.c
index 9119d8e41f1f..cf00ab6c6621 100644
--- a/arch/x86/lib/insn-eval.c
+++ b/arch/x86/lib/insn-eval.c
@@ -179,6 +179,8 @@ static int resolve_default_seg(struct insn *insn, struct pt_regs *regs, int off)
 		if (insn->addr_bytes == 2)
 			return -EINVAL;
 
+		/* fall through */
+
 	case -EDOM:
 	case offsetof(struct pt_regs, bx):
 	case offsetof(struct pt_regs, si):

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ