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:	Wed, 25 Apr 2007 08:38:39 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	"John Anthony Kazos Jr." <jakj@...-k-j.com>
CC:	Richard Knutsson <ricknu-0@...dent.ltu.se>,
	Jiri Bohac <jbohac@...e.cz>, akpm@...l.org,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] fix abs() macro to work with types wider than int

John Anthony Kazos Jr. wrote:
>>>> I think it's like it is just to be consistent with abs() in C,
>>>> which also contains labs() and llabs().
>>>>   
>>> We actually had labs() before (few months ago), but since it was not 
>>> used, and if it would it seemed better to just fix abs(), it was 
>>> removed. So I think this is the appropriate way to go.
>> Sounds like when someone actually needs labs() or llabs()
>> they can submit a patch for however they would like to use it.
> 
> However they would like to use *abs()? What different ways are possible to 
> take the arithmetic absolute value? I see record of many cases where 
> dozens of authors have macros that then get collapsed to include files. So 
> why not avoid that annoyance this time and -start- with it in the include 
> files?
> 
> Can there even be any reason beyond unnecessary pedantics to have 
> [l[l]]abs?

See Paragraph 1 above.  We do lots of functions in a manner that is
like C (or libc) so that we don't confuse developers.

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ