[Top] [All Lists]

Re: [PATCH] OpenBSD Networking-related randomization port

To: Lorenzo Hernández García-Hierro <lorenzo@xxxxxxx>
Subject: Re: [PATCH] OpenBSD Networking-related randomization port
From: Arjan van de Ven <arjan@xxxxxxxxxxxxx>
Date: Fri, 28 Jan 2005 21:47:45 +0100
Cc: Stephen Hemminger <shemminger@xxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxx>, netdev@xxxxxxxxxxx, Hank Leininger <hlein@xxxxxxxxxxxxxxxxxxxx>
In-reply-to: <1106944492.3864.30.camel@xxxxxxxxxxxxxxxxxxxxx>
References: <1106932637.3778.92.camel@xxxxxxxxxxxxxxxxxxxxx> <20050128100229.5c0e4ea1@xxxxxxxxxxxxxxxxx> <1106937110.3864.5.camel@xxxxxxxxxxxxxxxxxxxxx> <20050128105217.1dc5ef42@xxxxxxxxxxxxxxxxx> <1106944492.3864.30.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Fri, 2005-01-28 at 21:34 +0100, Lorenzo Hernández García-Hierro
> Hi,
> Attached the new patch following Arjan's recommendations.
> I'm sorry about not making it "inlined", but my mail agent messes up the
> diffs if I do so.
> Still waiting for the OSDL STP tests results, they will take a while to
> finish.
> Cheers,

lots better already! Some more comments (now that the patch got a lot
easier to read :)

 static inline __u32 tcp_v4_init_sequence(struct sock *sk, struct
sk_buff *skb)
-       return secure_tcp_sequence_number(skb->nh.iph->daddr,
-                                         skb->nh.iph->saddr,
-                                         skb->>dest,
-                                         skb->>source);
+               return ip_randomisn();

is there a reason for the weird indentation?

+       if (!tp->write_seq) {
+                       tp->write_seq = ip_randomisn();
+       }

spare { } pare that's not needed, also looks like one tab too many

as for obsd_get_random_long().. would it be possible to use the
get_random_int() function from the patches I posted the other day? They
use the existing random.c infrastructure instead of making a copy...

I still don't understand why you need a obsd_rand.c and can't use the
normal random.c

 static inline u32 xprt_alloc_xid(struct rpc_xprt *xprt)
-       return xprt->xid++;
+       /* Return randomized xprt->xid instead of prt->xid++ */
+       return (u32) obsd_get_random_long();

that cast looks quite redundant...

<Prev in Thread] Current Thread [Next in Thread>