Re: cause of reboot

2013-09-30 Thread Patrick Lamaiziere
Le Mon, 30 Sep 2013 17:24:18 +0300,
Emre Çamalan mail...@yandex.com a écrit :

 Hi,
 my server reboots every night and same o'clock last 10 days. But this
 machine's uptime was 96days.
 
 Suddenly reboot this machine and now this continue every night again
 and again.
 
 I didn't find any reason and I didn't change anything else.
 
 I looked last command, 
 reboot ~ ~   AM 03.15  ~

The last time It happened (one month ago) to me it was the hard disk
(periodic scripts read a large part of the disk).

If the disk is smart capable try a full test with smartctl
(sysutils/smartmontools)

HTH, regards
___
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: DEBUG - analysing core dumps

2011-05-25 Thread Patrick Lamaiziere
Le Wed, 25 May 2011 18:36:49 +0200,
Damien Fleuriot m...@my.gd a écrit :

Hello,

 Sadly, getting a backtrace with bt gives me more lines with ??,
 which is totally not helpful:
 [SNIP]
 #13 0x7f1f9d70 in ?? ()
 #14 0x in ?? ()
 #15 0x6f70732f7261762f in ?? ()
 #16 0x6c737973722f6c6f in ?? ()
 #17 0x5f6e70766f2f676f in ?? ()
 #18 0x746174732e676f6c in ?? ()
 #19 0x0065 in ?? ()
 #20 0x in ?? ()
 [SNIP]
 
 I am not sure what steps I should follow to get more information ?

You have to build the binary with debug symbols included.

The rsyslog port provides an option for this. Did you see this notice in
the port's makefile?


# XXX: 5.5.6+ seem to crash frequently with low-mid load 
# on FreeBSD, temporailiy enable debugging by default.
# Now we can send gdb backtraces into the list:
# rsyslog-users rsys...@lists.adiscon.com
OPTIONS=DEBUG   Enable debugging  on


Good luck...

Regards.
___
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: hifn(4) DMA fix for review

2010-05-11 Thread Patrick Lamaiziere
Le Mon, 10 May 2010 08:26:08 -0700,
Sam Leffler s...@errno.com a écrit :

Hello,

  I noticed several things in hifn, if you want to look:
  http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/130286
 
  IMHO some locks are missing in the use of sc-sc_sessions (the array
  containing the sessions) : in hifn_newsession(), if there is no
  space left in sc-sc_sessions, a new array is allocated and the
  sessions are copied to it. Unfortunaly, sc-sc_sessions is used in
  hifn_process without any lock and we use some pointers on the array
  (my patch should
  addresses this if I remember...).
 
 Isn't this just the glx locking? (no offense intended)  I've said  
 before I think we to move session management up into the crypto
 layer since it's implemented in many drivers (usually w/ cp of the
 same code as you noted here sometimes a bit different).

Yes, the code comes mostly from padlock and glxsb.

glxsb and padlock use a TAILQ to store the sessions instead of an array.
It is better when we want to add or remove a session but we have to
search the session each time when processing the operation. In hifn,
the session id (sid) is directly the index so it should be more
efficient. I'm not sure if this is a concern or not.

Regards.
___
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: hifn(4) DMA fix for review

2010-05-09 Thread Patrick Lamaiziere
Le Fri, 07 May 2010 12:13:20 -0700,
Oleksandr Tymoshenko go...@bluezbox.com a écrit :

Hi,

  Proposed patch addresses hifn(4) problems on FreeBSD/mips.
 Current implementation keeps some of the state information (indexes in
 buffers, etc) in DMA-mapped memory and bus_dma code invalidates them
 during sync operations. This fix moves data that doesn't belong to DMA
 ring to softc structure.

I do not have any comment but I will try on my Soekris (the next
weekend) if it can help.

I noticed several things in hifn, if you want to look:
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/130286

IMHO some locks are missing in the use of sc-sc_sessions (the array
containing the sessions) : in hifn_newsession(), if there is no space
left in sc-sc_sessions, a new array is allocated and the sessions are
copied to it. Unfortunaly, sc-sc_sessions is used in hifn_process
without any lock and we use some pointers on the array (my patch should
addresses this if I remember...).

Regards.
___
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: Keyboard scancodes

2010-04-24 Thread Patrick Lamaiziere
Le Fri, 23 Apr 2010 11:20:50 +0200,
Michael Cardell Widerkrantz m...@hack.org a écrit :

 I was recently given an original Happy Hacking Keyboard. As I
 sometimes work in the FreeBSD console, I wanted to have my usual
 console keymap adjusted to the new keyboard, but didn't know the
 scancode for the HHKB meta key (the diamond key). I couldn't find any
 program in base or ports that would show me the scancodes, so I ended
 up writing my own:
 
   http://hack.org/mc/hacks/kbdscan/

Thanks, that could be usefull when doing syscons keymap. Last time I
did it, I put some printf into the keyboard driver :(

Regards.
___
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


Dead store elimination in the kernel?

2010-03-07 Thread Patrick Lamaiziere
Hello,

I'm asking if FreeBSD is safe regarding dead store elimination made by
gcc? 

By example, in crypto drivers, sensitive datas are cleared by a
bzero() after use to avoid potential leakages.  But the bzero() by
itself is useless, is it removed by gcc?

Thanks, regards.
___
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: good morning to all

2009-06-15 Thread Patrick Lamaiziere
Le Mon, 15 Jun 2009 11:22:17 +0530,
malathi selvaraj malathira...@gmail.com a écrit :

Hello,

 i am new one to  freeBSD, kindly guide me

See the Handbook, is good.

If you have questions, ask on the freebsd-questi...@freebsd.org
mailing list (but you should read the doc before, it's better). There
are also some web forums http://forums.freebsd.org/

Regards.
___
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: AMD Geode LX crypto accelerator (glxsb)

2008-06-08 Thread Patrick Lamaiziere
Le Sat, 7 Jun 2008 06:18:55 +0200,
Pawel Jakub Dawidek [EMAIL PROTECTED] a écrit :

  Well, it seems to work but i've got few problems to test the
  module :
  
  - How check the encryption/decryption ?
  
  Openssl seems ok, i've got quite the same results as NetBSD on a
  Soekris net5501 box. But i must use -engine cryptodev, why ?
 
 This is ok, as you may not want to use it, right?

I think it should be automatic with an option to not use it.
Simon replied for this problem.

 Try comparing result of openssl encryption with and without '-engine
 cryptodev'. Remember to use -nosalt (and maybe -raw) prevent openssl
 from putting salt in front of the ciphertext.

Thank you.

I checked the encryption with and without 'engine cryptodev'.
It works \o/

$ openssl enc -e -aes-128-cbc -in file -out file.enc -nosalt -k
abcdefhij

$ openssl enc -d -aes-128-cbc -in file.enc -out file.dec
-nosalt -k abcdefhij

$ md5 file file.dec

Time to encode a 300 MB file 
soft : 1m29.72s real, 1m8.74s user, 8.68s sys
hard : 42.98s real, 1.80s user, 22.94s sys

  - The driver does a busy wait to check the completion of the
  encryption. I think it would be beter to use the interrupt. I will
  look later.
 
 I remember looking at that code sometime ago and that bit is really
 lame, so lame that I think they would do it in a different way if that
 was possible. Maybe it's worth contacting OpenBSD/NetBSD and ask?
 There might be a good reason for that.

Yes it seems strange, i've sent a mail to the author about this.
I've looked the Linux version of the driver and they use a busy wait
too.

[CUT]
 
  - Any comment is welcome, this is my first work on a driver.
 
 Looks good:) I can do a final review and commit once you are done and
 if I'll be able to start my Soekris and test it.

Thanks. I think it is ok for a review and test, i added the RNG stuff
since the last time and a manual page 'glxsb.4'

http://user.lamaiziere.net/patrick/glxsb.c
http://user.lamaiziere.net/patrick/glxsb.tar.gz (all the module)

Regards.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]