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: <7913a77287f228366de6960b5c5afd2edc301ef2.camel@icenowy.me>
Date: Thu, 19 Dec 2024 12:54:16 +0800
From: Icenowy Zheng <uwu@...nowy.me>
To: Sui Jingfeng <sui.jingfeng@...ux.dev>, Shuah <shuah@...nel.org>, Xi
 Ruoyao <xry111@...111.site>, WANG Xuerui <kernel@...0n.name>, Huacai Chen
 <chenhuacai@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, "Mike Rapoport (IBM)"
 <rppt@...nel.org>, Baoquan He <bhe@...hat.com>, "Matthew Wilcox (Oracle)"
 <willy@...radead.org>, David Hildenbrand <david@...hat.com>, Zhen Lei
 <thunder.leizhen@...wei.com>, Thomas Gleixner <tglx@...utronix.de>, Zhihong
 Dong <donmor3000@...mail.com>, loongarch@...ts.linux.dev,
 linux-kernel@...r.kernel.org,  "conduct@...nel.org" <conduct@...nel.org>
Subject: Re: [PATCH v2] loongarch/mm: disable WUC for pgprot_writecombine as
 same as ioremap_wc

在 2024-12-19星期四的 11:17 +0800,Sui Jingfeng写道:
> Hi,
> 
> 
> On 2024/12/18 20:37, Icenowy Zheng wrote:
> > 在 2024-12-18星期三的 18:05 +0800,Sui Jingfeng写道:
> > > Hi,
> > > 
> > > 
> > > On 2024/12/18 14:23, Icenowy Zheng wrote:
> > > > 在 2024-12-18星期三的 11:24 +0800,Sui Jingfeng写道:
> > > > > Hi,
> > > > > 
> > > > > 
> > > > > On 2024/12/18 02:18, Shuah wrote:
> > > > > > On 12/2/24 09:23, Sui Jingfeng wrote:
> > > > > > > Hi,
> > > > > > > 
> > > > > > > > IIUC this is a hardware bug of 7A1000 and 7A2000, so
> > > > > > > > the
> > > > > > > > proper
> > > > > > > > location
> > > > > > > > of the workaround is in the bridge chip driver.  Or am
> > > > > > > > I
> > > > > > > > misunderstanding something?
> > > > > > > > 
> > > > > > > You are misunderstanding everything and ranting like a
> > > > > > > dog.
> > > > > > > 
> > > > > > Sui Jingfeng,
> > > > > > 
> > > > > > This is not the way to work with your fellow developers in
> > > > > > the
> > > > > > community to express disagreements.
> > > > > I'm not expressing disagreements, but argue that the
> > > > > contributor
> > > > > and/or talker should provide *sufficient* hardware details
> > > > > and
> > > > > tests. Instead of pointless *ranting* in order to get harmful
> > > > > patch merged.
> > > > I don't think the original patch is harmful.
> > > > 
> > > I have told you countless times, that is, disabling Write-Combine
> > > made the performance of BMC graphics(drm/ast) decrease
> > > dramatically.
> > So do the ast driver have any kind of command queues that needs to
> > be
> > read by the card and executed? If it has, I assume it will break
> > like
> > amdgpu/radeon if this is utilized (I remember ast has some 2D
> > accel);
> > if it does not have, then maybe you can add an architecture-
> > specific
> > pgprot type (e.g. pgprot_wuc), see how pgprot_noncached_wc is
> > defined
> > for PowerPC or pgprot_device is defined for ARM64
> 
> 
> drm/ast driver doesn't perform DMA to/from system RAM so far.
> 
> 
> >   -- in fact you may
> > find another architecture that have some page attribute that behave
> > like WUC on LongArch; and then utilize the newly introduced pgprot
> > type
> > in drm/ast, instead of using WUC as pgprot_writecombine, which do
> > not
> > exactly match (usual driver expect an ARM-like behavior of
> > pgprot_combine, I assume).
> 
> 
> This exactly saying that your patch is unqualified, because its not
> entirely an arch-specific problem.

Well I don't declare that there is one architecture, I am only saying
"may".

I am only describing the fact that architectures can have custom
pgprot_*() functions that maps to some architecture details when
mapping to generic pgprot_*() is not appropriate.

> 
> Your patch, together with other WC disable patch make the WC mapping
> of LoongArch completely broken. then you told us "you don't think
> the original patch is harmful" ???

WC mapping is not broken now. WC is only an optimization, not a
requirement.

If you see `include/linux/pgtable.h`, you will find the fallback
implementation of pgprot_writecombine() is just pgprot_noncached(),
which is just strongly ordered.

However the original implementation that maps WC to LoongArch WUC is
what is broken, so broken that observable by desktop end-users.

> 
> 
> > > And downstream Loongson developer really dislike related patch,
> > > and asking for solutions to me.
> > > 
> > > 
> > > > > The discussion completely not make scene at all.
> > > > > 
> > > > > 
> > > > > > I would recommend following up with an apology.
> > > > > > 
> > > > > I will not apology to indecent contributors and/or
> > > > > maintainers
> > > > > like this, never.
> > > > > 
> > > > > 
> > > > > > thanks,
> > > > > > -- Shuah
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ