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-next>] [day] [month] [year] [list]
Date:	Wed, 06 Feb 2013 15:53:39 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	a.p.zijlstra@...llo.nl, paulus@...ba.org, mingo@...hat.com,
	acme@...stprotocols.net
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] kernel/events: using uninitialized variable: slots.flexible
 for arm cross-compiling


for arm cross-compiling, in function __reserve_bp_slot:

  slots.flexible may be used without initializing.

    slots.flexible is not initialized when define it.
    it is as a parameter passed to fetch_bp_busy_slots.
    in function fetch_bp_busy_slots:
      if bp->cpu < 0
        slots->flexible will be used for comparing, firstly.
        that will cause issue.


building:
  make EXTRA_CFLAGS=-W ARCH=arm
  ...
  linux/kernel/events/hw_breakpoint.c:300:
    warning: missing initializer
  linux/kernel/events/hw_breakpoint.c:300:
    warning: (near initialization for 'slots.flexible')
  ...

Signed-off-by: Chen Gang <gang.chen@...anux.com>
---
 kernel/events/hw_breakpoint.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
index fe8a916..ef69215 100644
--- a/kernel/events/hw_breakpoint.c
+++ b/kernel/events/hw_breakpoint.c
@@ -297,7 +297,7 @@ __weak void arch_unregister_hw_breakpoint(struct perf_event *bp)
  */
 static int __reserve_bp_slot(struct perf_event *bp)
 {
-	struct bp_busy_slots slots = {0};
+	struct bp_busy_slots slots = {0, 0};
 	enum bp_type_idx type;
 	int weight;
 
-- 
1.7.7.6
--
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