lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 06 Jul 2012 08:53:07 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	wfg@...ux.intel.com, netdev@...r.kernel.org,
	steffen.klassert@...unet.com
Subject: Re: BUG: unable to handle kernel paging request at 00000000d8be176d

On Thu, 2012-07-05 at 23:44 -0700, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@...il.com>
> Date: Fri, 06 Jul 2012 08:41:47 +0200
> 
> > David, what do you think if I submit a patch using following accessor ?
> > 
> > /* get a rt6_info given a dst_entry pointer */
> > static inline struct rt6_info *dst_rt6_info(struct dst_entry *dst)
> > {
> > 	return (struct rt6_info *)dst;
> > }
> 
> I'd rather we simply not use address-of pointers in our interfaces
> like we do now in some spots.
> 
> 99 times out of 100 it's a case where PTR_ERR() would do.
> 
> I spent a lot of time moving both ipv4 and ipv6 in this direction,
> we're almost there, and should simply finish off the remaining
> cases.

Not sure what you mean. I dont use address of pointer.

I suggested a type safe thing

ie change all

struct rt6_info *rt = (struct rt6_info *)dst;

by

struct rt6_info *rt = dst_rt6_info(dst);


same generated code, but we have compiler checks instead of a raw cast.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ