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: <MN2PR04MB60612846CD50ED157DE5AB548D8F0@MN2PR04MB6061.namprd04.prod.outlook.com>
Date:   Tue, 17 Sep 2019 03:42:54 +0000
From:   Anup Patel <Anup.Patel@....com>
To:     Will Deacon <will@...nel.org>
CC:     Palmer Dabbelt <palmer@...ive.com>,
        "guoren@...nel.org" <guoren@...nel.org>,
        Will Deacon <will.deacon@....com>,
        "julien.thierry@....com" <julien.thierry@....com>,
        "aou@...s.berkeley.edu" <aou@...s.berkeley.edu>,
        "james.morse@....com" <james.morse@....com>,
        Arnd Bergmann <arnd@...db.de>,
        "suzuki.poulose@....com" <suzuki.poulose@....com>,
        "marc.zyngier@....com" <marc.zyngier@....com>,
        "catalin.marinas@....com" <catalin.marinas@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "rppt@...ux.ibm.com" <rppt@...ux.ibm.com>,
        Christoph Hellwig <hch@...radead.org>,
        Atish Patra <Atish.Patra@....com>,
        "julien.grall@....com" <julien.grall@....com>,
        "gary@...yguo.net" <gary@...yguo.net>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        "christoffer.dall@....com" <christoffer.dall@....com>,
        "linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
        "kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>
Subject: RE: [PATCH RFC 11/14] arm64: Move the ASID allocator code in a
 separate file



> -----Original Message-----
> From: linux-kernel-owner@...r.kernel.org <linux-kernel-
> owner@...r.kernel.org> On Behalf Of Will Deacon
> Sent: Monday, September 16, 2019 11:48 PM
> To: Anup Patel <Anup.Patel@....com>
> Cc: Palmer Dabbelt <palmer@...ive.com>; guoren@...nel.org; Will Deacon
> <will.deacon@....com>; julien.thierry@....com; aou@...s.berkeley.edu;
> james.morse@....com; Arnd Bergmann <arnd@...db.de>;
> suzuki.poulose@....com; marc.zyngier@....com;
> catalin.marinas@....com; linux-kernel@...r.kernel.org;
> rppt@...ux.ibm.com; Christoph Hellwig <hch@...radead.org>; Atish Patra
> <Atish.Patra@....com>; julien.grall@....com; gary@...yguo.net; Paul
> Walmsley <paul.walmsley@...ive.com>; christoffer.dall@....com; linux-
> riscv@...ts.infradead.org; kvmarm@...ts.cs.columbia.edu; linux-arm-
> kernel@...ts.infradead.org; iommu@...ts.linux-foundation.org
> Subject: Re: [PATCH RFC 11/14] arm64: Move the ASID allocator code in a
> separate file
> 
> On Sun, Sep 15, 2019 at 05:03:38AM +0000, Anup Patel wrote:
> >
> >
> > > -----Original Message-----
> > > From: linux-kernel-owner@...r.kernel.org <linux-kernel-
> > > owner@...r.kernel.org> On Behalf Of Palmer Dabbelt
> > > Sent: Saturday, September 14, 2019 7:31 PM
> > > To: will@...nel.org
> > > Cc: guoren@...nel.org; Will Deacon <will.deacon@....com>;
> > > julien.thierry@....com; aou@...s.berkeley.edu;
> james.morse@....com;
> > > Arnd Bergmann <arnd@...db.de>; suzuki.poulose@....com;
> > > marc.zyngier@....com; catalin.marinas@....com; Anup Patel
> > > <Anup.Patel@....com>; linux-kernel@...r.kernel.org;
> > > rppt@...ux.ibm.com; Christoph Hellwig <hch@...radead.org>; Atish
> > > Patra <Atish.Patra@....com>; julien.grall@....com; gary@...yguo.net;
> > > Paul Walmsley <paul.walmsley@...ive.com>; christoffer.dall@....com;
> > > linux- riscv@...ts.infradead.org; kvmarm@...ts.cs.columbia.edu;
> > > linux-arm- kernel@...ts.infradead.org;
> > > iommu@...ts.linux-foundation.org
> > > Subject: Re: [PATCH RFC 11/14] arm64: Move the ASID allocator code
> > > in a separate file
> > >
> > > On Thu, 12 Sep 2019 07:02:56 PDT (-0700), will@...nel.org wrote:
> > > > On Sun, Sep 08, 2019 at 07:52:55AM +0800, Guo Ren wrote:
> > > >> On Mon, Jun 24, 2019 at 6:40 PM Will Deacon <will@...nel.org>
> wrote:
> > > >> > > I'll keep my system use the same ASID for SMP + IOMMU :P
> > > >> >
> > > >> > You will want a separate allocator for that:
> > > >> >
> > > >> > https://lkml.kernel.org/r/20190610184714.6786-2-jean-philippe.b
> > > >> > ruck
> > > >> > er@....com
> > > >>
> > > >> Yes, it is hard to maintain ASID between IOMMU and CPUMMU or
> > > >> different system, because it's difficult to synchronize the
> > > >> IO_ASID when the CPU ASID is rollover.
> > > >> But we could still use hardware broadcast TLB invalidation
> > > >> instruction to uniformly manage the ASID and IO_ASID, or
> > > >> OTHER_ASID in
> > > our IOMMU.
> > > >
> > > > That's probably a bad idea, because you'll likely stall execution
> > > > on the CPU until the IOTLB has completed invalidation. In the case
> > > > of ATS, I think an endpoint ATC is permitted to take over a minute
> > > > to respond. In reality, I suspect the worst you'll ever see would
> > > > be in the msec range, but that's still an unacceptable period of
> > > > time to hold a
> > > CPU.
> > > >
> > > >> Welcome to join our disscusion:
> > > >> "Introduce an implementation of IOMMU in linux-riscv"
> > > >> 9 Sep 2019, 10:45 Jade-room-I&II (Corinthia Hotel Lisbon) RISC-V
> > > >> MC
> > > >
> > > > I attended this session, but it unfortunately raised many more
> > > > questions than it answered.
> > >
> > > Ya, we're a long way from figuring this out.
> >
> > For everyone's reference, here is our first attempt at RISC-V ASID allocator:
> > http://archive.lwn.net:8080/linux-kernel/20190329045111.14040-1-anup.p
> > atel@....com/T/#u
> 
> With a reply stating that the patch "absolutely does not work" ;)

This patch was tested on existing HW (which does not have ASID implementation)
and tested on QEMU (which has very simplistic Implementation of ASID).

When I asked Gary Guo about way to get access to their HW (in same patch
email thread), I did not get any reply. After so many months passed, I now
doubt the his comment "absolutely does not work".

> 
> What exactly do you want people to do with that? It's an awful lot of effort to
> review this sort of stuff and given that Guo Ren is talking about sharing page
> tables between the CPU and an accelerator, maybe you're better off
> stabilising Linux for the platforms that you can actually test rather than
> getting so far ahead of yourselves that you end up with a bunch of wasted
> work on patches that probably won't get merged any time soon.

The intention of the ASID patch was to encourage RISC-V implementations
having ASID in HW and also ensure that things don't break on existing HW.

I don't see our efforts being wasted in trying to make Linux RISC-V feature
complete and encouraging more feature rich RISC-V CPUs.

Delays in merging patches are fine as long as people have something to try
on their RISC-V CPU implementations.

> 
> Seriously, they say "walk before you can run", but this is more "crawl before
> you can fly". What's the rush?
> 
> Will

Regards,
Anup

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ