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]
Message-ID: <20250211231646.GA58828@bhelgaas>
Date: Tue, 11 Feb 2025 17:16:46 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Markus Elfring <Markus.Elfring@....de>
Cc: Thippeswamy Havalige <thippeswamy.havalige@....com>,
	linux-pci@...r.kernel.org, kernel-janitors@...r.kernel.org,
	LKML <linux-kernel@...r.kernel.org>, devicetree@...r.kernel.org,
	Rob Herring <robh@...nel.org>,
	Bharat Kumar Gogada <bharat.kumar.gogada@....com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Conor Dooley <conor+dt@...nel.org>,
	Jingoo Han <jingoohan1@...il.com>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Krzysztof WilczyƄski <kw@...ux.com>,
	Lorenzo Pieralisi <lpieralisi@...nel.org>,
	Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
	Michal Simek <michal.simek@....com>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [v8 3/3] PCI: amd-mdb: Add AMD MDB Root Port driver

On Fri, Feb 07, 2025 at 07:39:03AM +0100, Markus Elfring wrote:
> > I don't *really* like guard() anyway because it's kind of magic in
> > that the unlock doesn't actually appear in the code, and it's kind of
> > hard to unravel what guard() is and how it works.  But I guess that's
> > mostly because it's just a new idiom that takes time to internalize.
>
> How will the circumstances evolve further for growing applications of
> scope-based resource management?

I'm sure it will evolve to become the typical style.  Right now, it's
not quite there yet, as evidenced by the fact that the only reference
to them in Documentation/ is this somewhat ambivalent note:

  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/maintainer-netdev.rst?id=v6.13#n380

We do already have a few uses of guard() and scoped_guard() in
drivers/pci, and I don't really object to more, including in this
amd-mdb case.  Whatever we do, I *would* want to do it consistently
throughout the file.

Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ