B W Lampson(1971)-Protection-Original.pdf

Embed Size (px)

Citation preview

  • 8/9/2019 B W Lampson(1971)-Protection-Original.pdf

    1/7

    T h e f o l l o w i n g p a p e r b y B u t l e r L a m p s o n h a s b e e n f r e q u e n t l y r e f e r -

    e n c e d . B e c a u s e t h e o r i g i n a l i s n o t w i d e l y a v a i l a b l e , w e a r e r e -

    p r i n t i n g i t h e r e . I f t h e p a p e r i s r e f e r e n c e d i n p u b l i s h e d w o r k ,

    in

    h e c i t a t i o n s h o u l d r e ad : L a m p s o n , B . W . , P r o t e c t i o n ,

    P r o c. F i f t h P r i n c e t o n S y m p o s i u m o n I n f o r m a t i o n S c i e n c e s a n d

    S y s t e m s , P r i n c e t o n U n i v e r s i t y , M a r c h 19 7 1, p p. 4 3 7 - 4 4 3 , r e p r i n t e d

    i n O p e r a t i n g S y s t e m s R e v i e w , 8 , 1, J a n u a r y 1 9 7 4 , p p . 1 8 - 2 4 .

    P R O T E C T I O N

    Butler W. Lampson

    X e r o x C o r p o r a t i o n

    P a l o A l to , C a l i f o r n i a

    A b s t r a c t : A b s t r a c t m o d e l s a r e g i v e n w h i c h r e f l e c t t h e

    p r o p e r t i e s o f m o s t e x i s t i n g m e c h a n i s m s f o r e n f o r c i n g

    p r o t e c t i o n o r a c c e s s c o n t r o l, t o g e t h e r w i t h s o m e

    p o s s i b l e i m p l e m e n t a ti o n s . T h e p r o p e r t i e s o f e x i s t i n g

    s y s t e m s a r e e x p l i c a t e d i n t e r m s o f t h e m o d e l a n d

    i m p l e m e n t a t i o n s .

    I n t r o d u c t i o n

    ' Protection' is a gener al term for all the

    m e c h a n i s m s w h i c h c o n t r o l t h e a c c e s s o f a p r o g r a m

    to other things i n the system. There is an im-

    m e n s e v a r i e t y o f s u c h m e c h a n i s m s . I n d ee d , i t i s

    normal for a single system to have a number of

    d i f f e r e n t a n d u n r e l a t e d o n e s : f o r e x a m pl e , a

    s u p e r v i s o r / u s e r m o d e , m e m o r y r e l o c a t i o n a n d

    b o u n d s r e g i s t e r s , s o m e k i n d o f f i l e n u m b e r s f o r

    o p e n f i l e s , a c c e s s c o n t r o l b y u s e r t o f i l e d i r e c -

    t o r i e s, a n d a p a s s w o r d s c h e m e f o r i d e n t i f i c a t i o n

    at logor. It theref ore seems desir able to take

    a rather ab strac t app roach to the subj ect.

    M a t t e r s a r e s o m e w h a t c o n f u s e d b y th e f a c t

    t h a t a s y s t e m c a n b e c o m p l e t e f r o m t h e p o i n t o f

    v i e w o f a c o m m u n l t y o f f r i e n d l y a n d i n f a l l i b l e

    u s e r s , w i t h o u t a n y p r o t e c t i o n a t a l l . T h i s o b -

    servat ion should not, however, be taken to imply

    t h a t p r o t e c t i o n i s a m i n o r c o n s i d e ra t i o n . O n t h e

    c o n t r a r y , r e a l u s e r s a r e f a r f r o m i n f a l l i b l e , n o t

    t o m e n t i o n t h e i r p r o g r a m s , a n d p r i v a c y i s a c r u -

    cial issue in most real systems. A s a result,

    p r o t e c t i o n c o n s i d e r a t i o n s a r e p e r v a s i v e i n a n y

    system design.

    T h e o r i g i n a l m o t i v a t i o n f o r p u t t i n g p r o t e c -

    t i o n m e c h a n i s m s i n t o c o m p u t e r s y s t e m s w a s to k e e p

    o n e u s e r ' s m a l i c e o r e r r o r f r o m h a r m i n g o t h e r

    u s e rs . H a r m c a n b e i n f l i c t e d i n s e v e r a l w ay s :

    a ) b y d e s t r o y i n g o r m o d i f y i n g a n o t h e r

    user' s data;

    b ) b y r e a d i n g o r c o p y i n g a n o t h e r u s e r ' s

    d a t a w i t h o u t p e r m i s s i o n ;

    c ) b y d e g r a d i n g t h e s e r v i c e a n o t h e r u s e r

    gets, e.g. us ing up all the disk space

    o r g e t t i n g m o r e t h a n a f a i r s h a r e o f

    t h e p r o c e s s i n g t i m e. A n e x t r e m e c a s e

    i s a m a l i c i o u s a c t Q r a c c i d e n t w h i c h

    c r a s h e s t h e s y s t e m - t hi s m i g h t b e

    c o n s i d e r e d t h e u l t i m a t e d e g r a d a t i o n .

    M o r e r e c e n t l y i t h a s b e e n r e a l i z e d t h a t a l l

    o f t h e a b o v e r e a s o n s f o r w a n t i n g p r o t e c t i o n a r e

    j ust as strong if the word ' user' is repla ced by

    ' program' . This line of thinkin g leads in two

    m a i n d i r e c t i o n s :

    a ) t o w a r d s e n f o r c i n g t h e r u l e s o f m o d u l a r

    p r o g r a m m i n g s o t h a t i t i s p o s s i b l e , u s -

    i n g t h e p r o t e c t i o n s y s t e m , t o g u a r a n t e e

    t h a t e r r o r s i n o n e m o d u l e w i l l n o t a f f e c t

    a n o t h e r o n e . W i t h t hi s k i n d o f c o n t r o l

    i t i s m u c h e a s i e r t o g a i n c o n f i d e n c e i n

    t h e r e l i a b i l i t y o f a l a r g e s y s t e m , s i n c e

    t h e p r o t e c t i o n p r o v i d e s f i r e w a l l s w h i c h

    p r e v e n t t h e s p r e a d o f t r o u b l e [ 4 ,9 ] ;

    b ) t o w a r d s t h e s u p p o r t o f p r o p r i e t a r y p r o -

    grams, so that a user ca n buy a service

    i n t h e f o r m o f a p r o g r a m w h i c h h e c a n

    only call, but not read [ 9] . A simple

    e x a m p l e m i g h t b e a p r o p r i e t a r y c o m -

    p i l e r w h o s e s e r v i c e i s s o l d b y n u m b e r o f

    s t a t e m e n t s c o m p i l ed . A m o r e c o m p l e x

    c a s e i s a p r o g r a m w h i c h r u n s t e s t c a s e s

    a g a i n s t a p r o p r i e t a r y d a t a b a s e a s we l l .

    A n o t h e r e x a m p l e m a y s u g g e s t t h a t s o m e g e n e r -

    a l i t y i s r e a l l y r e q u i r e d t o h a n d l e t h o s e p r o b l e m s ,

    r a t h e r t h a n a f e w a d ho c m e c h a n i s m s ~ T h i s i s t h e

    c o n s t r u c t i o n o f a r o u t i n e t o h e l p i n t h e d e b u g g i n g

    o f o t h e r p r o g ra m s . S u c h a d e b u g g e r n e e d s t o b e

    a b l e t o d o a l l t h e t h i n g s w h i c h t h e p r o g r a m b e i n g

    d e b u g g e d c a n d o , b u t m u s t p r o t e c t i t s e l f a n d i t s

    data ( breakpoints, symbol tables, etc.) from de-

    s t r u c t i o n b y m a l f u n c t i o n s i n t h e p r o g r a m b e i n g

    debugged [ 8,9] .

    T h e m o d e l s f o r p r o t e c t i o n s y s t e m s w h i c h o c -

    c u p y t h e b o d y o f t h i s p a p e r a r e a r r a n g e d i n o r d e r

    o f d e c r e a s i n g g e n e r a l i t y a n d i n c r e a s i n g c o m p l e x i t y .

    I t is n o t cl e a r w h e t h e r t o t a k e t h i s c o r r e l a t i o n

    a s a c a u s e f o r s a t i s f a c t i o n o r f o r d e s p a ir .

    - 1 8 -

  • 8/9/2019 B W Lampson(1971)-Protection-Original.pdf

    2/7

    P r o t e c t i o n D o m a i n s

    T h e f o u n d a t i o n o f a n y p r o t e c t i o n s y s t e m i s

    t h e i d e a o f d i f f e r e nt p r o t e c t i o n e n v i r o n m e n ts o r

    c o n t e x t s . D e p e n d i n g o n t h e c o n t e x t i n w h i c h a

    p r o c e s s f i n d s i t s e l f , i t h a s c e r t a i n p o w e r s ;

    d i f f e r e n t c o n t e x t s h a v e d i f f e r e n t p o w e r s . A s i m -

    p l e e x a m p l e o f a t w o - c o n t e x t s y s t e m i m p l em e n t e d

    i n h a r d w a r e i s a n y c o m p u t e r w i t h s u p e r v i s o r a n d

    u s e r o r p r o b l e m s t a t e s . A p r o g r a m in s u p e r v i s o r

    s t a t e c a n e x e c u t e I / o i n s t r u c t i o n s , s e t t h e m e m -

    o r y p r o t e c t i o n r e g i s t e r s , h a l t t h e m a c h i n e , e t c.

    I n u s e r s t a t e t h e s e p o w e r s a r e d e n i e d t o i t. A

    s o m e w h a t m o r e e l a b o r a t e e x a m p l e i s 0 S / 3 60 M VT ,

    w h e r e t h e r e i s o n e s u p e r v i s o r c o n t e x t a n d u p t o ~

    1 5 u s e r c o n t e x t s ; t h e l i m i t o f 1 5 i s e n f o r c e d b y

    t h e u s e o f 4 - b i t k e y s i n t h e 3 60 ' s m e m o r y p r o t e c -

    t i o n sy s t e m . S t i l l a n o t h e r e x a m p l e is i n d i v i d u a l

    u s e r s o f a m u l t i - a c c e s s s y s t e m - - e a c h o n e h a s h i s

    o w n p r o t e c t e d p r o g r a m a n d f i l e s , s o t h a t t h e r e a r e

    a t l e a s t a s m a n y p r o t e c t i o n c o n t e x t s a s t h e r e a r e

    u s e r s [1 5].

    T h e v a r i e t y o f t h e s e e x a m p l e s i s i n t e n d e d t o

    s u g g e s t t h e g e n e r a l i t y a n d s u b t l e t y o f t h e id e a .

    M a n y w o r d s h a v e a t t e m p t e d t o c a p tu r e i t : p r o t e c -

    t i o n c o n t e x t , e n v i r o n m e n t , s t a t e o r s p h e r e [ 3] ,

    c a p a b i l i t y l i s t [ I 0] , r i n g [ 4 ], d o m a i n [ 9 ] . T h e

    r e l a t i v e l y n e u t r a l w o r d ' d o m a in ' w i l l b e u s e d

    h e r e , s i n c e i t h a s f e w e r m i s l e a d i n g a s s o c i a t i o n s

    t h a n a n y a l t e r n a t i v e . A n i d e a l i z e d s y st e m c a l l e d

    t h e m e s s a g e s _ v st e m i s d e s c r i b e d b e l o w i n o r d e r t o

    c l a r i f y t h e m e a n i n g o f t h i s t e r m a n d p r o v i d e a

    f r a m e w o r k f o r t h e d e s c r i p t i o n o f r e a l s y s t e m s .

    T h e m e s s a g e s y s t e m c o n s i s t s o f pr o c e s s e s

    w h i c h s h a r e n o t h i n g a n d c o m m u n i c a t e w i t h e a c h

    o t h e r o n l y b y m e a n s o f m e s s a g e s . A m e s s a g e c o n -

    s i s t s o f a n i d e n t i f i c a t i o n o f t h e s e n d i n g p r o c e ss

    f o l l o w e d b y a n a r b i t r a r y a m o u n t o f d a t a . T h e

    i d e n t i f i c a t i o n i s s u p p l i e d b y t he s y s t e m a n d

    t h e r e f o r e c a n n o t b e f o r g e d . P r o c e s s e s a r e

    a s s i g n e d i n t e g e r n a m e s b y t h e s y s t e m i n s u c h a

    w a y t h a t a g i v e n i n t e g e r a l w a y s r e f e r s t o t h e

    s a m e p r o ce s s ; a s i d e f r o m t h i s p r o p e r t y t h e n a m e s

    h a v e n o s i g n i f i c a n c e . T h e d a t a is s u p p l i e d b y

    t h e s e n d i n g p r o c e s s. A n y p r o c e s s m a y s e n d m e s -

    s a g e s ( at i t s e x p e n s e ) t o a n y o t h e r p r o c e s s .

    M e s s a g e s a r e r e c e i v e d o n e a t a t i m e i n t h e o r d e r

    i n w h i c h t h e y w e r e s e n t. S e e [ 5] f o r a n a c t u a l

    s y s t e m v e r y s i m i l a r t o t h i s o n e, b u t d e s c r i b e d

    f r o m a s o m e w h a t d i f f e r e n t v i e w p o i n t .

    W i t h i n t h i s s y s t e m e v e r y t h i n g b e l o n g s t o

    s o m e p r o c e s s a n d c a n n o t b e a c c e s s e d b y a n y p r o-

    c e s s o t h e r t h a n i t s o w n e r . E a c h p r o c e s s i s t h e r e -

    f o r e a s i n g l e d o m a i n . I t c a n a l s o b e v i e w e d a s a

    s e p a r a t e m a c h i n e , c o m p l e t e w i t h m e m o r y , f i l e s t o -

    r a g e , t a p e u n i t s , e t c . , a n d i s o l a t e d b y h a r d w a r e

    f r o m a l l o t h e r p r o c e s s e s e x c e p t f o r t h e m e s s a g e

    t r a n s m i s s i o n s y s t e m d e s c r i b e d a b o v e . T h i s

    s c h e m e p r o v i d e s a l o g i c a l l y c o m p l e t e ( t h o u g h in

    g e n e r a l r a t h e r i n e f f i c i e nt ) p r o t e c t i o n s y s t e m

    ( e x c e p t f o r t w o p o i n t s w h i c h a r e d i s c u s s e d b e -

    l o w ) . L e t us e x a m i n e w h a t c a n be d o n e w i t h i t i n

    o r d e r t o b r i n g o u t i t s e s s e n t i a l f e a t u r e s .

    T h e f i r s t p o i n t ( w h i c h h a s n o t h i n g t o d o

    w i t h p r o t e c t i o n ) i s t h a t w e c a n s i m u l a t e a s u b -

    r o u t i n e m e c h a n i s m i n ' t h i s s y s t e m , v i e w i n g o n e p r o -

    c e s s ( A ) a s t h e c a l l i n g r o u t i n e a n d a n o t h e r (B)

    a s t h e r o u t i n e b e i n g c a l l e d . T o c a l l B, A se n d s

    B a m e s s a g e s p e c i f y i n g t h e p a r a m e t e r s a n d t h e n

    w a i t s f o r B t o r ep l y . T o r e t u rn , B r e p l i e s w i t h

    a n o t h e r m e s s a g e c o n t a i n i n g t h e v a l u e , i f a n y , a n d

    t h e n w a i t s f o r a n o t h e r c a l l .

    W e n o w o b s e r v e t h a t u n l i k e a n o r d i n a r y s u b -

    r o u t i n e c a l l , t h i s w o r k s e v e n i f B m u s t b e p r o -

    t e c t e d f r o m A , e . g . i f B i s t h e s u p e r v i s o r a n d A

    a u s e r p r o g r a m . I t w o r k s b e c a u s e B d e t e r m i n e s

    w h e r e h e i s ' e n t e r e d ' , n a m e l y a t t h e p o i n t w h e r e

    h e w a i t s f o r A ' s me s s a g e . R a n d o m t r a n s f e r s o f

    c o n t r o l t o a n a r b i t r a r y p o i n t i n B a r e n o t p o s -

    s i b le . T h i s i s n o t t o s a y t h a t m u l t i p l e e n t r y

    p o i n t s a r e n o t p o s s i b l e , s i n c e B c a n d e c o d e o n e

    o f t h e p a r a m e t e r s t o s e l e c t a n e n t r y p o i n t.

    F u r t h e r m o r e , t h e ' r e t u r n ' i s a l s o p r o t e c t e d .

    T h u s , i f A m i s t r u s t s B , e . g . i n t h e c a s e o f a

    c o m m a n d p r o c e s s o r c a l l i n g a u s e r p r o g r a m , t h e

    s a m e a r g u m e n t s h o w s t h a t B w i l l n o t b e a b l e t o

    r e t u r n t o A e x c e p t i n t h e m a n n e r i n t e n d e d b y A .

    S p u r i o u s a d d i t i o n a l ' r e t u r ns ' ( e x t r a m e s s a g e s )

    f r o m B a r e e q u a l l y i m p o s s i b l e , s i n c e A k n o w s

    w h e n h e i s e x p e c t i n g a r e t u r n m e s s a g e f r o m B a n d

    c a n i g n o r e m e s s a g e s a t o t h e r t i m e s . T h e s c h e m e

    c l e a r l y w o r k s e v e n i f e a c h d o m a i n m i s t r u s t s t h e

    o t h e r , a s i n t h e c a s e o f c a l l i n g a p r o p r i e t a r y

    p r o g r a m [i 0].

    W h a t i f A c a l l s B b y t h i s m e c h a n i s m a n d B

    n e v e r r e t u r n s , e i t h e r b e c a u s e B h a s a b u g o r b e -

    c a u s e h e i s m a l i c i o u s ? I f A w i s h e s t o g u a r d

    a g a i n s t t h i s p o s s i b i l i t y , h e n e e d o n l y a r r a n g e ,

    b e f o r e c a l l i n g B , to r e c e i v e a m e s s a g e f r o m s o m e

    r e l i a b l e s y s t e m p r o c e s s C a f t e r a c e r t a i n a m o u n t

    o f t i m e h a s e l a p s e d w h i c h i s l o n g e r t h a n B i s

    e x p e c t e d t o r u n . I f t h e m e s s a g e A r e c e i v e s n e x t

    i s f r o m C r a t h e r t h a n f r o m B , t h e n A k n o w s s o m e -

    t h i n g h a s g o n e w r o n g a n d c a n p r o c e e d t o t a k e

    c o r r e c t i v e a c t i o n .

    F i n a l l y , s u p p o s e t h a t s o m e u n a u t h o r i z e d d o -

    m a i n Y a t t e m p t s t o c a l l B . R e c a l l t h a t a s p a r t

    o f e a c h m e s s a g e t h e s y s t e m s u p p l i e s t h e i d e n t i t y

    ( na me ) o f t h e c a l l e r . T h i s i d e n t i f i c a t i o n m a y

    b e t h o u g h t o f a s a s i g n a t u r e, a s e a l, a b a d g e ,

    e t c ., w h i c h B c a n u s e t o c h e c k t h e v a l i d i t y o f

    - 1 9 -

  • 8/9/2019 B W Lampson(1971)-Protection-Original.pdf

    3/7

    t h e c a l l . T h e e s s e n t i a l p o i n t i s t h a t t h e i d e n -

    t i f i c a t i o n i s s u p p l i e d b y t h e s y s t e m , w h i c h

    g u a r a n t e e s t h a t it c a n n o t b e f o rg e d . T h i s p o i n t

    i s s o s i m p l e , a n d y e t s o s u bt l e , t h a t w e w i l l

    i l l u s t r a t e i t w i t h a n e x a m p l e . S u p p o s e t h a t A ,

    w h o s e n a m e i s 63 8 9 , s e n d s t o B a m e s s a g e c o n s i s t - .

    i n g o f t h r e e n u m b e r s : 3 1 , ~5, 9 . W h a t B w i l l

    r e c e i v e i s f o u r n u m b e r s : 63 8 9 , 3 1 , 45, 9 . T h e

    f i r s t n u m b e r i s s u p p l i e d b y t h e s y s t e m f r o m i t s

    k n o w l e d g e o f t h e i d e n t i t y o f t h e s e n d e r . T h e r e

    i s n o w a y f o r A t o a f f e c t t h e v a l u e o f t h e f i r s t

    n u m b e r i n t h e m e s s a g e . F r o m B ' s p o i n t o f v i e w

    t h e n , t h e m e s s a g e s t a r t s w i t h a s i n g l e i d e n t i f y -

    i n g i n t e g e r . I f B i s e x p e c t i n g a m e s s a g e f r o m A ,

    a l l h e n e e d s t o d o f o r e a c h m e s s a g e i s t o c h e c k

    t h a t it s t a r t s w i t h A ' s n a m e . H o w B g e t s t o k n o w

    A ' s n a m e i s a n i n t e r e s t i n g q u e s t i o n w h i c h w i l l b e

    p u r s u e d b e l o w , b u t f o r t he m o m e n t p e r h a p s t h e

    f o l l o w i n g s i m p l e s c h e m e w i l l s u f f i c e : A ' s u s e r a t

    h i s t e r m i n a l a s k s A f o r t h e n u m b e r a n d s h o u t s i t

    a c r o s s t h e r o o m t o B ' s u s e r, w h o t y p e s i t i n t o B .

    R e m e m b e r t h a t t h i s n u m b e r i s no t a p a s s w o r d .

    K n o w i n g i t a l l o w s B t o g i v e A a c c e s s , b u t d o e s

    n o t h e l p a n y o n e e l s e ( i n c l u d i n g B ) t o i m p e r s o n a t e

    A , a s t h e d e s c r i p t i o n o f m e s s a g e h a n d l i n g g i v e n

    a b o v e s h o u l d m a k e p e r f e c t l y c l e a r .

    T h e k i n d o f p r o t e c t i o n o r a c c e s s c o n t r o l

    w h i c h c a n b e e n f o r c e d w i t h t h i s s y s t e m i s e x t r e m e -

    l y f l ex i b l e a n d g e n e r a l , s i n c e a r b i t r a r y p r o g r a m s

    c a n b e w r i t t e n b y u s e r s t o m a k e t h e p r o t e c t i o n d e -

    c i s i o n s . S u g g e s t e d e x e r c i s e : s h o w h o w a n i n s t r u c -

    t o r c o u l d i m p l e m e n t a g r a d i n g p r o g r a m w h i c h g i v e s

    s t u d e n t p r o g r a m s a t m o s t t h r e e t r i e s a t o b t a i n i n g

    a c o r r e c t a n s w e r .

    A s w a s m e n t i o n e d e a r l i e r , t h e s y s t e m w e h a v e

    b e e n d e s c r i b i n g h a s t w o m a j o r f l a w s :

    a ) I t i s i m p o s s i b l e t o r e t a i n c o n t r o l o v e r

    a r u n a w a y p r o c e s s , s i n c e t h e r e i s n o w a y

    t o f o r c e a p r o c e s s t o d o a n y t h i n g , o r t o

    d e s t r o y i t. A l t h o u g h s u c h a p r o c e s s c a n -

    n o t d o a n y d a ma g e , i t c a n w a s t e r e s o u r c e s .

    T h i s m a k e s d e b u g g i n g d i f f i c u l t .

    b ) A n e l a b o r a t e s y s t e m o f c o n v e n t i o n s i s

    r e q u i r e d t o g e t p r o c e s s e s t o c o o p e r a t e .

    S u p p o s e , f o r e x a m p l e , t h a t p r o c e s s A h a s

    s o m e d a t a w h i c h i t w a n t s t o s h a r e w i t h

    s e v e r a l o t h e r p r o c e s s e s b e l o n g i n g t o

    f r i e n d s o f t h e u s e r w h o o w n s p r o c e s s A .

    I t i s n e c e s s a r y f o r A ' s o w n e r ( w h o m w e

    t h i n k o f a s a n o t h e r p r o c e s s c o m m u n i c a t -

    i n g w i t h A v i a a t e r m i n al ) t o f i n d o u t

    t h e n a m e s o f h i s f r i e n d s ' p r o c e s s e s a n d

    t o p u t s o m e p r o g r a m i n t o A w h i c h k n o w s

    t h e s e n a m e s a n d r e s p o n d s a p p r o p r i a t e l y

    t o m e s s a g e s c a r r y i n g t h e s e n a m e s a s

    i d e n t i f i c a t i o n . I n a d d i t i o n , A a n d i t s

    c o r r e s p o n d e n t s m u s t a g r e e o n t h e i n t e r -

    p r e t a t i o n o f me s s a g e s .

    T h e m e s s a g e s y s t e m i s a s b a r e o f c o n v e n i e n c e

    a s a c e n t r a l p r o c e s s o r i s fo r e x e c u t i n g p r o g r a m s .

    T h e p r o c e s s o r n e e d s a n e l a b o r a t e s y s t e m o f c o n -

    v e n t i o n s i n t h e f o r m o f l o a d e r s , b i n a r y f o r m a t s ,

    a s s e m b l e r s , e t c . , t o m a k e i t u s a b l e , a n d t h e s e

    a p p u r t e n a n c e s q u i c k l y t a k e o n a l i f e o f t h e i r o w n .

    T h e s a m e t h i n g m u s t h a p p e n t o o u r p r i m i t i v e p r o -

    t e c t i o n s y s t e m . S o m e o f t h e i s s u e s r a i s e d b y

    t h e s e t w o p o i n t s a r e d i s c u s s e d i n t h e n e x t s e c -

    t i o n .

    O__bje ct s a n d A c c e s s M a t r i c e s

    I n o r d e r t o p r o v i d e f a c i l i t i e s f o r c o n t r o l -

    l i n g p r o c e s s e s f r o m o u t s i d e , i t i s n e c e s s a r y t o

    h a v e a s y s t e m a t i c w a y o f c o n t r o l l i n g a c c e s s t o o n e

    p r o c e s s f r o m o t h e r s . I n o r d e r t o p r o v i d e u s e f u l

    c o n v e n t i o n s f o r s h a r i n g a m o n g p r o c e s s e s , i t i s

    n e c e s s a r y t o h av e a s y s t e m a t i c w a y o f d e s c r i b i n g

    w h a t i s t o b e s h a r e d a n d o f c o n t r o l l i n g a c c e s s t o

    s h a r e d t h i n g s f r o m v a r i o u s p r o c e s s e s. A c c e s s t o

    p r o c e s s e s c a n b e c o n t r o l l e d b y a s i m p l e t r e e s t r u c -

    t u r e [ 5 ,8 ] , b u t i t ca n a l s o b e h a n d l e d m o r e g e n e r -

    a l l y b y t h e s a m e m a c h i n e r y w h i c h w e w i l l e s t a b l i s h

    t o s o l v e t h e s e c o n d p r o b l e m . ( I t i s n o t a t a l l

    c l e a r t h a t t h e s c h e m e d e s c r i b e d b e l o w i s t h e o n l y ,

    o r e v e n t h e b e s t , s e t o f c o n v e n t i o n s t o i m p o s e ,

    b u t i t d o e s h a v e t h e p r o p e r t y t h a t a l m o s t a l l t h e

    s c h e m e s u s e d i n e x i s t i n g s y s t e m s a r e s u b s e t s o f

    t h i s o n e . )

    T h i s m a c h i n e r y c a n b e d e s c r i b e d i n t e r m s o f

    a n o t h e r i d e a l i z e d s y s t e m c a l l e d t h e o b j e c t s y s t e m.

    I t ha s t h r e e m a j o r c o m p o n e n t s : a s e t o f o b ~ c t s

    w h i c h w e w i l l c a l l X , a s e t o f d o m a i n s w h i c h w e

    w i l l c a l l D , a n d a n a c c e s s m a t r i x o r a c c e s s f u n c -

    t i o n w h i c h w e w i l l c a l l A . O b j e c t s a r e t h e t h i n g s

    i n t h e s y s t e m w h i c h h a v e t o b e p r o t e c t e d . T y p i c a l

    o b j e c t s i n e x i s t i n g s y s t e m s a r e p r o c e s s e s , d o -

    m a i n s , fi l e s , s e g m e n t s , a n d t e r m i n a l s . L i k e

    e v e r y t h i n g w e a r e d e s c r i b i ng , t h e c h o i c e o f o b -

    j e c t s i s a m a t t e r o f c o n v e n t i o n , t o b e d e t e r m i n e d

    b y t h e p r o t e c t i o n r e q u i r e m e n t s o f e a c h s y st e m .

    O b j e c t s h a v e n a m e s w i t h g l o b a l v a l i d i t y , w h i c h w e

    w i l l t h i n k o f a s 6 4 - b i t i n t e g e r s . O b j e c t n a m e s

    a r e h a n d e d o u t b y t h e p r o t e c t i o n s y s t e m o n d e m a n d,

    a n d t h e i r i n t e r p r e t a t i o n i s u p t o t h e p r o g r a m s

    w h i c h o p e r a t e o n th e o b j e c t s . T h i s p o i n t i s

    s u p p o s e d t o b e c l a r i f i e d b y t h e f i l e - h a n d l e r

    e x a m p l e b e l o w .

    D o m a i n s w e r e i n t r o d u c e d i n t h e p r e v i o u s s e c -

    t i o n . T h e y a r e t h e e n t i t i e s w h i c h h a v e a c c e s s t o

    o b j e c t s . T h e e s s e n t i a l p r o p e r t y o f a d o m a i n i s

    t h a t i t h a s p o t e n t i a l l y d i f f e r e n t a c c e s s t h a n

    o t h e r d o m a i n s . I n t h e m e s s a g e s y s t e m , e a c h d o m a i n

    w a s a l s o a p r o c e s s a n d h a d e x c l u s i v e a c c e s s t o i t s

    - 2 0 -

  • 8/9/2019 B W Lampson(1971)-Protection-Original.pdf

    4/7

    o ~ n o b j e c t s a n d n o n e t o a n y o t h e r s . T h i s i d e a i s

    n o w b e i n g g e n e r a l i z e d s o t h a t o b j e c t s c a n b e

    s h a r e d b e t w e e n d o m a i n s . T h e r e a r e a c t u a l l y t w o

    w a y s t o l o o k a t t h i s g e n e r a l i z a t i o n .

    a ) e a c h d o m a i n o w n i n g o b j e c t s i n t h e m e s -

    s a g e s y s t e m a g r e e s b y c o n v e n t i o n t h a t

    i t w i l l d o c e r t a i n t h i n g s w i t h t h e s e

    o b j e c t s u p o n d e m a n d f r o m s o m e o t h e r

    d o m a i n , p r o v i d e d t h e o t h e r d o m a i n h a s

    a c c e s s a c c o r d i n g t o th e r u l e s be l o w .

    b ) a t l e a s t f o r c e r t a i n ' b u i l t -i n ' o b j e c t s

    t h e a c c e s s r u l e s b e l o w w i l l b e e n f o r c e d

    b y t h e u n d e r l y i n g m a c h i n e r y w h i c h i m -

    p l e m e n t s t h e s y s t e m ( w h e t h e r t h i s i s

    h a r d w a r e , a s i n t h e c a s e o f m e m o r y p r o -

    t e c t i o n , o r s o f t w a r e , a s i n t h e c a s e o f

    f i l e d i r e c t o r i e s , i s n o t i m p o r t a nt ) .

    T h i s v i e w p o i n t m a y l e a d to g r e a t e r e f f i -

    c i e n c y ( m e m o r y p r o t e c t i o n i s a n e x t r e m e

    e x a m p l e ) b u t i t i s c l e a r l y n o t a s g e n e r a l

    a n d m u s t b e s u p p l e m e n t e d b y a ) i f t h e

    s y s t e m i s t o b e ex t e n s i b l e . A s f a r a s

    t h e p r o t e c t i o n s y s t e m i s c o n c e r n e d , i t

    m a k e s n o d i f f e r e n c e w h i c h v i e w i s t ak e n .

    N o t e t h a t d o m a i n s a r e o b j e c t s , a n d t h a t o b -

    j e c t s d o n o t ' l i v e in ' o r ' b e l o n g to ' d o m a i n s .

    T h e a c c e s s o f d o m a i n s t o o b j e c t s i s d e t e r -

    m i n e d b y t h e a c c e s s m a t r i x A . I t s r o w s ar e

    l a b e l e d b y d o m a i n n a m e s a n d i t s c o l u m n s b y o b j e c t

    n a m e s . E l e m e n t A [ i ,j ] s p e c i f i e s t h e a c c e s s

    w h i c h d o m a i n i h a s to o b j e c t j . E a c h e l e m e n t

    c o n s i s t s o f a s e t o f s t r i n g s c a l l e d a c c e s s a t t r i -

    b u t e s ; t y p i c a l a t t r i b u t e s a r e ' r ea d ' , ' w r i t e ' ,

    ' w a k e u p ' . W e s a y t h a t a d o m a i n h a s ' x ' a c c e s s t o

    a n o b j e c t i f ' x ' i s o n e o f t he a t t r i b u t e s i n t h a t

    e l e m e n t o f A. A t t a c h e d t o e a c h a t t r i b u t e i s a

    b i t C a l l e d t h e c o p y f l a g w h i c h c o n t r o l s t h e t r a n s -

    f e r o f a c c e s s i n a w a y d e s c r i b e d b e l o w . W i t h t h e

    A o f f i g u r e i , f o r e x a m p l e , d o m a i n 1 h a s ' o w ne r '

    a c c e s s t o f i l e 1 a s w e l l a s e x p l i c i t ' r e ad ' a n d

    ' w r i t e' a c c e s s . I t h a s g i v e n ' r e ad ' a c c e s s t o

    t h i s f i l e t o d o m a i n s 2 a n d 3 .

    E n t r i e s i n t he a c c e s s m a t r i x a r e m a d e a n d

    d e l e t e d a c c o r d i n g t o c e r t a i n r u l e s . A d o m a i n d 1

    c a n m o d i f y t h e l i s t of a c c e s s a t t r i b u t e s f o r d o -

    m a i n d 2 a n d o b j e c t x a s f o l l o w s ( e x a m p l e s a s s u m e

    t h e a c c e s s m a t r i x o f f i g u r e i ) :

    a ) d I c a n r e m o v e a c c e s s a t t r i b u t e s f r o m A

    [d , x ] i f i t h a s 'c o n t r o l ' a c c e s s t o d 2 .

    E x a m p l e : d o m a i n 1 c a n re m o v e a t t r i b u t e s

    f r o m r o w s 1 a n d 2 .

    b ) d I c a n c o p y t o A [d , x ] a n y a c c e s s a t t r i -

    b u t e s i t h a s f o r x w h i c h h a v e t h e c o p y

    f l a g s e t , a n d c a n s a y w h e t h e r t h e c o p i e d

    a t t r i b u t e s h a l l h a v e t h e c o p y f l a g s e t

    o r n o t . E x a m p l e : d o m a i n 1 c a n c o p y

    'write' to A [2, file i].

    c ) d l c a n a d d a n y a c c e s s a t t r i b u t e s t o A

    [ ~2 ' x ], w i t h o r w i t h o u t t h e c o p y f l a g ,

    i f i t h a s 'o w n e r ' a c c e s s t o x. E xa m p l e :

    d o m a i n 2 c a n a d d ' w r i t e ' t o A [2 , f i l e

    2].

    T h e r e a s o n f o r t h e c o p y f l a g i s t h a t w i t h o u t

    i t a d o m a i n c a n n o t p r e v e n t a n u n d e b u g g e d s u b o r d i -

    n a t e d o m a i n f r o m w a n t o n l y g i v i n g a w a y a c c e s s t o

    o b j e c t s .

    T h e r u l e s a b o v e d o n o t p e r m i t t h e ' o w n er ' o f

    a n o b j e c t t o t a k e a w a y a c c e s s t o t h a t o b j e c t .

    W h e t h e r t h i s s h o u l d b e p e r m i t t e d i s a n u n r e s o l v e d

    i s s u e. I t i s p e r m i t t e d b y m o s t s y s t e m s ; s e e [ 1 3 ]

    f o r a c o n t r a r y v i e w . I f i t i s t o b e p e r m i t t e d ,

    t h e f o l l o w i n g r u l e i s a p p r o p r i a t e .

    d ) d I c a n r e m o v e a c c e s s a t t r i b u t e s f r o m A

    [a 2 , x ] i f d I h a s 'o w n e r ' a c c e s s t o x,

    p r o v i d e d d 2 d o e s n o t h a v e ' p r o t e c t e d '

    a c c e s s t o x.

    T h e ' p r o t e ct e d ' r e s t r i c t i o n a l l o w s o n e

    ' o w ne r ' t o d e f e n d h i s a c c e s s f r o m o t h e r ' o w n e r s ' .

    I t s m o s t i m p o r t a n t a p p l i c a t i o n i s t o p r e v e n t a

    p r o g r a m b e i n g d e b u g g e d f r o m t a k i n g a w a y t h e d e -

    h u g g e r ' s a c c e s s ; i t m a y b e v e r y i n c o n v e n i e n t t o

    d o t h i s b y d e n y i n g t h e p r o g r a m b e i n g d e b u g g e d

    o w n e r ' a c c e s s t o i t s e l f .

    O n e p e c u l i a r i t y o f r u l e s b ) a n d c ) i s t h a t a

    d o m a i n c a n n o t p r e v e n t a s u b o r d i n a t e d o m a i n f r o m

    c o o p e r a t i n g w i t h a t h i r d , i n d e p e n d e n t d o m a i n ,

    e . g . f r o m c h e a t i n g o n a t e s t . T h i s c o u l d b e r e -

    m e d i e d b y r e q u i r i n g d I t o h a v e ' a u g m e nt ' a c c e s s t o

    d 2 i n t h o s e t w o r u l e s .

    T h e s y s t e m i t s e l f a t t a c h e s n o s i g n i f i c a n c e t o

    a n y a c c e s s a t t r i b u t e s e x c e p t ' o w n e r ' , o r t o o b -

    j e c t n a m e s . T h u s t h e r e l a t i o n s h i p b e t w e e n , s a y ,

    t h e f i l e - h a n d l i n g m o d u l e a n d t h e s y s t e m i s s o m e -

    t h i n g l i k e t h i s . A u s e r c a l l s o n t h e f i l e -

    h a n d l e r t o c r e a t e a f i l e . T h e f i l e - h a n d l e r a s k s

    t h e s y s t e m f o r a n e w o b j e c t n a m e n , w h i c h t h e s y s -

    t e m d e l i v e r s f r o m i t s s t o c k o f 2 6 4 o b j e c t n a m e s

    ( e. g. b y i n c r e m e n t i n g a 6 4 - b i t c o u n t e r ) . T h e s y s -

    t e m g i v e s t h e f i l e - h a n d l e r ' o w n e r' a c c e s s t o o b j e c t

    n . T h e f i l e - h a n d l e r e n t e r s n i n i t s o w n p r i v a t e

    t a b l e s , t o g e t h e r w i t h o t h e r i n f o r m a t i o n a b o u t t h e

    f i l e w h i c h m a y b e r e l e v a n t ( e. g. i t s d i s k a d d r e s s ) .

    I t a l s o g i v e s i t s c a l l e r ' o w n er ' a c c e s s t o n a n d

    r e t u r n s n t o t h e c a l l e r a s t h e n a m e o f t h e c r e a t e d

    f i le . L a t e r , w h e n s o m e d o m a i n d t r i e s to r e a d

    f r o m f i l e n , t h e f i l e - h a n d l e r w i l l e x a m i n e A [ d ,n ]

    t o s e e i f ' r e a d' i s o n e o f t h e a t t r i b u t e s , a n d r e -

    f u s e t o d o t h e r e a d i f i t i s n o t .

    - 2 1 -

  • 8/9/2019 B W Lampson(1971)-Protection-Original.pdf

    5/7

    Domain 1 Domain 2 Domain 3 File 1 File 2 Proces s 1

    Domain 1

    Domain 2

    Domain 3

    *owner

    c o n t r o l

    *owner

    c o n t r o l

    *call

    call

    o w n e r

    c o n t r o l

    *owner

    *read

    *write

    *read

    r e a d

    w r i t e

    *owner

    w a k e u p

    *copy flag set

    F i g u r e l : P o r t i o n o f a n ac c e s s m a t r i x

    S o m e I m p l e m e n t a t i o n T e c h n i q u e s

    Since A is sparse, it is not pract ical to

    s t o r e i t i n t h e o b v i o u s w a y . T h e m o s t i n t u i t i v e l y

    simple alte rnativ e would be a global t able T of

    triple s whic h is searche d whene ver

    the value of A [ d,x ] is required. Unfortun ately,

    t h i s i s u s u a l l y i m p r a c t i c a l f o r a n um b e r o f r e a -

    sons:

    a ) M e m o r y p r o t e c t i o n i s a l m o s t c e r t a i n l y

    p r o v i d e d b y h a r d w a r e w h i c h d o e s n o t u s e

    T . T h i s i s t h e m a j o r a r e a i n w h i c h t h e

    o p e r a t i n g s y s t e m d e s i g n e r h a s l i t t l e c o n -

    t r o l ; i t i s d i s c u s s e d i n t h e n e x t s e c t i on .

    b ) I t m a y b e i n c o n v e n i e n t t o k e e p a l l o f T

    i n f a s t - a cc e s s m e m o r y , s i n c e a t a n y g i v e n

    t i m e m o s t o b j e c t s a n d p e r h a p s m o s t d o -

    m a i n s w i l l b e i n a c t i ve . A n i m p l e m e n t a -

    t i o n i s t h e r ef o r e n e e d e d w h i c h h e l p s t o

    k e e p t h e c u r r e n t l y r e l e v a n t p a r t s o f A

    readi ly availab l e .

    c ) O b j e c t s a n d / o r d o m a i n s m a y b e g r o u p e d i n

    s u c h a w a y t h a t T i s v e r y w a s t e f u l o f

    storage. A simple ex ampl e is a public

    f i l e, w h i c h w o u l d r e q u i r e a t ab l e e n t r y

    for every domain.

    d ) I t m a y b e n e c e s s a r y t o b e a b l e t o o b t a i n

    a l i s t o f t he o b j e c t s w h i c h a g i v e n d o -

    m a i n d c a n a c c e s s , o r a t l e a s t t h e o b -

    j e c t s f o r w h i c h d i s r e s p o n s i b l e o r i s

    paying for.

    A n i m p l e m e n t a t i o n w h i c h a t t a c k s b ) a n d d)

    d i r e c t l y i s to a t t a c h t h e d ' t h c o l u m n o f A t o t h e

    d o m a i n d i n t h e f o r m o f a t a b l e o f p a i r s

    < x : A [ d , x ] > . O n e o f t h e s e p a i r s i s u s u a l l y c a l l e d

    a capab ility [ 3,7,9,10,15] .

    I f t h e h a r d w a r e p r o v i d e s f o r r e a d - o n l y a r r a y s

    w h i c h c a n o n l y be g e n e r a t e d b y t h e s u p e r v i s o r ,

    t h e n e a c h c a p a b i l i t y c a n b e i m p l e m e n t e d a s s uc h

    a n ar r a y , c o n t a i n i n g

    a) the name of the obj ect ( a 64-bit integer) ,

    b ) a s u i t a b l e r e p r e s e n t a t i o n o f t h e a c c e s s

    attributes , ( perhaps as a bit string) .

    - 2 2 -

  • 8/9/2019 B W Lampson(1971)-Protection-Original.pdf

    6/7

    M o s t h a r d w a r e d o e s n o t p r o v i d e t h e k i n d o f

    p r o t e c t e d a r r a y s w e h a v e b e e n a s s u m i n g , b u t t h e y

    c a n e a s i l y b e s i m u l a t e d b y t he s u p e r v i s o r , a t

    s o m e c o s t i n c o n v e n i e n c e , o n a n y m a c h i n e w i t h

    m e m o r y p r o t e c t i o n o f a n y k i n d . W h e n t h i s i s d o n e ,

    i t i s u s u a l l y c o n v e n i e n t t o g r o u p c a p a b i l i t i e s t o -

    g e t h e r i n t o c a p a b i l i t y l i s t s o r C - l i s t s . A d o m a i n

    i s t h e n d e f i n e d b y a C - l i s t ( a nd i ts m e m o ry , i f

    t h a t r e q u i r e s s p e c i a l h a n d l i n g ; s e e t h e n e x t s e c -

    t i o n ).

    W i t h t h i s k i n d o f i m p l e m e n t a t i o n i t m a y b e

    c o n v e n i e n t t o a l l o w a d d i t i o n a l i n f o r m a t i o n t o b e

    s t o r e d i n a c a p a b i l i t y , e . g. t h e d i s k a d d r e s s i n

    t h e f i l e - h a n d l i n g e x a m p l e a b o v e , o r a p o i n t e r t o

    s o m e t a b l e e n t r y t o s a v e t h e c o s t o f l o o k i n g u p

    t h e o b j e c t n a m e [ i0 ]. I t i s a n i n t e r e s t i n g e x e r -

    c i s e t o d e v i s e a m e c h a n i s m f o r c o n t r o l l i n g w h o

    g e t s t o a l t e r t h i s a d d i t i o n a l i n f o r m a t i o n .

    C a p a b i l i t i e s c a n a l s o b e u s e d t o a t t a c k p r o -

    b l e m c ) a b o ve . A l l w e h a ve t o d o i s o b s e r v e t h a t

    i t is p o s s i b l e t o b u i l d a n a r b i t r a r y g r a p h o f d o -

    m a i n s , e a c h w i t h a s e t o f c a p a b i l i t i e s o r C - l i s t

    [ 3 , 7 , 1 3 ] . E v e r y t h i n g w e k n o w a b o u t t r e e -

    s t r u c t u r e d n a m i n g s c h e m e s c a n t h e n b e a p p l i e d t o

    e c o n o m i z e o n s t o r a g e f o r s h a r e d c a p a b i l i t i e s .

    A c o m p l e t e l y d i f f e r e n t a p p r o a c h i s t o a t t a c h

    t h e p r o t e c t i o n i n f o r m a t i o n t o t h e o b j e c t r a t h e r

    t h a n t he d o ma i n . I n it s m o s t g e n e r a l f o r m , t h e

    i d e a i s t o p r o v i d e a p r o c e d u r e A x (d) f o r e a c h

    o b j e c t . T h e p r o c e d u r e i s p r o v i d e d b y t h e o w n e r

    o f t h e o b j e c t a n d c a n k e e p i t s o w n d a t a s t r u c t u r e s

    t o d e c i d e w h o s h o u l d g et a c c e s s . N o t e t h a t a t

    l e a s t s o m e o f t h e s e p r o c e d u r e s w i l l h a v e t o r e f r a i n

    f r o m a c c e s s i n g a n y o t h e r o b j e c t s i n o r d e r t o p r e -

    v e n t i n f i n i t e r e c u r s i o n .

    T h e e s s e n t i a l p o i n t i s t h a t t h e p r o c e d u r e g e t s

    t h e d o m a i n ' s n a m e a s a r g u m e n t , a n d t h i s c a n n o t b e

    f o r g e d . H o w e v e r , u n i q u e n a m e s m a y n ot b e v e r y

    c o n v e n i e n t f o r t he p r o c e d u r e t o r e m e m b e r - - a c c e s s

    i s m o r e l i k e l y t o b e a s s o c i a t e d w i t h a p e r s o n o r

    g r o u p o f p e o p l e , o r p e r h a p s w i t h a p r o g r a m . T h e

    i d e a s o f t h e l a s t f e w p a r a g r a p h s c a n b e a p p l i e d

    h e r e - - c a p a b i l i t i e s c a n b e u s e d a s i d e n t i f i c a t i o n ,

    s i n c e t h e y h a v e t h e e s s e n t i a l p r o p e r t y t h a t t h e y

    c a n n o t b e f or g e d . W e w i l l c a l l a c a p a b i l i t y u s e d

    f o r i d e n t i f i c a t i o n a n a c c e s s k e y ; i t i s a g e n e r a -

    l i z a t i o n o f a d o m a i n n a m e a s i t w a s u s e d i n t he

    m e s s a g e s y s t e m [ 9 ] .

    A l l t h e a c c e s s c o n t r o l p r o c e d u r e n e e d s t o

    k n o w i s w h a t a c c e s s k e y s t o r e c o g n i z e . E a c h u s er ,

    i n d e e d e a c h e n t i t y w h i c h n e e d s t o b e i d e n t i f i e d

    b y a n a c c e s s c o n t r o l p r o c e d u r e , g e t s h o l d o f a

    u n i q u e a c c e s s k e y b y a s k i n g t h e s u p e r v i s o r f o r

    i t , r e a d s t h e v a l u e , a n d t r a n s m i t s t h e v a l u e t o

    t h e p e o p l e w h o w i s h t o g r a n t h i m a c c e s s . T h e y

    t h e n p r o g r a m t h e i r a c c e s s c o n t r o l p r o c e d u r e s t o

    r e t u r n t h e d e s i r e d a t t r i b u t e s w h e n t h a t k e y i s

    p r e s e n t e d a s a n a r g u m e n t .

    I t i s o f t e n i n c o n v e n i e n t t o ca l l a r b i t r a r y

    p r o c e d u r e s . A le s s g e n e r a l s c h e m e i s t o a t t a c h

    t o e a c h o b j e c t a l i s t w h i c h c o n s i s t s o f < k e y

    v a l u e , a c c e s s a t t r i b u t e s > p a i r s . I t s e e m s r e a -

    s o n a b l e t o c a l l t h i s a n a c c e s s l o c k l i s t f o r t h e

    o b je c t . I t w o r k s i n t h e o b v i o u s w a y : i f t h e v a l u e

    o f t h e k e y p r e s e n t e d m a t c h e s t h e v a l u e i n o n e o f

    t h e l o c k s, t h e c o r r e s p o n d i n g a t t r i b u t e i s r e t u r n e d .

    A n o t h e r w a y t o l o o k a t t h i s s c h e m e i s as a

    g e n e r a l i z a t i o n o f o n e o f t h e f i r s t p r o t e c t i o n s y s -

    t e m s, t h a t o f C T SS , w h i c h i n s t e a d o f t h e k e y v a l u e

    e m p l o y e d t h e n a m e o f t h e u s e r a s i d e n t i f i e d a t

    l o g i n [1 , 9 , 15].

    O n e a c c e s s l i s t p e r o b j e c t i s l i k e l y t o b e

    c u m b e r s o m e . M o s t s y s t e m s g r o u p o b j e c t s i n t o

    d i r e c t o r i e s w h i c h i n t u r n a r e o b j e c t s s o t h a t a

    t r e e s t r u c t u r e c a n b e b u i l t u p. T h i s a d d s n o t h i n g

    n e w , e x c e p t t h a t i t i n t r o d u c e s a n o t h e r k i n d o f

    t r e e - s t r u c t u r e d n a m i n g [ 1 5] .

    W e o b s e r v e t h a t a d i r e c t o r y i s n o t t o o m u c h

    d i f f e r e n t f r o m a d o m a i n i n s t r u c t u r e. T h e a c c e s s

    k e y m e t h o d o f o b t a i n i n g a c c e s s i s , h o w e v er , q u i t e

    d i f f e r e n t i n s p i r i t f r o m th e c a p a b i l i t y m e t h o d .

    I t i s a l s o l i k e l y t o be m o r e e x p e n s i v e , a n d m a n y

    s y s t e m s h a v e a h y b r i d i m p l e m e n t a t i o n i n w h i c h a n

    o b j e c t c a n b e a c c e s s e d o n c e b y a c c e s s k e y t o o b -

    t a i n a c a p a b i l i t y , w h i c h i s t h e n u s e d f o r s u b s e-

    q u e n t a c c e s s e s. T h i s p r o c e s s w h e n a p p l i e d t o f i l e s

    i s u s u a l l y c a l l e d ~ a f i l e [8 ,9 ].

    M e m o r y P r o t e c t i o n

    M e m o r y p r o t e c t i o n h a r d w a r e i s u s u a l l y c l o s e l y

    r e l a t e d t o m a p p i n g or r e l o c a t i o n h a r d w a r e . T h e r e

    a r e t w o a s p e c t s t o t h is :

    a ) m e m o r y w h i c h i s n o t i n t h e r a n g e o f th e

    m a p c a n n o t b e n a m e d a n d i s t h e r e f o r e p r o -

    t e c t e d .

    b ) i n p a g e d o r s e g m e n t e d s y s t e m s ( e v e n 2 -

    s e g m e n t o n e s l i k e t h e P D P- 1 0 ) e a c h p a g e

    o r s e g m e n t i n t h e m a p h a s p r o t e c t i o n i n -

    f o r m a t i o n a s s o c i a t e d w i t h i t .

    T h e e s s e n t i a l p o i n t i s t h a t e a c h d o m a i n m u s t

    b e a b l e t o h a v e i t s o w n a d d r e s s s p a c e , s i n c e o t h e r -

    w i s e t h e r e c a n b e n o p r o t e c t i o n [ 9 , 1 0] . I t i s a l s o

    h i g h l y d e s i r a b l e f o r o n e d o m a i n t o b e a b l e t o r e -

    f e r e n c e t h e m e m o r y o f a n o t h e r , s u b j e c t t o t h e c o n -

    t r o l o f t h e a c c e s s f u n c t i o n .

    A s e g m e n t e d s y s t e m i n w h i c h a n y s e g m e n t i s

    p o t e n t i a l l y a c c e s s i b l e f r o m a ny d o m a i n f i t s w e l l i n -

    t o t h e f r a m e w o r k o f t h e l a s t t w o s e c t i o ns , u s u a l l y

    w i t h t h e C - l i s t i m p l e m e n t a t i o n [ 2 , 4] . I t m a y b e a

    s l i g h t a n n o y a n c e t h a t a s e g m e n t c a p a b i l i t y h a s a

    d i f f e r e n t f o r m t h a n o t h e r c a p a b i l i t i e s , b u t t h i s

    - 2 3 -

  • 8/9/2019 B W Lampson(1971)-Protection-Original.pdf

    7/7

    is a minor problem. Some diffic ulties may arise,

    h o w e v e r , i n c o n n e c t i o n w i t h t r a n s f e r s o f c o nt r o l

    from one domain to another, since it is unlike ly

    t h a t t h e h a r d w a r e w i l l a l l o w p a t h n a m e s i n a t r e e

    of C -lists to be used as addresses [ 4 ].

    I n t h e ab s e n c e o f s e g m e n t a t i o n e i t h e r p a g e s

    or files may be treated as obj ects. With paging,

    data can be dynam ically shared, and since the con-

    t e n t s o f t h e m a p c a n be c h a n g e d w h e n c h a n g i n g d o -

    mains, there is a feasible, thoug h far from ele-

    g a n t , m e a n s o f p a s s i n g m e m o r y a r o u n d w h e n n e c e s-

    s a r y w h i l e p r e s e r v i n g t h e s e c u r i t y o f e a c h do m a i n .

    In the absence of paging, each domain will

    h a v e t o h a v e p r i v a t e m e m o r y i n g e n e r al , m e m o r y

    w h i c h i s n o t a c c e s s i b l e t o a n y o t h e r d o m a i n , e x -

    c e p t t h r o u g h s o m e u g l y c i r c u m l o c u t i o n . T h e n a m -

    i n g p r o b l e m s w h i c h r e s u l t a r e b e y o n d t h e s c o p e o f

    this paper.

    T h e r e i s o n e e x c e p t i o n t o t h i s o b s e r v a t i o n,

    for the case of n ested domains d I , . . . , d n

    (i.e. A [dl, x]~ ). . . ~ A [dn, x] fo r all x ) on

    m a c h i n e s w i t h b a se a n d b o u n d r e l o c a t i o n: s i m p l y

    a r r a n g e t h e m e m o r y f o r t h e d o m a i n s c o n t i g u o u s l y ,

    with d I nearest to 0, and set the bound for d I to

    the total length of all the memory, for d 2 to the

    total length ex clud ing dl, etc. N ow only a simple

    a d d i t i o n i s r e q u i r e d f o r d i t o i n t e r p r e t a d d r e s s e s

    in dj, i