On Wed, Sep 7, 2016 at 9:37 AM, Joe Perches wrote:
> On Wed, 2016-09-07 at 09:23 -0700, Kees Cook wrote:
>> Fixing these kmalloc calls would be a nice thing to clean up
>> everywhere.
>
> Dubious as gcc cannot currently optimize known small fixed size
> allocations with alloc_array and will always
> Fixing these kmalloc calls would be a nice thing to clean up everywhere.
Thanks for your acknowledgement of such a software improvement opportunity.
> Since it is a mistake people may continue to make, I think it would
> make sense to add a coccinelle script that can do this to the
> existing
On Wed, 2016-09-07 at 09:23 -0700, Kees Cook wrote:
> Fixing these kmalloc calls would be a nice thing to clean up
> everywhere.
Dubious as gcc cannot currently optimize known small fixed size
allocations with alloc_array and will always perform the
multiplication.
Also the style of sizeof(*ptr)
On Wed, Sep 7, 2016 at 4:45 AM, SF Markus Elfring
wrote:
>>> Would the following script (for the semantic patch language)
>>> be useful enough for further development considerations?
>>>
>>> usage_of_kmalloc_array1-excerpt2.cocci:
>>> @replacement2@
>>> expression count, pointer, target;
>>> @@
>>
>> Would the following script (for the semantic patch language)
>> be useful enough for further development considerations?
>>
>> usage_of_kmalloc_array1-excerpt2.cocci:
>> @replacement2@
>> expression count, pointer, target;
>> @@
>> target =
>> - kmalloc(sizeof(*pointer) * (count)
>> +
On 07/09/2016 13:17, SF Markus Elfring wrote:
>>> Are you looking for further possibilities to improve the involved
>>> source code search patterns?
>>
>> Why are you not answering the simple question that was asked?
>
> I find that I answered it to some degree.
>
> It can be that you do not re
>> Are you looking for further possibilities to improve the involved
>> source code search patterns?
>
> Why are you not answering the simple question that was asked?
I find that I answered it to some degree.
It can be that you do not really like the kind of answer that I chose
a moment ago.
But
On 07/09/2016 09:49, SF Markus Elfring wrote:
>>> A multiplication for the size determination of a memory allocation
>>> indicated that an array data structure should be processed.
>>> Thus use the corresponding function "kmalloc_array".
>>>
>>> This issue was detected by using the Coccinelle sof
>> A multiplication for the size determination of a memory allocation
>> indicated that an array data structure should be processed.
>> Thus use the corresponding function "kmalloc_array".
>>
>> This issue was detected by using the Coccinelle software.
>
> Which rule-set was used?
Do you get an u
On Sun, Sep 4, 2016 at 4:23 PM, SF Markus Elfring
wrote:
> From: Markus Elfring
> Date: Sun, 4 Sep 2016 22:15:09 +0200
>
> A multiplication for the size determination of a memory allocation
> indicated that an array data structure should be processed.
> Thus use the corresponding function "kmallo
From: Markus Elfring
Date: Sun, 4 Sep 2016 22:15:09 +0200
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".
This issue was detected by using the Coccinelle software.
11 matches
Mail list logo