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>] [day] [month] [year] [list]
Date:   Tue, 30 Jul 2019 16:24:40 -0700 (PDT)
From:   Christian Kujau <lists@...dbynature.de>
To:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>
cc:     Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org
Subject: ptrace.c:202:6: warning: this statement may fall through

While compiling mainline with gcc-9.1.1 the following warning is emitted:

===========================================================
../arch/x86/kernel/ptrace.c: In function ‘set_segment_reg’: 
../arch/x86/kernel/ptrace.c:202:6: warning: this statement may fall 
through [-Wimplicit-fallthrough=]
  202 |   if (unlikely(value == 0))
      |      ^
../arch/x86/kernel/ptrace.c:205:2: note: here
  205 |  default:
      |  ^~~~~~~
===========================================================

The patch below silences the warning, but I don't know if this is actual 
intended behaviour.

Christian.

diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 0fdbe89d0754..0030456d6e5c 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -201,6 +201,7 @@ static int set_segment_reg(struct task_struct *task,
 	case offsetof(struct user_regs_struct, ss):
 		if (unlikely(value == 0))
 			return -EIO;
+		/* fall through */

 	default:
 		*pt_regs_access(task_pt_regs(task), offset) = value;
-- 
BOFH excuse #326:

We need a licensed electrician to replace the light bulbs in the computer room.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ