Re:A bug story: data alignment in C on x86 (2016)
by ahmedalsudani on Tuesday September 04, 2018 @03:21PM
(#17912004)
It’s impressive of you to dig out all those implementations! Do you have a trick for navigating codebases?
Re:A bug story: data alignment in C on x86 (2016)
by dronemallone on Tuesday September 04, 2018 @09:39PM
(#17914455)
Thanks. Not really, I just look at the IPv4 implementation, it's easily to search for csum or chksum or checksum in codebases.
Re:A bug story: data alignment in C on x86 (2016)
by valarauca1 on Tuesday September 04, 2018 @03:51PM
(#17912233)
The first provided link is extremely useful as it lets you jump to declarations, files, and line numbers in the current Linux Kernel source. For digging up kernel code snippets it it is extremely useful.
Also like the kernel is fairly sanely laid out. Its a project with literally hundreds of contributors so keeping the code base organized is important.
Re:A bug story: data alignment in C on x86 (2016)
by cryptonector on Tuesday September 04, 2018 @04:14PM
(#17912387)
I mean, there are LXR and OpenGrok indexes of the various kernels... E.g., http://src.illumos.org/source/ https://elixir.bootlin.com/linux/latest/source etc... If you make a local clone, then cscope is great.
Re:A bug story: data alignment in C on x86 (2016)
by saagarjha on Tuesday September 04, 2018 @03:40PM
(#17912150)
Not to downplay their achievements, but it seems to me that they just dug up the implementations in the IP stack for each OS.
Re:A bug story: data alignment in C on x86 (2016)
by dronemallone on Tuesday September 04, 2018 @09:40PM
(#17914458)
That's true, pretty easy to do once you look in the "net" or "inet" or "netinet" folders and then look for ipv4.
https://elixir.bootlin.com/linux/latest/source/arch/x86/incl...
Or even NetBSD: http://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/net/...
EDIT:
freebsd: https://github.com/freebsd/freebsd/blob/master/sys/netinet/i...
openbsd: https://github.com/openbsd/src/blob/master/sys/netinet/in4_c...