Re: [PATCH 1/3] remove non-portable usage of strndupa

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 27, 2013 at 2:16 AM, John Spencer <maillist-kmod@xxxxxxxxxxx> wrote:
> On 08/27/2013 01:46 AM, Lucas De Marchi wrote:
>>
>> On Mon, Aug 26, 2013 at 3:20 PM, John Spencer<maillist-kmod@xxxxxxxxxxx>
>> wrote:
>>>
>>> usage of strndupa is neither C99 nor POSIX,
>>> so musl libc does not implement it.
>>> it's a glibc invention, and a dangerous one since
>>> usage of alloca() is considered bad practice.
>>
>>
>> If the input is already sanitized and checked for length, this is
>> isn't really dangerous. Particularly on recursive functions this also
>> avoids growing the stack much more than needed.
>
> yes, but it is a dangerous function which can and will be misused when it is
> provided.

Dangerous? Misused? That is just pure nonsense.

> musl usually doesn't add exotic functions only used by a single package,
> even moreso when the function in question can compromise security.

So, this exotic libc can't be used for kmod as it is. Fine. :)

> since kmod is not a red-hat-GNU-linux specific package like systemd (which
> is even proud of nonportable code), but a linux-specific one, portability at
> least among available linux libcs should be a concern.

Just a hint: I would try to be less confrontational, if you like stuff
to be changed in a way that matters only to you.

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




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux