Re:Regression in Linux 4.14 – using bcache can destroy the f...
by akkartik on Tuesday November 21, 2017 @11:13PM
(#15754175)
Minor tangent: I think your links into the curl repo may have rotted in the past 7 months, so they're not pointing at the lines you intended them to. For comments like this that are likely to be cited far in the future, I recommend using a link at a specific tree rather than just HEAD. So this:
https://github.com/curl/curl/blob/8aee8a6a2d/lib/vtls/vtls.c#L94
and not this: https://github.com/curl/curl/blob/master/lib/vtls/vtls.c#L94
(Deliberately disabling truncation on the URL, at the cost of losing clickability. This comment isn't really about these specific links anyway, just the 'syntax' of the URL.)
Re:Regression in Linux 4.14 – using bcache can destroy the f...
by bostonvaulter2 on Tuesday November 21, 2017 @11:21PM
(#15754204)
Also if you are viewing a file on github you can get the canonical link by pressing `y`
Quoting myself from https://www.reddit.com/r/programming/comments/61rh9j/curl_is... :
> For instance, the patch for CVE-2016-5420, "Incorrect reuse of client certificates", is about making sure that when you compare two structs, you don't forget to compare a field in the two structs. In C, you have to open-code this comparison. In Rust, you just stick #[deriving(Eq)] before the struct, because unlike C, Rust knows that comparison of structs is a thing that people might want to do ever. The compiler will generate a trait Eq implementation that compares all the fields, using the Eq implementations (either automatically-derived or manual) of each field, so you even get secure string compares if you define some SecureBuffer type and use it for the strings. (As a bonus, doing that also makes sure that you don't accidentally use a normal strcmp on the strings.) When you add a new field to the struct, the automatic Eq implementation on the struct will automatically compare it, too.
(Disclaimer: while I happen to like Rust, there are plenty of other languages you could also use instead—Microsoft Research even made a fork of C# designed for kernelspace. And while I am interested in writing Rust, I'm not particularly interested in telling people who are happy writing C that they should stop, just in making sure that people considering a language for a new project know what each language brings to the table.)