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: <68952ab060b6d_cff9910033@dwillia2-xfh.jf.intel.com.notmuch>
Date: Thu, 7 Aug 2025 15:37:36 -0700
From: <dan.j.williams@...el.com>
To: Bjorn Helgaas <helgaas@...nel.org>, Dan Williams
	<dan.j.williams@...el.com>
CC: <linux-coco@...ts.linux.dev>, <linux-pci@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <bhelgaas@...gle.com>, <aik@....com>,
	<lukas@...ner.de>, Yilun Xu <yilun.xu@...el.com>, Jonathan Cameron
	<Jonathan.Cameron@...wei.com>, Aneesh Kumar K.V <aneesh.kumar@...nel.org>
Subject: Re: [PATCH v4 02/10] PCI/IDE: Enumerate Selective Stream IDE
 capabilities

Bjorn Helgaas wrote:
> On Thu, Jul 17, 2025 at 11:33:50AM -0700, Dan Williams wrote:
> > Link encryption is a new PCIe feature enumerated by "PCIe 6.2 section
> > 7.9.26 IDE Extended Capability".
> 
> > +++ b/drivers/pci/ide.c
> > @@ -0,0 +1,93 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/* Copyright(c) 2024 Intel Corporation. All rights reserved. */
> > +
> > +/* PCIe 6.2 section 6.33 Integrity & Data Encryption (IDE) */
> > +
> > +#define dev_fmt(fmt) "PCI/IDE: " fmt
> > +#include <linux/pci.h>
> > +#include <linux/bitfield.h>
> 
> Trend is to alphabetize these.  And I think there should be more
> #includes here instead of using other things pulled in indirectly:
> 
>   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submit-checklist.rst?id=v6.16#n17

In this case I think it was only missing a:

#include <linux/pci_regs.h>

...but more includes are needed in follow-on patches. Added those and
alphabetized.

> 
> > +++ b/include/uapi/linux/pci_regs.h
> 
> > +#define  PCI_IDE_CAP_ALG_MASK		__GENMASK(12, 8) /* Supported Algorithms */
> > +#define  PCI_IDE_CAP_ALG_AES_GCM_256	0    /* AES-GCM 256 key size, 96b MAC */
> > +#define  PCI_IDE_CAP_LINK_TC_NUM_MASK	__GENMASK(15, 13) /* Link IDE TCs */
> > +#define  PCI_IDE_CAP_SEL_NUM_MASK	__GENMASK(23, 16)/* Supported Selective IDE Streams */
> 
> I'm totally OK with dropping the "_MASK" suffix since I think uses are
> completely readable without it, especially with __GENMASK()/FIELD_GET()/
> FIELD_PREP().

Sounds good, and helps with the column width pressure. There might be
isolated cases of "mask vs value" confusion, but I think proximity to
FIELD_PREP()/FIELD_GET(), like you say, makes this clear.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ