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] [day] [month] [year] [list]
Message-ID: <632b7f807d51d8d6f2eef075e60b756e1e0c78f4.camel@icenowy.me>
Date: Thu, 13 Feb 2025 22:12:45 +0800
From: Icenowy Zheng <uwu@...nowy.me>
To: Christoph Hellwig <hch@....de>
Cc: Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...nel.dk>, Sagi
 Grimberg <sagi@...mberg.me>, linux-nvme@...ts.infradead.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] nvme-pci: skip CMB blocks incompatible with PCI P2P
 DMA

在 2025-02-13星期四的 06:58 +0100,Christoph Hellwig写道:
> On Thu, Feb 13, 2025 at 01:04:44AM +0800, Icenowy Zheng wrote:
> > +       /*
> > +        * Controllers may support a CMB size larger than their
> > BAR,
> > +        * for example, due to being behind a bridge. Reduce the
> > CMB to
> > +        * the reported size of the BAR
> > +        */
> > +       if (size > bar_size - offset)
> > +               size = bar_size - offset;
> 
> Nit: use up the full 80 characters for the comment, and maybe switch
> the above expression to use the min() helper.

I am only moving around existing code here.

Maybe I should refactor the code here and then move it?

> 
> > +       if (!IS_ALIGNED(size, memremap_compat_align()) ||
> > +           !IS_ALIGNED(pci_resource_start(pdev, bar),
> > +                       memremap_compat_align()))
> 
> These compat names looked odd to me, but it looks like they are
> indeed
> the proper interface here.  So modulo the little style things above
> this looks good, thanks a lot!
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ