• The Ravenscar profile and capabilities paradigm

    From Doctor Who@21:1/5 to All on Mon Oct 11 15:33:52 2021
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luke A. Guest@21:1/5 to Doctor Who on Mon Oct 11 15:48:37 2021
    On 11/10/2021 14:33, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?



    Capabilities are just a set of operations that an object / user can
    perform, or not. So, it's merely a bitset. A bitset which can form
    derived bitsets.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Shark8@21:1/5 to Doctor Who on Mon Oct 11 08:48:53 2021
    On Monday, October 11, 2021 at 7:33:53 AM UTC-6, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?
    I'm not quite sure what you mean by "capabilities paradigm", could you elaborate on it a bit.

    If my gut intuition is anything to go off of, you're referring to the ability to program against a type and operations thereon, correct?
    If so, then Ada has this in the form of Generics: you can pass types, subprograms, values & objects, and generic packages via formal parameters.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Wright@21:1/5 to Doctor Who on Mon Oct 11 16:32:13 2021
    Doctor Who <doc@tardis.org> writes:

    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?

    Google hasn't helped me to understand what you're getting at. Perhaps
    you could expand?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luke A. Guest@21:1/5 to Doctor Who on Mon Oct 11 20:36:46 2021
    On 11/10/2021 20:25, Doctor Who wrote:
    On Mon, 11 Oct 2021 15:48:37 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 14:33, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?



    Capabilities are just a set of operations that an object / user can
    perform, or not. So, it's merely a bitset. A bitset which can form
    derived bitsets.


    no it is another thing, https://en.wikipedia.org/wiki/Capability-based_security


    I know what it is. It is still a set of bits, or, permissions, or
    capabilities. The capabilities are usually provided by the OS services.

    But as you didn't specify whether you wanted to map onto an existing OS' capabilities or if you wanted to implement your own, I went with the latter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to onewingedshark@gmail.com on Mon Oct 11 21:25:19 2021
    On Mon, 11 Oct 2021 08:48:53 -0700 (PDT), Shark8
    <onewingedshark@gmail.com> wrote:

    On Monday, October 11, 2021 at 7:33:53 AM UTC-6, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?
    I'm not quite sure what you mean by "capabilities paradigm", could you elaborate on it a bit.

    If my gut intuition is anything to go off of, you're referring to the ability to program against a type and operations thereon, correct?
    If so, then Ada has this in the form of Generics: you can pass types, subprograms, values & objects, and generic packages via formal parameters.


    I am referring to capability-based security.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to laguest@archeia.com on Mon Oct 11 21:50:14 2021
    On Mon, 11 Oct 2021 20:36:46 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 20:25, Doctor Who wrote:
    On Mon, 11 Oct 2021 15:48:37 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 14:33, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?



    Capabilities are just a set of operations that an object / user can
    perform, or not. So, it's merely a bitset. A bitset which can form
    derived bitsets.


    no it is another thing,
    https://en.wikipedia.org/wiki/Capability-based_security


    I know what it is. It is still a set of bits, or, permissions, or >capabilities. The capabilities are usually provided by the OS services.

    But as you didn't specify whether you wanted to map onto an existing OS' >capabilities or if you wanted to implement your own, I went with the latter.

    there isn't any existing OS that provides capability-security from the
    ground up, I intend to implement my own.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to All on Mon Oct 11 21:24:44 2021
    On Mon, 11 Oct 2021 16:32:13 +0100, Simon Wright <simon@pushface.org>
    wrote:

    Doctor Who <doc@tardis.org> writes:

    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?

    Google hasn't helped me to understand what you're getting at. Perhaps
    you could expand?


    wikipedia has a good explanation: https://en.wikipedia.org/wiki/Capability-based_security

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to laguest@archeia.com on Mon Oct 11 21:25:44 2021
    On Mon, 11 Oct 2021 15:48:37 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 14:33, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?



    Capabilities are just a set of operations that an object / user can
    perform, or not. So, it's merely a bitset. A bitset which can form
    derived bitsets.


    no it is another thing,
    https://en.wikipedia.org/wiki/Capability-based_security

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luke A. Guest@21:1/5 to Doctor Who on Tue Oct 12 01:45:40 2021
    On 11/10/2021 20:50, Doctor Who wrote:
    On Mon, 11 Oct 2021 20:36:46 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 20:25, Doctor Who wrote:
    On Mon, 11 Oct 2021 15:48:37 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 14:33, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?



    Capabilities are just a set of operations that an object / user can
    perform, or not. So, it's merely a bitset. A bitset which can form
    derived bitsets.


    no it is another thing,
    https://en.wikipedia.org/wiki/Capability-based_security


    I know what it is. It is still a set of bits, or, permissions, or
    capabilities. The capabilities are usually provided by the OS services.

    But as you didn't specify whether you wanted to map onto an existing OS'
    capabilities or if you wanted to implement your own, I went with the latter.

    there isn't any existing OS that provides capability-security from the
    ground up, I intend to implement my own.


    CapOS/KeyOS don't exist then?

    Windows has capabilities.

    Pretty sure iOS has them too.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luke A. Guest@21:1/5 to Luke A. Guest on Tue Oct 12 01:47:28 2021
    On 12/10/2021 01:45, Luke A. Guest wrote:

    CapOS/KeyOS don't exist then?

    Might be called KeyKos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to Doctor Who on Tue Oct 12 04:35:14 2021
    On Tue, 12 Oct 2021 04:29:42 +0200, Doctor Who <doc@tardis.org> wrote:

    On Tue, 12 Oct 2021 01:45:40 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 20:50, Doctor Who wrote:
    On Mon, 11 Oct 2021 20:36:46 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 20:25, Doctor Who wrote:
    On Mon, 11 Oct 2021 15:48:37 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 14:33, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada, >>>>>>> specifically for programs written using the Ravenscar profile ?



    Capabilities are just a set of operations that an object / user can >>>>>> perform, or not. So, it's merely a bitset. A bitset which can form >>>>>> derived bitsets.


    no it is another thing,
    https://en.wikipedia.org/wiki/Capability-based_security


    I know what it is. It is still a set of bits, or, permissions, or
    capabilities. The capabilities are usually provided by the OS services. >>>>
    But as you didn't specify whether you wanted to map onto an existing OS' >>>> capabilities or if you wanted to implement your own, I went with the latter.

    there isn't any existing OS that provides capability-security from the
    ground up, I intend to implement my own.


    CapOS/KeyOS don't exist then?

    Windows has capabilities.

    Pretty sure iOS has them too.


    only CapROS at the moment, KeyKOS only survives as an ancestor
    reference to CapROS and Coyotos.

    But Coyotos development has been sleeping for years now, and CapROS is >starting to revive only now.

    But yes, I would chose CapROS now.


    I have participated to the development of Coyotos since 2000 until it completely stopped in 2013.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to laguest@archeia.com on Tue Oct 12 04:29:42 2021
    On Tue, 12 Oct 2021 01:45:40 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 20:50, Doctor Who wrote:
    On Mon, 11 Oct 2021 20:36:46 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 20:25, Doctor Who wrote:
    On Mon, 11 Oct 2021 15:48:37 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 14:33, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?



    Capabilities are just a set of operations that an object / user can
    perform, or not. So, it's merely a bitset. A bitset which can form
    derived bitsets.


    no it is another thing,
    https://en.wikipedia.org/wiki/Capability-based_security


    I know what it is. It is still a set of bits, or, permissions, or
    capabilities. The capabilities are usually provided by the OS services.

    But as you didn't specify whether you wanted to map onto an existing OS' >>> capabilities or if you wanted to implement your own, I went with the latter.

    there isn't any existing OS that provides capability-security from the
    ground up, I intend to implement my own.


    CapOS/KeyOS don't exist then?

    Windows has capabilities.

    Pretty sure iOS has them too.


    only CapROS at the moment, KeyKOS only survives as an ancestor
    reference to CapROS and Coyotos.

    But Coyotos development has been sleeping for years now, and CapROS is
    starting to revive only now.

    But yes, I would chose CapROS now.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to laguest@archeia.com on Tue Oct 12 04:31:12 2021
    On Tue, 12 Oct 2021 01:47:28 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:


    On 12/10/2021 01:45, Luke A. Guest wrote:

    CapOS/KeyOS don't exist then?

    Might be called KeyKos.


    KeyKOS is the dead ancestor of EROS, Coyotos and CapROS.

    GNOSIS was the ancestor of KeyKOS.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to Doctor Who on Tue Oct 12 05:19:41 2021
    On Tue, 12 Oct 2021 04:29:42 +0200, Doctor Who <doc@tardis.org> wrote:

    On Tue, 12 Oct 2021 01:45:40 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 20:50, Doctor Who wrote:
    On Mon, 11 Oct 2021 20:36:46 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 20:25, Doctor Who wrote:
    On Mon, 11 Oct 2021 15:48:37 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 14:33, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada, >>>>>>> specifically for programs written using the Ravenscar profile ?



    Capabilities are just a set of operations that an object / user can >>>>>> perform, or not. So, it's merely a bitset. A bitset which can form >>>>>> derived bitsets.


    no it is another thing,
    https://en.wikipedia.org/wiki/Capability-based_security


    I know what it is. It is still a set of bits, or, permissions, or
    capabilities. The capabilities are usually provided by the OS services. >>>>
    But as you didn't specify whether you wanted to map onto an existing OS' >>>> capabilities or if you wanted to implement your own, I went with the latter.

    there isn't any existing OS that provides capability-security from the
    ground up, I intend to implement my own.


    CapOS/KeyOS don't exist then?

    Windows has capabilities.

    Pretty sure iOS has them too.


    only CapROS at the moment, KeyKOS only survives as an ancestor
    reference to CapROS and Coyotos.

    But Coyotos development has been sleeping for years now, and CapROS is >starting to revive only now.

    see the discussion here https://groups.google.com/g/cap-talk/c/ThxbBiMcyFk/m/DnqbkZWGAQAJ



    But yes, I would chose CapROS now.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Iswara@21:1/5 to Doctor Who on Tue Oct 12 12:17:00 2021
    On 12/10/2021 02.50, Doctor Who wrote:
    On Mon, 11 Oct 2021 20:36:46 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 20:25, Doctor Who wrote:
    On Mon, 11 Oct 2021 15:48:37 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 14:33, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?



    Capabilities are just a set of operations that an object / user can
    perform, or not. So, it's merely a bitset. A bitset which can form
    derived bitsets.


    no it is another thing,
    https://en.wikipedia.org/wiki/Capability-based_security


    I know what it is. It is still a set of bits, or, permissions, or
    capabilities. The capabilities are usually provided by the OS services.

    But as you didn't specify whether you wanted to map onto an existing OS'
    capabilities or if you wanted to implement your own, I went with the latter.

    there isn't any existing OS that provides capability-security from the
    ground up, I intend to implement my own.

    seL4? The whitepaper includes the proofs also.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to haujekchifan@gmail.com on Tue Oct 12 08:42:26 2021
    On Tue, 12 Oct 2021 12:17:00 +0700, Richard Iswara
    <haujekchifan@gmail.com> wrote:

    On 12/10/2021 02.50, Doctor Who wrote:
    On Mon, 11 Oct 2021 20:36:46 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 20:25, Doctor Who wrote:
    On Mon, 11 Oct 2021 15:48:37 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 11/10/2021 14:33, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?



    Capabilities are just a set of operations that an object / user can
    perform, or not. So, it's merely a bitset. A bitset which can form
    derived bitsets.


    no it is another thing,
    https://en.wikipedia.org/wiki/Capability-based_security


    I know what it is. It is still a set of bits, or, permissions, or
    capabilities. The capabilities are usually provided by the OS services.

    But as you didn't specify whether you wanted to map onto an existing OS' >>> capabilities or if you wanted to implement your own, I went with the latter.

    there isn't any existing OS that provides capability-security from the
    ground up, I intend to implement my own.

    seL4? The whitepaper includes the proofs also.


    eh yes, I forgot seL4, however it isn't much used I think

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Iswara@21:1/5 to Doctor Who on Tue Oct 12 04:51:28 2021
    On Tuesday, October 12, 2021 at 1:42:27 PM UTC+7, Doctor Who wrote:
    On Tue, 12 Oct 2021 12:17:00 +0700, Richard Iswara
    <haujek...@gmail.com> wrote:

    On 12/10/2021 02.50, Doctor Who wrote:
    On Mon, 11 Oct 2021 20:36:46 +0100, "Luke A. Guest"
    <lag...@archeia.com> wrote:

    On 11/10/2021 20:25, Doctor Who wrote:
    On Mon, 11 Oct 2021 15:48:37 +0100, "Luke A. Guest"
    <lag...@archeia.com> wrote:

    On 11/10/2021 14:33, Doctor Who wrote:
    Hello,
    someone knows how to introduce the capabilities paradigm in Ada, >>>>>> specifically for programs written using the Ravenscar profile ?



    Capabilities are just a set of operations that an object / user can >>>>> perform, or not. So, it's merely a bitset. A bitset which can form >>>>> derived bitsets.


    no it is another thing,
    https://en.wikipedia.org/wiki/Capability-based_security


    I know what it is. It is still a set of bits, or, permissions, or
    capabilities. The capabilities are usually provided by the OS services. >>>
    But as you didn't specify whether you wanted to map onto an existing OS' >>> capabilities or if you wanted to implement your own, I went with the latter.

    there isn't any existing OS that provides capability-security from the
    ground up, I intend to implement my own.

    seL4? The whitepaper includes the proofs also.
    eh yes, I forgot seL4, however it isn't much used I think
    Has Qualcomm and Apple iOS abandoned it when it changed from OKL4 to seL4?
    I thought they use it for isolating their modem firmware from general OS.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luke A. Guest@21:1/5 to Richard Iswara on Tue Oct 12 12:58:48 2021
    On 12/10/2021 12:51, Richard Iswara wrote:

    there isn't any existing OS that provides capability-security from the >>>> ground up, I intend to implement my own.

    seL4? The whitepaper includes the proofs also.
    eh yes, I forgot seL4, however it isn't much used I think
    Has Qualcomm and Apple iOS abandoned it when it changed from OKL4 to seL4?
    I thought they use it for isolating their modem firmware from general OS.


    The biggest flaw in L4 I found is that sigma0 cannot claim memory back
    from processes when it runs out. There was apparently work being done,
    but I don't know if they did it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luke A. Guest@21:1/5 to All on Tue Oct 12 16:02:53 2021
    On 12/10/2021 16:01, Shark8 wrote:
    On Monday, October 11, 2021 at 1:24:48 PM UTC-6, Doctor Who wrote:
    On Mon, 11 Oct 2021 16:32:13 +0100, Simon Wright wrote:
    Doctor Who writes:

    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?


    Type Capability is ( Read, Copy, Whatever );

    There can be a capabiity for literally anything, even ownership and can
    be different depending on object/os service.

    I'd say a tagged type is better than an enum.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to laguest@archeia.com on Tue Oct 12 17:04:40 2021
    On Tue, 12 Oct 2021 12:58:48 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:


    On 12/10/2021 12:51, Richard Iswara wrote:

    there isn't any existing OS that provides capability-security from the >>>>> ground up, I intend to implement my own.

    seL4? The whitepaper includes the proofs also.
    eh yes, I forgot seL4, however it isn't much used I think
    Has Qualcomm and Apple iOS abandoned it when it changed from OKL4 to seL4? >> I thought they use it for isolating their modem firmware from general OS.


    The biggest flaw in L4 I found is that sigma0 cannot claim memory back
    from processes when it runs out. There was apparently work being done,
    but I don't know if they did it.


    in any case CapROS development is starting again and it promises to be
    really interesting

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Shark8@21:1/5 to Doctor Who on Tue Oct 12 08:01:26 2021
    On Monday, October 11, 2021 at 1:24:48 PM UTC-6, Doctor Who wrote:
    On Mon, 11 Oct 2021 16:32:13 +0100, Simon Wright wrote:
    Doctor Who writes:

    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?

    Google hasn't helped me to understand what you're getting at. Perhaps
    you could expand?
    wikipedia has a good explanation: https://en.wikipedia.org/wiki/Capability-based_security
    Ah.
    Limited Private, unknown-discriminant types.

    Package Capabilities is
    -- Enumeration of the particular capabilities.
    Type Capability is ( Read, Copy, Whatever );
    -- A Boolean set for delineating a set of Capabilities.
    Type Capability_List is Array(Capability) of Boolean;
    -- An instance of a set of capabilities; note that:
    -- (1) LIMITED means there is no predefined assignment/copy.
    -- (2) PRIVATE means there is no public view to the components.
    -- (3) Unknown discriminants mean there is no object-creation w/o a function-call.
    Type Instance(<>) is limited private;
    -- Create an instance; add any other needed parameters.
    Function Create( Capabilities : Capability_List ) return Instance;
    -- No permissions.
    Function No_Permissions return Instance;
    Private
    Type Instance is record
    Permissions : Capability_List:= (raise Program_Error with "Capabilities-Instance must be initialized.");
    -- (others => False); -- Or maybe default to no permissions.
    -- OTHER DATA, IF NEEDED; PERHAPS TASK-/PROCESS-ID.
    End record;

    Function Create( Capabilities : Capability_List ) return Instance is
    ( Permissions => Capabilities );
    Function No_Permissions return Instance is
    ( Create( Capability_List'(others => False) ) );
    End Capabilities;

    You could also extend things with a Task-ID, assuming you want this prevalent/pervasive across the OS, you could make a TASK INTERFACE with an accessor (Function Get_Capabilities(Task : OS_Task_Interface) return Capabilities.Instance is (Capabilities.No_
    Permissions); -- Override to give permissions.) and/or possibly a registry to manage permissions (on a finer-grained level) if you need it. A lot depends on how you architect/model it, but the "limited private unknown-discriminant type" perfectly fits
    what you need at the fundamental levels.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Shark8@21:1/5 to Luke A. Guest on Tue Oct 12 08:33:20 2021
    On Tuesday, October 12, 2021 at 9:04:09 AM UTC-6, Luke A. Guest wrote:
    On 12/10/2021 16:01, Shark8 wrote:
    On Monday, October 11, 2021 at 1:24:48 PM UTC-6, Doctor Who wrote:
    On Mon, 11 Oct 2021 16:32:13 +0100, Simon Wright wrote:
    Doctor Who writes:

    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?

    Type Capability is ( Read, Copy, Whatever );
    There can be a capabiity for literally anything, even ownership and can
    be different depending on object/os service.

    I'd say a tagged type is better than an enum.
    Possibly.
    But there's no reason to complicate the general idea in example-form: even if it's a tagged type you're going to want the capability-instance to be limited-private; the implementation of the "permissions" component being a Boolean-array or a vector of
    Capability'Class [most obviously having Capability be an abstract tagged null record] is mostly irrelevant for that demonstration. (And using a vector of tagged-type instead of the array would have bogged the example down with importing and instantiating
    the Vector container and setting up multiple non-abstract Capability-descendants, cluttering the point of the example.)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luke A. Guest@21:1/5 to All on Tue Oct 12 16:43:07 2021
    On 12/10/2021 16:33, Shark8 wrote:
    On Tuesday, October 12, 2021 at 9:04:09 AM UTC-6, Luke A. Guest wrote:
    On 12/10/2021 16:01, Shark8 wrote:
    On Monday, October 11, 2021 at 1:24:48 PM UTC-6, Doctor Who wrote:
    On Mon, 11 Oct 2021 16:32:13 +0100, Simon Wright wrote:
    Doctor Who writes:

    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?

    Type Capability is ( Read, Copy, Whatever );
    There can be a capabiity for literally anything, even ownership and can
    be different depending on object/os service.

    I'd say a tagged type is better than an enum.
    Possibly.
    But there's no reason to complicate the general idea in example-form: even if it's a tagged type you're going to want the capability-instance to be limited-private; the implementation of the "permissions" component being a Boolean-array or a vector of
    Capability'Class [most obviously having Capability be an abstract tagged null record] is mostly irrelevant for that demonstration. (And using a vector of tagged-type instead of the array would have bogged the example down with importing and instantiating
    the Vector container and setting up multiple non-abstract Capability-descendants, cluttering the point of the example.)


    Capabilities allow granting and revoking of access, iirc, the kernel has
    access to all, the kernel then grants access to certain processes, i.e.
    memory server, filesystem server, etc. each of those processes can
    further grant and revoke caps.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to laguest@archeia.com on Tue Oct 12 20:21:28 2021
    On Tue, 12 Oct 2021 16:43:07 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 12/10/2021 16:33, Shark8 wrote:
    On Tuesday, October 12, 2021 at 9:04:09 AM UTC-6, Luke A. Guest wrote:
    On 12/10/2021 16:01, Shark8 wrote:
    On Monday, October 11, 2021 at 1:24:48 PM UTC-6, Doctor Who wrote:
    On Mon, 11 Oct 2021 16:32:13 +0100, Simon Wright wrote:
    Doctor Who writes:

    someone knows how to introduce the capabilities paradigm in Ada, >>>>>>> specifically for programs written using the Ravenscar profile ?

    Type Capability is ( Read, Copy, Whatever );
    There can be a capabiity for literally anything, even ownership and can
    be different depending on object/os service.

    I'd say a tagged type is better than an enum.
    Possibly.
    But there's no reason to complicate the general idea in example-form: even if it's a tagged type you're going to want the capability-instance to be limited-private; the implementation of the "permissions" component being a Boolean-array or a vector of
    Capability'Class [most obviously having Capability be an abstract tagged null record] is mostly irrelevant for that demonstration. (And using a vector of tagged-type instead of the array would have bogged the example down with importing and instantiating
    the Vector container and setting up multiple non-abstract Capability-descendants, cluttering the point of the example.)


    Capabilities allow granting and revoking of access, iirc, the kernel has >access to all, the kernel then grants access to certain processes, i.e. >memory server, filesystem server, etc. each of those processes can
    further grant and revoke caps.


    thank you all for the help, I hope this discussion goes far.
    the most useful approach is the microkernel, where access to, and
    operation of, each service is mediated by capabilities.

    I would go so far to define and implement a capability-based
    microkernel written in Ada using the Ravenscar profile.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to Doctor Who on Tue Oct 12 20:24:20 2021
    On Tue, 12 Oct 2021 20:21:28 +0200, Doctor Who <doc@tardis.org> wrote:

    On Tue, 12 Oct 2021 16:43:07 +0100, "Luke A. Guest"
    <laguest@archeia.com> wrote:

    On 12/10/2021 16:33, Shark8 wrote:
    On Tuesday, October 12, 2021 at 9:04:09 AM UTC-6, Luke A. Guest wrote:
    On 12/10/2021 16:01, Shark8 wrote:
    On Monday, October 11, 2021 at 1:24:48 PM UTC-6, Doctor Who wrote:
    On Mon, 11 Oct 2021 16:32:13 +0100, Simon Wright wrote:
    Doctor Who writes:

    someone knows how to introduce the capabilities paradigm in Ada, >>>>>>>> specifically for programs written using the Ravenscar profile ? >>>>>>>
    Type Capability is ( Read, Copy, Whatever );
    There can be a capabiity for literally anything, even ownership and can >>>> be different depending on object/os service.

    I'd say a tagged type is better than an enum.
    Possibly.
    But there's no reason to complicate the general idea in example-form: even if it's a tagged type you're going to want the capability-instance to be limited-private; the implementation of the "permissions" component being a Boolean-array or a vector
    of Capability'Class [most obviously having Capability be an abstract tagged null record] is mostly irrelevant for that demonstration. (And using a vector of tagged-type instead of the array would have bogged the example down with importing and
    instantiating the Vector container and setting up multiple non-abstract Capability-descendants, cluttering the point of the example.)


    Capabilities allow granting and revoking of access, iirc, the kernel has >>access to all, the kernel then grants access to certain processes, i.e. >>memory server, filesystem server, etc. each of those processes can
    further grant and revoke caps.


    thank you all for the help, I hope this discussion goes far.
    the most useful approach is the microkernel, where access to, and
    operation of, each service is mediated by capabilities.

    I would go so far to define and implement a capability-based
    microkernel written in Ada using the Ravenscar profile.

    I like SweetAda, and I would like to implement something similar but
    using the approach I described so far.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to onewingedshark@gmail.com on Thu Oct 14 05:46:30 2021
    On Tue, 12 Oct 2021 08:01:26 -0700 (PDT), Shark8
    <onewingedshark@gmail.com> wrote:

    On Monday, October 11, 2021 at 1:24:48 PM UTC-6, Doctor Who wrote:
    On Mon, 11 Oct 2021 16:32:13 +0100, Simon Wright wrote:
    Doctor Who writes:

    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?

    Google hasn't helped me to understand what you're getting at. Perhaps
    you could expand?
    wikipedia has a good explanation:
    https://en.wikipedia.org/wiki/Capability-based_security
    Ah.
    Limited Private, unknown-discriminant types.

    Package Capabilities is
    -- Enumeration of the particular capabilities.
    Type Capability is ( Read, Copy, Whatever );
    -- A Boolean set for delineating a set of Capabilities.
    Type Capability_List is Array(Capability) of Boolean;
    -- An instance of a set of capabilities; note that:
    -- (1) LIMITED means there is no predefined assignment/copy.
    -- (2) PRIVATE means there is no public view to the components.
    -- (3) Unknown discriminants mean there is no object-creation w/o a function-call.
    Type Instance(<>) is limited private;
    -- Create an instance; add any other needed parameters.
    Function Create( Capabilities : Capability_List ) return Instance;
    -- No permissions.
    Function No_Permissions return Instance;
    Private
    Type Instance is record
    Permissions : Capability_List:= (raise Program_Error with "Capabilities-Instance must be initialized.");
    -- (others => False); -- Or maybe default to no permissions.
    -- OTHER DATA, IF NEEDED; PERHAPS TASK-/PROCESS-ID.
    End record;

    Function Create( Capabilities : Capability_List ) return Instance is
    ( Permissions => Capabilities );
    Function No_Permissions return Instance is
    ( Create( Capability_List'(others => False) ) );
    End Capabilities;

    You could also extend things with a Task-ID, assuming you want this prevalent/pervasive across the OS, you could make a TASK INTERFACE with an accessor (Function Get_Capabilities(Task : OS_Task_Interface) return Capabilities.Instance is (Capabilities.No_
    Permissions); -- Override to give permissions.) and/or possibly a registry to manage permissions (on a finer-grained level) if you need it. A lot depends on how you architect/model it, but the "limited private unknown-discriminant type" perfectly fits
    what you need at the fundamental levels.


    a Process Capability looks like this:

    Operations:
    a. "Read", address; > data;
    b. "Write", address, data; > ;
    c. "Take", index; > ; capability
    d. "Give", index; capability > ;
    e. "Find", index, count; capability > result, index;
    f. "Start"; > ;
    g. "Stop"; > ;

    Semantics: The "Read" and "Write" operations allow access to the
    process's memory. For example, in the "Read" operation, the literal
    string "Read" (or a recognizable OP code) is passed along with an
    address. The data word at the address is returned.

    The "Give" and "Take" operations allow access to the process's C-list.
    For example, the "Give" operation passes the string "Give", an index
    into the C-list, and a capability to be stored at the passed index.
    Such a stored capability could be invoked by the process if it were
    "Start"ed.

    The "Find" operation allows a slightly optimized sort of compare
    operation for capabilities. The process's C-list is searched, starting
    at the passed index, for the passed capability until either:

    1. The passed capability is found in the C-list. In this case, the
    operation returns "Yes" and the first index where the capability was
    found, or

    2. The count is exhausted. In this case the operation returns "No" and
    the passed index plus count.


    in addition there is a Nil Capability:
    Nil Capability: When a process is initially created its C-list
    contains only Nils. These are empty place holders. Nil always returns
    "Empty".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Shark8@21:1/5 to Doctor Who on Thu Oct 14 08:16:30 2021
    On Wednesday, October 13, 2021 at 9:46:34 PM UTC-6, Doctor Who wrote:
    On Tue, 12 Oct 2021 08:01:26 -0700 (PDT), Shark8
    On Monday, October 11, 2021 at 1:24:48 PM UTC-6, Doctor Who wrote:
    On Mon, 11 Oct 2021 16:32:13 +0100, Simon Wright wrote:
    Doctor Who writes:

    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?

    Google hasn't helped me to understand what you're getting at. Perhaps
    you could expand?
    wikipedia has a good explanation:
    https://en.wikipedia.org/wiki/Capability-based_security
    Ah.
    Limited Private, unknown-discriminant types.

    Package Capabilities is
    -- Enumeration of the particular capabilities.
    Type Capability is ( Read, Copy, Whatever );
    -- A Boolean set for delineating a set of Capabilities.
    Type Capability_List is Array(Capability) of Boolean;
    -- An instance of a set of capabilities; note that:
    -- (1) LIMITED means there is no predefined assignment/copy.
    -- (2) PRIVATE means there is no public view to the components.
    -- (3) Unknown discriminants mean there is no object-creation w/o a function-call.
    Type Instance(<>) is limited private;
    -- Create an instance; add any other needed parameters.
    Function Create( Capabilities : Capability_List ) return Instance;
    -- No permissions.
    Function No_Permissions return Instance;
    Private
    Type Instance is record
    Permissions : Capability_List:= (raise Program_Error with "Capabilities-Instance must be initialized.");
    -- (others => False); -- Or maybe default to no permissions.
    -- OTHER DATA, IF NEEDED; PERHAPS TASK-/PROCESS-ID.
    End record;

    Function Create( Capabilities : Capability_List ) return Instance is
    ( Permissions => Capabilities );
    Function No_Permissions return Instance is
    ( Create( Capability_List'(others => False) ) );
    End Capabilities;

    You could also extend things with a Task-ID, assuming you want this prevalent/pervasive across the OS, you could make a TASK INTERFACE with an accessor (Function Get_Capabilities(Task : OS_Task_Interface) return Capabilities.Instance is (Capabilities.
    No_Permissions); -- Override to give permissions.) and/or possibly a registry to manage permissions (on a finer-grained level) if you need it. A lot depends on how you architect/model it, but the "limited private unknown-discriminant type" perfectly fits
    what you need at the fundamental levels.
    a Process Capability looks like this:

    Operations:
    a. "Read", address; > data;
    b. "Write", address, data; > ;
    c. "Take", index; > ; capability
    d. "Give", index; capability > ;
    e. "Find", index, count; capability > result, index;
    f. "Start"; > ;
    g. "Stop"; > ;
    Does it?
    Why?
    Or is this just one possible implementation of 'capabilities' operations? Operations on a type correspond to subprograms in Ada; nothing you present seems (at first glance) incompatible with the structure/types I gave you.

    Semantics: The "Read" and "Write" operations allow access to the
    process's memory. For example, in the "Read" operation, the literal
    string "Read" (or a recognizable OP code) is passed along with an
    address. The data word at the address is returned.
    I think you're jumping the gun.
    You need to have a good model, and why are you jumping straight into implementation?
    (Literal string? Recognizable OP code? -- All implementation details; forget them right now, concentrate on the modeling of the problem, not the details of how to implement, and AFTER getting the model down, THEN consider code.)
    The "Give" and "Take" operations allow access to the process's C-list.
    For example, the "Give" operation passes the string "Give", an index
    into the C-list, and a capability to be stored at the passed index.
    Such a stored capability could be invoked by the process if it were "Start"ed.
    This part of your explanation makes it sound like you do not understand the code I presented, or the reasoning behind it; forgive me for poorly communicating it.
    The reason you want a "limited private type with unknown discriminants" is because:
    1) It hides the implementation, meaning clients cannot alter it indiscriminately.
    2) It prohibits automatic initialization, forcing the usage of an initialization subprogram.
    3) It forces usage of the public interface for clients, private details can manipulate it though.
    4) Any public operations, again, have to go through the public interface.
    5) Copying is strictly prohibited, hence "limited".

    In the model I had envisioned the Capabilities-list (Capabilities.Instance) would be an integral part of the TASK, and there would likely be a Get_Capabilities function which would return the proper value, some set-operations, and a new creation-function:
    Function Create( Object : OS_Task_Interface; Capabilities : Capability_List ) return Instance is
    Parent : Instance renames Get_Capabilities( Object );
    Caps : Capability_List renames Parent.Permissions;
    Begin
    Return Intersect( Caps, Capabilities ); -- The granted capabilities cannot be ones the parent does not have, nor may it be ones not requested.
    End Create;
    The above, I think, does the work you are putting into TAKE and GIVE.
    The "Find" operation allows a slightly optimized sort of compare
    operation for capabilities. The process's C-list is searched, starting
    at the passed index, for the passed capability until either:

    1. The passed capability is found in the C-list. In this case, the
    operation returns "Yes" and the first index where the capability was
    found, or

    2. The count is exhausted. In this case the operation returns "No" and
    the passed index plus count.
    Why are you bothering with a list?
    Why are you even bothering with an index?
    The implementation I gave you has the capabilities enumerated; you would add an operation to the capabilities package:
    Function Has( Object : Instance; Permission : Capability) return Boolean is Begin
    Return Object.Permissions( Permission ); -- Just use the enumeration-index of the permissions field.
    End Has;
    Done.


    in addition there is a Nil Capability:
    Nil Capability: When a process is initially created its C-list
    contains only Nils. These are empty place holders. Nil always returns "Empty".
    This... sounds like you are not understanding, at all, the Ada code I presented you.
    Look at the creation function No_Permissions.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to onewingedshark@gmail.com on Thu Oct 14 18:38:16 2021
    On Thu, 14 Oct 2021 08:16:30 -0700 (PDT), Shark8
    <onewingedshark@gmail.com> wrote:

    On Wednesday, October 13, 2021 at 9:46:34 PM UTC-6, Doctor Who wrote:
    On Tue, 12 Oct 2021 08:01:26 -0700 (PDT), Shark8
    On Monday, October 11, 2021 at 1:24:48 PM UTC-6, Doctor Who wrote:
    On Mon, 11 Oct 2021 16:32:13 +0100, Simon Wright wrote:
    Doctor Who writes:

    someone knows how to introduce the capabilities paradigm in Ada,
    specifically for programs written using the Ravenscar profile ?

    Google hasn't helped me to understand what you're getting at. Perhaps
    you could expand?
    wikipedia has a good explanation:
    https://en.wikipedia.org/wiki/Capability-based_security
    Ah.
    Limited Private, unknown-discriminant types.

    Package Capabilities is
    -- Enumeration of the particular capabilities.
    Type Capability is ( Read, Copy, Whatever );
    -- A Boolean set for delineating a set of Capabilities.
    Type Capability_List is Array(Capability) of Boolean;
    -- An instance of a set of capabilities; note that:
    -- (1) LIMITED means there is no predefined assignment/copy.
    -- (2) PRIVATE means there is no public view to the components.
    -- (3) Unknown discriminants mean there is no object-creation w/o a function-call.
    Type Instance(<>) is limited private;
    -- Create an instance; add any other needed parameters.
    Function Create( Capabilities : Capability_List ) return Instance;
    -- No permissions.
    Function No_Permissions return Instance;
    Private
    Type Instance is record
    Permissions : Capability_List:= (raise Program_Error with "Capabilities-Instance must be initialized.");
    -- (others => False); -- Or maybe default to no permissions.
    -- OTHER DATA, IF NEEDED; PERHAPS TASK-/PROCESS-ID.
    End record;

    Function Create( Capabilities : Capability_List ) return Instance is
    ( Permissions => Capabilities );
    Function No_Permissions return Instance is
    ( Create( Capability_List'(others => False) ) );
    End Capabilities;

    You could also extend things with a Task-ID, assuming you want this prevalent/pervasive across the OS, you could make a TASK INTERFACE with an accessor (Function Get_Capabilities(Task : OS_Task_Interface) return Capabilities.Instance is (Capabilities.
    No_Permissions); -- Override to give permissions.) and/or possibly a registry to manage permissions (on a finer-grained level) if you need it. A lot depends on how you architect/model it, but the "limited private unknown-discriminant type" perfectly fits
    what you need at the fundamental levels.
    a Process Capability looks like this:

    Operations:
    a. "Read", address; > data;
    b. "Write", address, data; > ;
    c. "Take", index; > ; capability
    d. "Give", index; capability > ;
    e. "Find", index, count; capability > result, index;
    f. "Start"; > ;
    g. "Stop"; > ;
    Does it?
    Why?
    Or is this just one possible implementation of 'capabilities' operations?

    it is the one I would like to implement.


    Operations on a type correspond to subprograms in Ada; nothing you present seems (at first glance) incompatible with the structure/types I gave you.

    exactly



    Semantics: The "Read" and "Write" operations allow access to the
    process's memory. For example, in the "Read" operation, the literal
    string "Read" (or a recognizable OP code) is passed along with an
    address. The data word at the address is returned.
    I think you're jumping the gun.
    You need to have a good model, and why are you jumping straight into implementation?

    http://www.webstart.com/jed/papers/DCCS/


    (Literal string? Recognizable OP code? -- All implementation details; forget them right now, concentrate on the modeling of the problem, not the details of how to implement, and AFTER getting the model down, THEN consider code.)
    The "Give" and "Take" operations allow access to the process's C-list.
    For example, the "Give" operation passes the string "Give", an index
    into the C-list, and a capability to be stored at the passed index.
    Such a stored capability could be invoked by the process if it were
    "Start"ed.
    This part of your explanation makes it sound like you do not understand the code I presented, or the reasoning behind it; forgive me for poorly communicating it.
    The reason you want a "limited private type with unknown discriminants" is because:
    1) It hides the implementation, meaning clients cannot alter it indiscriminately.
    2) It prohibits automatic initialization, forcing the usage of an initialization subprogram.
    3) It forces usage of the public interface for clients, private details can manipulate it though.
    4) Any public operations, again, have to go through the public interface.
    5) Copying is strictly prohibited, hence "limited".

    In the model I had envisioned the Capabilities-list (Capabilities.Instance) would be an integral part of the TASK, and there would likely be a Get_Capabilities function which would return the proper value, some set-operations, and a new creation-
    function:
    Function Create( Object : OS_Task_Interface; Capabilities : Capability_List ) return Instance is
    Parent : Instance renames Get_Capabilities( Object );
    Caps : Capability_List renames Parent.Permissions;
    Begin
    Return Intersect( Caps, Capabilities ); -- The granted capabilities cannot be ones the parent does not have, nor may it be ones not requested.
    End Create;
    The above, I think, does the work you are putting into TAKE and GIVE.
    The "Find" operation allows a slightly optimized sort of compare
    operation for capabilities. The process's C-list is searched, starting
    at the passed index, for the passed capability until either:

    1. The passed capability is found in the C-list. In this case, the
    operation returns "Yes" and the first index where the capability was
    found, or

    2. The count is exhausted. In this case the operation returns "No" and
    the passed index plus count.
    Why are you bothering with a list?
    Why are you even bothering with an index?
    The implementation I gave you has the capabilities enumerated; you would add an operation to the capabilities package:
    Function Has( Object : Instance; Permission : Capability) return Boolean is >Begin
    Return Object.Permissions( Permission ); -- Just use the enumeration-index of the permissions field.
    End Has;
    Done.


    in addition there is a Nil Capability:
    Nil Capability: When a process is initially created its C-list
    contains only Nils. These are empty place holders. Nil always returns
    "Empty".
    This... sounds like you are not understanding, at all, the Ada code I presented you.
    Look at the creation function No_Permissions.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Wright@21:1/5 to Doctor Who on Thu Oct 14 22:20:54 2021
    Doctor Who <doc@tardis.org> writes:

    http://www.webstart.com/jed/papers/DCCS/

    Not the most understandable of papers. Haven't things improved since 1976?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Doctor Who@21:1/5 to All on Fri Oct 15 13:21:52 2021
    On Thu, 14 Oct 2021 22:20:54 +0100, Simon Wright <simon@pushface.org>
    wrote:

    Doctor Who <doc@tardis.org> writes:

    http://www.webstart.com/jed/papers/DCCS/

    Not the most understandable of papers. Haven't things improved since 1976?


    Yes!
    but this is a basic concept that has been carried on in the years.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)