[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Cookie Jar problem



> > program destroys the jar thus influencing all processes which would look
> > it up; with Ssystem() modifying all the copies this would still be
> > possible).
>
> I don't aggree. Ssystem is a system call. If the system call destroy
> something the kernel have for sure a bad bug. Every process have still
> it's private cookie jar.

I apparently don't understand the idea then. Please explain.

> Btw. how do you managed private cookie jar? Do you exchange on every
> context switch 0x5a0?

Processes calling Setexc() or Ssystem() in order to obtain the cookie jar
pointer are given the ut->user_cookie_p value (ut being a pointer to the
USER_THINGS struct). See bios.c and ssystem.c.

Unfortunately, as I noticed, almost no program does that, everyone
"simply" go Super() or Supexec() and read the 0x5a0 directly. So updating
this on every context switch was necessary. The do_wakeup_things() copies
the ut->user_cookie_p there.

> > If gluestik would be an XDD, it would be able to place its cookie into
> > kernels cookie jar. This way the STiK cookie would become available for
> > all processes, and no kludges in Ssystem() are needed ("wolf/ox"
> > solution).
>
> Oh, I don't think you know how much work this would be. At least it's not
> so simple as you describe. As an xdd run in kernel space you must first
> write lot of new interfaces or helper routines to push a wrapper table
> into user space that can then cleanly wrap over the xdd.

If you say so... I just thought that an XDD can place the STiK cookie into
the (kernel) jar, alloc a global memory block with m_xalloc(), and fill it
with whatever data the STiK needs. The cookie would then point to the
block. The rest could become the same as it is now. Why this is
impossible?

CVV

-- 
Konrad M.Kokoszkiewicz
mail: draco@atari.org
http://draco.atari.org

** Ea natura multitudinis est,
** aut servit humiliter, aut superbe dominatur (Liv. XXIV,25)
*************************************************************
** Taka to juz natura pospolstwa, ze albo sluzy ono unizenie,
** albo bezczelnie sie panoszy.