Re: Invoking a signal handler

2010-02-08 Thread Kostik Belousov
On Sun, Feb 07, 2010 at 10:55:53PM -0800, Shrivats wrote:
 Hi,
 
 
 I am trying to understand how the kernel invokes the signal handler
for a process, to deliver an asynchronous signal posted by another
process.

 I was looking at the sendsig() function which saves the current user
 context. My question is, when and how does the transition from the
 kernel mode to the user mode take place so that the signal handler is
 invoked? 

The sendsig() does two things. First, it copies out the currently
saved user context to the user stack. Then, it modifies the current
context to arrange the call to the signal handler when return to
user mode is done.

After that, when the thread does usual return from the kernel to user
mode, be it return from the interrupt, or syscall, the modified context
causes execution to jump to signal trampoline code implanted to the user
mode stack by image activator. Trampoline is supplied required data by
sendsig() to call signal handler with the right arguments.

More, upon return from the signal handler, the trampoline on the
stack gets the control again, and calls sigreturn(2) syscall that
restores the old, pre-signal context saved by sendsig().

This is the model used on i386/amd64 FreeBSD, and I think that other
architectures are quite similar.


pgprkXgawGUyo.pgp
Description: PGP signature


Re: our little daemon abused as symbol of the evil

2010-02-08 Thread Oliver Fromme
Ruben de Groot mai...@bzerk.org wrote:
  On Fri, Feb 05, 2010 at 08:05:10PM +0100, Julian H. Stacey typed:
   PS an undefended trade mark loses its right to further defence or some 
   such,
   (I'm not a lawyer).
  
  It's not a trade mark, is it? It's copyrighted. That's a whole other set of 
  laws.

On the bottom of this page ...

http://www.freebsd.org/art.html

.. the text states that Marshall Kirk McKusick is the
trademark holder for the BSD Daemon image.
However, on another page (I don't have the URL right
now) it says that Kirk owns the copyright of the daemon.

I guess one of the web pages needs to be corrected,
but I don't know which one.  :-)

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH  Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

A language that doesn't have everything is actually easier
to program in than some that do.
-- Dennis M. Ritchie
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


How can I force boot from alternate drive with boot.config?

2010-02-08 Thread Peter Steele
I've asked this on the -questions list but haven't had any feedback. I have a 
system configured with multiple identical drives each loaded with FreeBSD. When 
I was using MBR partitioning, I could create a boot.config to force the system 
to boot from a specific drive. For example, if I wanted to boot from the second 
drive, I'd create a boot.config with:



1:ad(1,a)/boot/loader



We've switched to GPT partitioning and I can't seem to find a way to do this 
same trick. The boot loader only seems to recognize MBR partitions when it 
comes to this feature. I looked at the boot.c source code and there doesn't 
seem to be anything specifically related to GPT partitioning. I cannot for 
example say something like:



1:ad(1,p3)/boot/loader



where p3 is the root partition in my GPT partitioned drives. So I'm puzzled: If 
I have a two drive system with BSD loaded on both drives and the drives are 
configured with GPT partitions, how can I force the system to boot from the 
second drive using boot.config?

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: How can I force boot from alternate drive with boot.config?

2010-02-08 Thread John Hay
On Mon, Feb 08, 2010 at 10:25:54AM -0600, Peter Steele wrote:
 I've asked this on the -questions list but haven't had any feedback. I have a 
 system configured with multiple identical drives each loaded with FreeBSD. 
 When I was using MBR partitioning, I could create a boot.config to force the 
 system to boot from a specific drive. For example, if I wanted to boot from 
 the second drive, I'd create a boot.config with:
 
 
 
 1:ad(1,a)/boot/loader
 
 
 
 We've switched to GPT partitioning and I can't seem to find a way to do this 
 same trick. The boot loader only seems to recognize MBR partitions when it 
 comes to this feature. I looked at the boot.c source code and there doesn't 
 seem to be anything specifically related to GPT partitioning. I cannot for 
 example say something like:
 
 
 
 1:ad(1,p3)/boot/loader
 
 
 
 where p3 is the root partition in my GPT partitioned drives. So I'm puzzled: 
 If I have a two drive system with BSD loaded on both drives and the drives 
 are configured with GPT partitions, how can I force the system to boot from 
 the second drive using boot.config?
 

I use: ad(0p3)/boot/loader

John
-- 
John Hay -- j...@meraka.csir.co.za / j...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


RE: How can I force boot from alternate drive with boot.config?

2010-02-08 Thread Peter Steele
 I use: ad(0p3)/boot/loader

So, more precisely, if I wanted to boot from drive 1, I'd use this?

1:ad(1p3)/boot/loader

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: How can I force boot from alternate drive with boot.config?

2010-02-08 Thread John Hay
On Mon, Feb 08, 2010 at 12:13:20PM -0600, Peter Steele wrote:
  I use: ad(0p3)/boot/loader
 
 So, more precisely, if I wanted to boot from drive 1, I'd use this?
 
 1:ad(1p3)/boot/loader

Yes, unless there are more bugs hiding. :-) I fixed a few in August
last year.

John
-- 
John Hay -- j...@meraka.csir.co.za / j...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: our little daemon abused as symbol of the evil

2010-02-08 Thread Julian H. Stacey
Oliver Fromme wrote:
 Ruben de Groot mai...@bzerk.org wrote:
   On Fri, Feb 05, 2010 at 08:05:10PM +0100, Julian H. Stacey typed:
PS an undefended trade mark loses its right to further defence or some 
 such,
(I'm not a lawyer).
   
   It's not a trade mark, is it? It's copyrighted. That's a whole other set 
 of laws.
 
 On the bottom of this page ...
 
 http://www.freebsd.org/art.html

Nice page :-)

 . the text states that Marshall Kirk McKusick is the
 trademark holder for the BSD Daemon image.
 However, on another page (I don't have the URL right
 now) it says that Kirk owns the copyright of the daemon.
 
 I guess one of the web pages needs to be corrected,
 but I don't know which one.  :-)
 
 Best regards
Oliver

I asked someone who registers trademarks as part of her job:
One can apply to register a trademark in {(my (Julian) brackets) at
least all of} Germany Britain America {etc}.  She spoke of
an international form where one ticks the countries one
wants {to apply to}.

I recall there's initial  recuring fees ( admin) on getting 
renewing trademarks.  So questions could be:
Has Kirk (or A.N.Other) registered it [which, what] as a
trademark ?  In which countries ?  When ? URLs please.
Have they already/ when will they expire 
Whose crontab file reminder who Kirk ? to pay renewal
fees [to which countries] ?

I guess if Kirk didn't/ doesn't want that [future] bother, it's the sort of
thing [Free]BSD Foundation might handle ? (Assuming that [Free] bit
doesn't provoke Net Open Dragon PC etc BSD who also use the BSD daemon.

Occasionaly (eg with Disney graphics ?) one sees some mark under
the graphic. Might it be wise to have a tiny C. symbol or other
text under the graphic's feet ? (A question for a trademark specialist,
Bcc'd :-)

Editing an ASCII readable copyright string into eg a .gif image is
probably not a bad idea too.


Kirk wrote Fri, 05 Feb 2010 11:19:39 -0800 (20:19 CET)

 I have gotten word from the authors that they are aware of the
 problem and are correcting it (e.g., taking out the daemon).

Mon Feb  8 20:48:01 CET 2010 (TZ=GMT+01:00) 
http://www.iseclab.org/papers/sonda-TR.pdf
Page 4 
BSD graphic is no longer present, replaced by word Attacker.
Firefox graphic is no longer present, replaced by word Victim

Cheers,
Julian
-- 
Julian Stacey: BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
Mail plain text not quoted-printable, HTML or Base64 http://www.asciiribbon.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Invoking a signal handler

2010-02-08 Thread Shrivats
Hi,
I am trying to understanding how the kernel invokes a signal handler for a 
currently executing process, to deliver an asynchronous signal posted by 
another process.
I was looking at the sendsig() function which saves the 



___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org