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: <aJ5qGWlbxihLTHkB@e110455-lin.cambridge.arm.com>
Date: Thu, 14 Aug 2025 23:58:33 +0100
From: Liviu Dudau <liviu.dudau@....com>
To: Daniel Stone <daniel@...ishbar.org>
Cc: Karunika Choo <karunika.choo@....com>, dri-devel@...ts.freedesktop.org,
	nd@....com, Boris Brezillon <boris.brezillon@...labora.com>,
	Steven Price <steven.price@....com>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
	linux-kernel@...r.kernel.org, Chia-I Wu <olvaffe@...il.com>
Subject: Re: [PATCH v9 6/7] drm/panthor: Make MMU cache maintenance use
 FLUSH_CACHES command

On Fri, Aug 08, 2025 at 11:50:27AM +0100, Daniel Stone wrote:
> Hi Karunika,
> 
> 
> On Thu, 7 Aug 2025 at 17:27, Karunika Choo <karunika.choo@....com> wrote:
> > @@ -585,6 +615,9 @@ static int mmu_hw_do_operation_locked(struct panthor_device *ptdev, int as_nr,
> >         if (op != AS_COMMAND_UNLOCK)
> >                 lock_region(ptdev, as_nr, iova, size);
> >
> > +       if (op == AS_COMMAND_FLUSH_MEM || op == AS_COMMAND_FLUSH_PT)
> > +               return mmu_hw_do_flush_on_gpu_ctrl(ptdev, as_nr, op);
> 
> Given that FLUSH_MEM and FLUSH_PT are the only ops which are ever
> used, the below becomes dead code. Could you please just inline these,
> so it's more clear what's actually going on? The (op !=
> AS_COMMAND_UNLOCK) branch can also become unconditional, perhaps with
> a WARN_ON() around unknown ops.

Hmm, the commit message says that FLUSH_MEM and FLUSH_PT are going to be
deprecated and replaced with FLUSH_CACHES so the first are clearly not the
only ones ever used (at least not in the future). I'm not sure why you
think this code is not correct.

Best regards,
Liviu

> 
> Cheers,
> Daniel

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ