zsh-workers
 help / color / mirror / code / Atom feed
* Re: Last patch
@ 2000-12-04  9:06 Sven Wischnowsky
  2000-12-04 10:35 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Wischnowsky @ 2000-12-04  9:06 UTC (permalink / raw)
  To: zsh-workers


I wrote:

> I'll have a look at the weekend. Let's see if we can do it with
> signal-queueing.

I had.  It's a nightmare.  I haven't yet checked everything, but the
patch already has ~3600 lines.  The main problem seems to be that we
have many places where we get, for example, a pointer to a hash node,
keep it in a local variable and later use it.  If a trap would be
handle between getting the pointer and using it, the handler could do
something that invalidates the hash table entry (and hence the
pointer).

In many places this can quite easily be wrapped inside a queue_signals()/
unqueue_signals() pair but there are places where it is extremly
difficult (execcmd(), for example, or the function-autoloading code).

Another problem is the module code.  Most of this could probably be
solved by queue/unqueue pairs (I've done/tried that) and by
disallowing to unload modules from a handler.

Some (if not most) of the things I haven't tried to make secure yet
include the history code and the job- and signal-tables. But even
without them, the many queue/unqueue pairs don't look like the right
solution.  Maybe we should try to identify a hopefully small set of
places where we put them, each making a possibly large part of the
shell secure and later try to move the pairs further and further down
the call chains.


Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Last patch
@ 2000-12-01  9:32 Sven Wischnowsky
  2000-12-01 10:15 ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Sven Wischnowsky @ 2000-12-01  9:32 UTC (permalink / raw)
  To: zsh-workers


Peter Stephenson wrote:

> Just realised after I sent it that the diff for installing functions
> contained Bart's tweak for forbidding traps during traps, which hasn't been
> committed.  The traps are the last piece of major unfinished business I
> know about.  (I am not volunteering to anything about it.)

I'll have a look at the weekend. Let's see if we can do it with
signal-queueing.

As I already said, the globals in the completion system shouldn't be a 
problem if we just prevent it from being called while it is still
active (I haven't looked yet, maybe we already do that -- I have the
impression that I shoudl now this, hm). The globals in zle: for now we 
only need to protect those that can be touched by using the `zle'
builtin. The stuff used for the lexer/parser/execution code shouldn't
be a problem either because they are already saved and restored. And
for the rest we could probably start by making the protected section
somewhat larger than necessary (the functions used in the hashtable
structs might be good candidates, for example).


And then there is also the issue of moving the shell code into the
final directory structure.


Is our goal to bring out 4.0 before christmas? (`zsh christmas edition'?)
Sounds like a good goal and considering that we got only few bug
reports lately and quite a few people already seem to use 3.1.x...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Last patch
@ 2000-11-30 18:30 Peter Stephenson
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Stephenson @ 2000-11-30 18:30 UTC (permalink / raw)
  To: Zsh hackers list

Just realised after I sent it that the diff for installing functions
contained Bart's tweak for forbidding traps during traps, which hasn't been
committed.  The traps are the last piece of major unfinished business I
know about.  (I am not volunteering to anything about it.)

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-12-04 10:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-04  9:06 Last patch Sven Wischnowsky
2000-12-04 10:35 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2000-12-01  9:32 Sven Wischnowsky
2000-12-01 10:15 ` Peter Stephenson
2000-11-30 18:30 Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).