Git Product home page Git Product logo

Comments (6)

ved-rivos avatar ved-rivos commented on September 27, 2024 1

A RDSM can delegate access to seed CSR to a supervisor domain. The seed CSR is a per hart CSR. For the duration of the SD execution, the SD can consume entropy from the seed CSR. There is no specific reason to disallow the delegation unless the entropy source is shared by multiple harts. Consuming entropy using seed CSR from one hart should not affect the entropy availability on another hart unless they are shared. On an implementation where such sharing is present the RDSM may mediate and emulate access to seed CSR - either through a SBI or by emulating the CSR access and in such cases implement the appropriate rate limits. Please elaborate more on the DOS attack concern if it is beyond the shared entropy source concern.

from riscv-smmtt.

gagachang avatar gagachang commented on September 27, 2024

Please elaborate more on the DOS attack concern if it is beyond the shared entropy source concern.

Let's say

  1. SD(a) is going to execute csrrw instruction to read seed.
  2. Suddenly SD(b)'s interrupt asserted, causing CPU traps to RDSM.
  3. RDSM immediately performs context switch for this hart, saving SD(a)'s context and restoring SD(b).
  4. However, SD(b) reads seed in its interrupt handler. SD(b) may consume much of entropy.
  5. SD(b) finishes its handler. RDSM performs context switch back to SD(a). SD(a) executes previous csrrw, but it might not get sufficient entropy.

Above case 1 to case 5 can be an infinite loop.

from riscv-smmtt.

ved-rivos avatar ved-rivos commented on September 27, 2024

Got it. When such a bad entropy source is implemented, the RDSM as a policy should not delegate seed to SDs.

from riscv-smmtt.

gagachang avatar gagachang commented on September 27, 2024

So it depends on the quality of entropy source ?

from riscv-smmtt.

ved-rivos avatar ved-rivos commented on September 27, 2024

Depends on quality of entropy source and the SW policies. The ISA provides controls to support either policies than an RDSM may want to implement.

from riscv-smmtt.

gagachang avatar gagachang commented on September 27, 2024

Depends on quality of entropy source and the SW policies. The ISA provides controls to support either policies than an RDSM may want to implement.

It makes sense.
Seems we don't need any ISA changes for access control of seed.
Thanks!

from riscv-smmtt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.