Re: vmmap replacement -- please test

2012-01-05 Thread Juan Francisco Cantero Hurtado
On Fri, 30 Dec 2011 17:55:27 +0100, Ariane van der Steldt  
 wrote:



On Fri, Dec 30, 2011 at 03:04:30PM +0100, Ariane van der Steldt wrote:

On Fri, Dec 30, 2011 at 02:42:18PM +0100, Ariane van der Steldt wrote:
> The huge diff included below is to replace vmmap for something that
> works a lot better. This is the second version I plan to commit.
> I have been running this on my laptop for months and have had no
> problems.
>
> The current incarnation is:
>   vmmap_sys.diff.63


Which never made it to the list apparently. I'll just blame spam
filtering and provide it an alternative way:
  http://www.stack.nl/~ariane/vmmap_sys.diff.63

SHA256 (vmmap_sys.diff.63) =  
5c3e71360795f3899baa652f6ba6caa999b137b01a778dca12c253af1dbcff00

MD5 (vmmap_sys.diff.63) = 11736a0bacb0b8b72079935ba01c62c4
size: 305720 bytes


Highlights:
- the mapping and allocation (address selection) logic is split
- the allocator is in compatibility mode, meaning it ought to perform
  the same strategies (and hence contain the same bugs, yay) as the
  version that you are running in your kernel at the moment
  (this means java and various browsers won't die horribly, at least not
  more than they used to)
- despite using the same algorithm, it is a bit^W alot faster
- it's only a 3^W 10494 line diff :P

I'll need testing on any and all architectures.

Thanks,


Hi, I've tried both patches on i386. The system crashed.

The code in src is a clean checkout from 3 January. I applied the patches  
in src and src/sys without errors.


I compiled the kernel and userland with this steps:
export PARALLEL_BUILD=YES
export MAKE_JOBS=2
cd /usr/src/sys/arch/i386/conf
config GENERIC.MP
cd ../compile/GENERIC.MP
make clean
make
make install
rm -rf /usr/obj/*
cd /usr/src
make obj
cd /usr/src
make build

dmesg with trace and ps:  
http://juanfra.info/bugs-y-listas/obsd-vmmap-201201/dmesg.txt.bz2


When I boot the system with /obsd (from snapshots) and the userland with  
your patch applied, all works without issues.


I will save the dump for a few weeks. If you need more info, ask me.

Cheers.

--
Juan Francisco Cantero Hurtado http://juanfra.info



use TAILQ for fragmented IPv6 packets

2012-01-05 Thread Alexander Bluhm
Hi,

The hand crafted-queue for fragmented IPv6 packets is hard to read.
Can we replace it with a TAILQ?

ok?

bluhm


Index: netinet6/frag6.c
===
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/frag6.c,v
retrieving revision 1.34
diff -u -p -r1.34 frag6.c
--- netinet6/frag6.c2 May 2011 22:16:33 -   1.34
+++ netinet6/frag6.c5 Jan 2012 15:44:52 -
@@ -64,14 +64,12 @@
 
 void frag6_enq(struct ip6asfrag *, struct ip6asfrag *);
 void frag6_deq(struct ip6asfrag *);
-void frag6_insque(struct ip6q *, struct ip6q *);
-void frag6_remque(struct ip6q *);
 void frag6_freef(struct ip6q *);
 
 static int ip6q_locked;
 u_int frag6_nfragpackets;
 u_int frag6_nfrags;
-struct ip6q ip6q;  /* ip6 reassemble queue */
+TAILQ_HEAD(ip6q_head, ip6q) frag6_queue;   /* ip6 reassemble queue */
 
 static __inline int ip6q_lock_try(void);
 static __inline void ip6q_unlock(void);
@@ -131,7 +129,7 @@ void
 frag6_init(void)
 {
 
-   ip6q.ip6q_next = ip6q.ip6q_prev = &ip6q;
+   TAILQ_INIT(&frag6_queue);
 }
 
 /*
@@ -235,7 +233,7 @@ frag6_input(struct mbuf **mp, int *offp,
 
ip6stat.ip6s_fragments++;
in6_ifstat_inc(dstifp, ifs6_reass_reqd);
-   
+
/* offset now points to data portion */
offset += sizeof(struct ip6_frag);
 
@@ -251,13 +249,13 @@ frag6_input(struct mbuf **mp, int *offp,
else if (frag6_nfrags >= (u_int)ip6_maxfrags)
goto dropfrag;
 
-   for (q6 = ip6q.ip6q_next; q6 != &ip6q; q6 = q6->ip6q_next)
+   TAILQ_FOREACH(q6, &frag6_queue, ip6q_queue)
if (ip6f->ip6f_ident == q6->ip6q_ident &&
IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, &q6->ip6q_src) &&
IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &q6->ip6q_dst))
break;
 
-   if (q6 == &ip6q) {
+   if (q6 == TAILQ_END(&frag6_queue)) {
/*
 * the first fragment to arrive, create a reassembly queue.
 */
@@ -279,7 +277,7 @@ frag6_input(struct mbuf **mp, int *offp,
if (q6 == NULL)
goto dropfrag;
 
-   frag6_insque(q6, &ip6q);
+   TAILQ_INSERT_HEAD(&frag6_queue, q6, ip6q_queue);
 
/* ip6q_nxt will be filled afterwards, from 1st fragment */
q6->ip6q_down   = q6->ip6q_up = (struct ip6asfrag *)q6;
@@ -494,9 +492,9 @@ insert:
frag6_nfrags++;
q6->ip6q_nfrag++;
 #if 0 /* xxx */
-   if (q6 != ip6q.ip6q_next) {
-   frag6_remque(q6);
-   frag6_insque(q6, &ip6q);
+   if (q6 != TAILQ_FIRST(&frag6_queue)) {
+   TAILQ_REMOVE(&frag6_queue, q6, ip6q_queue);
+   TAILQ_INSERT_HEAD(&frag6_queue, q6, ip6q_queue);
}
 #endif
next = 0;
@@ -545,7 +543,7 @@ insert:
 
/* Delete frag6 header */
if (frag6_deletefraghdr(m, offset) != 0) {
-   frag6_remque(q6);
+   TAILQ_REMOVE(&frag6_queue, q6, ip6q_queue);
frag6_nfrags -= q6->ip6q_nfrag;
free(q6, M_FTABLE);
frag6_nfragpackets--;
@@ -560,7 +558,7 @@ insert:
*prvnxtp = nxt;
}
 
-   frag6_remque(q6);
+   TAILQ_REMOVE(&frag6_queue, q6, ip6q_queue);
frag6_nfrags -= q6->ip6q_nfrag;
free(q6, M_FTABLE);
frag6_nfragpackets--;
@@ -571,7 +569,7 @@ insert:
plen += t->m_len;
m->m_pkthdr.len = plen;
}
-   
+
ip6stat.ip6s_reassembled++;
in6_ifstat_inc(dstifp, ifs6_reass_ok);
 
@@ -655,7 +653,7 @@ frag6_freef(struct ip6q *q6)
m_freem(m);
free(af6, M_FTABLE);
}
-   frag6_remque(q6);
+   TAILQ_REMOVE(&frag6_queue, q6, ip6q_queue);
frag6_nfrags -= q6->ip6q_nfrag;
free(q6, M_FTABLE);
frag6_nfragpackets--;
@@ -690,28 +688,6 @@ frag6_deq(struct ip6asfrag *af6)
af6->ip6af_down->ip6af_up = af6->ip6af_up;
 }
 
-void
-frag6_insque(struct ip6q *new, struct ip6q *old)
-{
-
-   IP6Q_LOCK_CHECK();
-
-   new->ip6q_prev = old;
-   new->ip6q_next = old->ip6q_next;
-   old->ip6q_next->ip6q_prev= new;
-   old->ip6q_next = new;
-}
-
-void
-frag6_remque(struct ip6q *p6)
-{
-
-   IP6Q_LOCK_CHECK();
-
-   p6->ip6q_prev->ip6q_next = p6->ip6q_next;
-   p6->ip6q_next->ip6q_prev = p6->ip6q_prev;
-}
-
 /*
  * IPv6 reassembling timer processing;
  * if a timer expires on a reassembly
@@ -720,31 +696,27 @@ frag6_remque(struct ip6q *p6)
 void
 frag6_slowtimo(void)
 {
-   struct ip6q *q6;
+   struct ip6q *q6, *nq6;
int s = splsoftnet();
 
IP6Q_LOCK();
-   q6 = ip6q.ip6q_next;
-   if (q6)
-   while (q6 != &ip6q) {
-   --q6->ip6q_ttl;
-   q6 = q6->ip6q_next;
-   if (q6->ip6q_prev->ip6q_ttl == 0) {
-   i

remove dead ipsrcchk_rt from frag6

2012-01-05 Thread Alexander Bluhm
Hi,

Remove dead code from #if 0:
We do not have an ipsrcchk_rt anywhere else.
>From FreeBSD

ok?

bluhm


Index: netinet6/frag6.c
===
RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/frag6.c,v
retrieving revision 1.34
diff -u -p -r1.34 frag6.c
--- netinet6/frag6.c2 May 2011 22:16:33 -   1.34
+++ netinet6/frag6.c5 Jan 2012 16:56:21 -
@@ -758,10 +758,6 @@ frag6_slowtimo(void)
RTFREE(ip6_forward_rt.ro_rt);
ip6_forward_rt.ro_rt = 0;
}
-   if (ipsrcchk_rt.ro_rt) {
-   RTFREE(ipsrcchk_rt.ro_rt);
-   ipsrcchk_rt.ro_rt = 0;
-   }
 #endif
 
splx(s);



Re: rc.d unbound daemon start order

2012-01-05 Thread Peter Bisroev
On Thu, Jan 5, 2012 at 04:17, Chris Cappuccio  wrote:
> Stuart Henderson [s...@spacehopper.org] wrote:
>>
>> Alternatively I think it would work to add "!/etc/rc.d/unbound start"
>> to a suitable hostname.if file, though that's a bit of a hack and this
>> seems like a useful additioto use an alternative
>> syslogd which is another good candidate for starting early) .
>
> This is slightly better for the unbound use case, keeps from adding another
line of text at startup, and still works fine if you were going to usurp
syslogd with an early script as well.
>
> --- /etc/rc B  B  Fri Dec B 9 10:13:53 2011
> +++ rc B Thu Jan B 5 01:00:21 2012
> @@ -232,6 +232,9 @@
> B if [ X"$1" = X"shutdown" ]; then
> B  B  B  B dd if=/dev/arandom of=/var/db/host.random bs=65536 count=1
>/dev/null 2>&1
> B  B  B  B chmod 600 /var/db/host.random >/dev/null 2>&1
> + B  B  B  if [ -n "${pkg_early_scripts}" ]; then
> + B  B  B  B  B  B  B  pkg_scripts="${pkg_scripts} ${pkg_early_scripts}"
> + B  B  B  fi
> B  B  B  B local _c=$?
> B  B  B  B if [ ${_c} -eq 0 -a -n "${pkg_scripts}" ]; then
> B  B  B  B  B  B  B  B echo -n 'stopping package daemons:'
> @@ -396,7 +399,14 @@
> B make_keys
>
> B echo -n 'starting early daemons:'
> -start_daemon syslogd ldattach pflogd named nsd ntpd isakmpd iked sasyncd
> +start_daemon syslogd
> +# Run rc.d(8) early scripts from packages
> +if [ -n "${pkg_early_scripts}" ]; then
> + B  B  B  for _r in $pkg_early_scripts; do
> + B  B  B  B  B  B  B  [ -x /etc/rc.d/${_r} ] && start_daemon ${_r}
> + B  B  B  done
> +fi
> +start_daemon ldattach pflogd named nsd ntpd isakmpd iked sasyncd
> B start_daemon ldapd
> B echo '.'
>

Thank you for a quick response guys! Chris if you are talking about
modifying /etc/rc does that mean that there could be a plan in the
future to add that to the CVS? In the interim, should I test your
patch or is Stuart's way of starting unbound should be used for now?

Cheers,
--peter



Merhaba

2012-01-05 Thread Fatma Y.
E-postay} d|zg|n gvremiyorsan}z buraya t}klay}n.




"Finally" Workers' Compensation Insurance Made Simple and Cost Effective

2012-01-05 Thread Andersen Group LLC
View online version
https://www.magnetmail.net/actions/email_web_version.cfm?recipient_id=8589472
51&message_id=1665907&user_id=CM_AG&VERSION=TEXT&group_id=760280&jobid=8484738
Pay-As-You-Go Workers' Compensation Insurance
"Finally Made Cost Effective and Simple"7 Have your current Insurance Agent
call us or you can call us direct to save an additonal 10%
7 Save Hundreds of $$$
7 No Down Payment
7 References provided7 AM Best Insurance Companies Used
7 Maximize your Cash Flow
7 No Payroll Services Needed
7 Our very Simple monthly reporting format
will Free-Up and Maximize your Cash FlowPlease call or email Jeffrey
Kearns to learn more or receive a quote at jlkea...@andersen-groupins.com
mailto:jlkea...@andersen-groupins.com
636-447-4939 7 www.andersen-groupins.com http://www.andersen-groupins.com
**
244 Coachman
Way, O'Fallon, MO 63366
**
Use this link
to unsubscribe:
http://www.magnetmail.net/Actions/unsubscribe.cfm?message_id=1665907&user_id=
CM_AG&recipient_id=858947251&email=tech@openbsd.org&group_id=760280



Re: rc.d unbound daemon start order

2012-01-05 Thread Chris Cappuccio
Stuart Henderson [s...@spacehopper.org] wrote:
>
> Alternatively I think it would work to add "!/etc/rc.d/unbound start"
> to a suitable hostname.if file, though that's a bit of a hack and this
> seems like a useful additioto use an alternative
> syslogd which is another good candidate for starting early) .

This is slightly better for the unbound use case, keeps from adding another 
line of text at startup, and still works fine if you were going to usurp 
syslogd with an early script as well.

--- /etc/rc Fri Dec  9 10:13:53 2011
+++ rc  Thu Jan  5 01:00:21 2012
@@ -232,6 +232,9 @@
 if [ X"$1" = X"shutdown" ]; then
dd if=/dev/arandom of=/var/db/host.random bs=65536 count=1 >/dev/null 
2>&1
chmod 600 /var/db/host.random >/dev/null 2>&1
+   if [ -n "${pkg_early_scripts}" ]; then
+   pkg_scripts="${pkg_scripts} ${pkg_early_scripts}"
+   fi
local _c=$?
if [ ${_c} -eq 0 -a -n "${pkg_scripts}" ]; then
echo -n 'stopping package daemons:'
@@ -396,7 +399,14 @@
 make_keys
 
 echo -n 'starting early daemons:'
-start_daemon syslogd ldattach pflogd named nsd ntpd isakmpd iked sasyncd
+start_daemon syslogd
+# Run rc.d(8) early scripts from packages
+if [ -n "${pkg_early_scripts}" ]; then
+   for _r in $pkg_early_scripts; do
+   [ -x /etc/rc.d/${_r} ] && start_daemon ${_r}
+   done
+fi
+start_daemon ldattach pflogd named nsd ntpd isakmpd iked sasyncd
 start_daemon ldapd
 echo '.'



Re: rc.d unbound daemon start order

2012-01-05 Thread Chris Cappuccio
Stuart Henderson [s...@spacehopper.org] wrote:
> 
> Alternatively I think it would work to add "!/etc/rc.d/unbound start"
> to a suitable hostname.if file, though that's a bit of a hack and this
> seems like a useful addition (some people like to use an alternative
> syslogd which is another good candidate for starting early).

After reading this, it occurs to me, syslogd should be moved above 
pkg_early_scripts initialization, so if you happen to be using the system 
syslogd, you won't miss any opening messages from unbound (e.g. "your config 
file is broke")



Re: rc.d unbound daemon start order

2012-01-05 Thread Stuart Henderson
On 2012/01/04 23:48, Chris Cappuccio wrote:
> Peter Bisroev [pe...@int19h.net] wrote:
> >
> > After looking in the 'starting early daemons:' section in /etc/rc I ccan 
> > see that
> > named and nsd are started before ntpd. If named is used as a recursive 
> > caching
> > DNS server everything would work as expected. But with nsd that would not 
> > be the
> > case since it is an authoritative only server.
> 
> I suspect you want a feature like this. It would give you a pkg_early_scripts 
> option to go in rc.conf.local along with your pkg_scripts.

Alternatively I think it would work to add "!/etc/rc.d/unbound start"
to a suitable hostname.if file, though that's a bit of a hack and this
seems like a useful addition (some people like to use an alternative
syslogd which is another good candidate for starting early).