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]
Message-Id: <1456174487-28397-1-git-send-email-sboyd@codeaurora.org>
Date:	Mon, 22 Feb 2016 12:54:38 -0800
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Michael Turquette <mturquette@...libre.com>,
	Stephen Boyd <sboyd@...eaurora.org>
Cc:	linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org,
	Boris Brezillon <boris.brezillon@...e-electrons.com>,
	Yoshinori Sato <ysato@...rs.sourceforge.jp>,
	uclinux-h8-devel@...ts.sourceforge.jp,
	Gabriel Fernandez <gabriel.fernandez@...com>,
	Maxime Ripard <maxime.ripard@...e-electrons.com>,
	Chen-Yu Tsai <wens@...e.org>, Tero Kristo <t-kristo@...com>,
	Felipe Balbi <balbi@...com>, linux-usb@...r.kernel.org,
	Hans de Goede <hdegoede@...hat.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	Tomi Valkeinen <tomi.valkeinen@...com>,
	linux-fbdev@...r.kernel.org
Subject: [PATCH 0/9] Change return type of of_clk_get_parent_count() to unsigned

Russell King recently pointed out that of_clk_get_parent_count() can
return a negative number if the "clocks" property isn't present in a
node. Upon investigating all the callers of this API, none of the them
seem to care about that case, and furthermore some callers are assigning
the return value to an unsigned int which could cause very large numbers
of parents to be used.

This series changes the API to return an unsigned int from 0 (no parents)
to N, thereby avoiding any problems with negative return values.

Cc: Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
Cc: <uclinux-h8-devel@...ts.sourceforge.jp>
Cc: Gabriel Fernandez <gabriel.fernandez@...com>
Cc: Maxime Ripard <maxime.ripard@...e-electrons.com>
Cc: Chen-Yu Tsai <wens@...e.org> 
Cc: Tero Kristo <t-kristo@...com>
Cc: Felipe Balbi <balbi@...com>
Cc: <linux-usb@...r.kernel.org>
Cc: Hans de Goede <hdegoede@...hat.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@...com>
Cc: <linux-fbdev@...r.kernel.org>

Stephen Boyd (9):
  clk: Make of_clk_get_parent_count() return unsigned ints
  clk: at91: Remove impossible checks for of_clk_get_parent_count()
  clk: gpio: Remove impossible check for of_clk_get_parent_count() < 0
  clk: h8300: Remove impossible check for of_clk_get_parent_count()
  clk: st: Remove impossible check for of_clk_get_parent_count() < 0
  clk: sunxi: Use proper type for of_clk_get_parent_count() return value
  clk: ti: Update for of_clk_get_parent_count() returning unsigned int
  usb: dwc3: Remove impossible check for of_clk_get_parent_count() < 0
  simplefb: Remove impossible check for of_clk_get_parent_count() < 0

 drivers/clk/at91/clk-generated.c    |  4 ++--
 drivers/clk/at91/clk-main.c         |  4 ++--
 drivers/clk/at91/clk-master.c       |  4 ++--
 drivers/clk/at91/clk-programmable.c |  4 ++--
 drivers/clk/at91/clk-slow.c         |  6 +++---
 drivers/clk/at91/clk-smd.c          |  4 ++--
 drivers/clk/at91/clk-usb.c          |  4 ++--
 drivers/clk/clk-gpio.c              |  6 ++----
 drivers/clk/clk.c                   | 16 ++++++++++++++--
 drivers/clk/h8300/clk-div.c         |  4 ++--
 drivers/clk/h8300/clk-h8s2678.c     |  4 ++--
 drivers/clk/st/clk-flexgen.c        |  4 ++--
 drivers/clk/st/clkgen-mux.c         |  4 ++--
 drivers/clk/sunxi/clk-sun6i-ar100.c |  2 +-
 drivers/clk/ti/clockdomain.c        |  2 +-
 drivers/clk/ti/composite.c          |  8 ++++----
 drivers/clk/ti/dpll.c               |  2 +-
 drivers/clk/ti/mux.c                |  4 ++--
 drivers/usb/dwc3/dwc3-of-simple.c   |  9 +++++----
 drivers/video/fbdev/simplefb.c      |  4 ++--
 include/linux/clk-provider.h        |  2 +-
 21 files changed, 56 insertions(+), 45 deletions(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ