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: <20190827144624.GA18535@infradead.org>
Date:   Tue, 27 Aug 2019 07:46:24 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Atish Patra <atish.patra@....com>
Cc:     linux-kernel@...r.kernel.org, Albert Ou <aou@...s.berkeley.edu>,
        Alan Kao <alankao@...estech.com>,
        Alexios Zavras <alexios.zavras@...el.com>,
        Anup Patel <anup@...infault.org>,
        Palmer Dabbelt <palmer@...ive.com>,
        Mike Rapoport <rppt@...ux.ibm.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Gary Guo <gary@...yguo.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-riscv@...ts.infradead.org,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC PATCH 0/2] Add support for SBI version to 0.2

On Mon, Aug 26, 2019 at 04:32:54PM -0700, Atish Patra wrote:
> This patch series aims to add support for SBI specification version
> v0.2. It doesn't break compatibility with any v0.1 implementation.
> Internally, all the v0.1 calls are just renamed to legacy to be in
> sync with specification [1].
> 
> The patches for v0.2 support in OpenSBI are available at
> http://lists.infradead.org/pipermail/opensbi/2019-August/000422.html
> 
> [1] https://github.com/riscv/riscv-sbi-doc/blob/master/riscv-sbi.adoc

I really don't like the current design of that SBI 0.2 spec,
and don't think implementing it as-is is helpful.

For one the way how the extension id is placed creates a compatibilty
problem, not allowing your to implement a backwards compatible sbi,
which seems bad.

Second just blindly moving all the existing calls to a single legacy
extension doesn't seem useful.  We need to differenciate the existing
calls:

 (1) actually board specific and have not place in a cpu abstraction
     layer: getchar/putchar, these should just never be advertised in a
      non-legacy setup, and the drivers using them should not probe
      on a sbi 0.2+ system
 (2) useful for currently taped out cpus and in the long run for
     virtualization to avoid mmio traps:  ipis, timers, tlb shootdown.
     These should stay backwards compatible, but for sbi 0.2 be
     negotiated individually
 (3) in theory useful, but given how much of a big hammer sfence.i
     not useful in theory: SBI_REMOTE_FENCE_I we can decide if we want
     to either not allow it for sbi 0.2+ or also negotiate it.  I'd
     personally favor not advertising it and just use ipis to implement
     it.  If we want useful acceleration of i-cache synchronization
     we'll need actual instructions that are much more fine grained
     in the future.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ