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: <20240811-const_dfc_prepare-v1-0-d67cc416b3d3@quicinc.com>
Date: Sun, 11 Aug 2024 08:18:06 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
 "Rafael J. Wysocki" <rafael@...nel.org>, 
 Davidlohr Bueso <dave@...olabs.net>, 
 Jonathan Cameron <jonathan.cameron@...wei.com>, 
 Dave Jiang <dave.jiang@...el.com>, 
 Alison Schofield <alison.schofield@...el.com>, 
 Vishal Verma <vishal.l.verma@...el.com>, Ira Weiny <ira.weiny@...el.com>, 
 Dan Williams <dan.j.williams@...el.com>, 
 Takashi Sakamoto <o-takashi@...amocchi.jp>, Timur Tabi <timur@...nel.org>, 
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: Zijun Hu <zijun_hu@...oud.com>, linux-kernel@...r.kernel.org, 
 linux-cxl@...r.kernel.org, linux1394-devel@...ts.sourceforge.net, 
 netdev@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: [PATCH 0/5] driver core: Prevent device_find_child() from
 modifying caller's match data

For driver API:
struct device *device_find_child(struct device *dev, void *data,
		int (*match)(struct device *dev, void *data));

It does not make sense for its match function (*match)() to modify
caller's match data @*data, but there are 3 device_find_child() usages
whose match functions do such awful things within current kernel tree.

This patch series is to clean up them first to prepare to constify the API.

Previous discussion link:
https://lore.kernel.org/lkml/917359cc-a421-41dd-93f4-d28937fe2325@icloud.com

Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
Zijun Hu (5):
      driver core: Add simple parameter checks for APIs device_(for_each|find)_child()
      driver core: Introduce an API constify_device_find_child_helper()
      cxl/region: Prevent device_find_child() from modifying caller's match data
      firewire: core: Prevent device_find_child() from modifying caller's match data
      net: qcom/emac: Prevent device_find_child() from modifying caller's match data

 drivers/base/core.c                             | 41 +++++++++++++++++++++++--
 drivers/cxl/core/region.c                       |  3 +-
 drivers/firewire/core-device.c                  |  5 +--
 drivers/net/ethernet/qualcomm/emac/emac-sgmii.c |  5 +--
 include/linux/device.h                          |  7 +++++
 5 files changed, 53 insertions(+), 8 deletions(-)
---
base-commit: bfa54a793ba77ef696755b66f3ac4ed00c7d1248
change-id: 20240811-const_dfc_prepare-3ff23c6598e5

Best regards,
-- 
Zijun Hu <quic_zijuhu@...cinc.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ