Re: [PATCH 1/4] selftests/resctrl: Return error if memory is not allocated

From: Reinette Chatre
Date: Tue Feb 14 2023 - 12:03:32 EST


Hi Ilpo,

On 2/14/2023 1:32 AM, Ilpo Järvinen wrote:
> On Mon, 13 Feb 2023, Reinette Chatre wrote:

>> Missing your Signed-off-by?
>
> These were intentionally. When I didn't modify the original patch at
> all during forward porting it, I just kept the original From and SoB as
> is. But from the doc you pointed me to, I see now x86 wants also handlers
> sobs.

I do not think this is x86 specific.
Documentation/process/submitting-patches.rst states:
"Any further SoBs (Signed-off-by:'s) following the author's SoB are from
people handling and transporting the patch, but were not involved in its
development. SoB chains should reflect the **real** route a patch took
as it was propagated to the maintainers and ultimately to Linus, with
the first SoB entry signalling primary authorship of a single author."


>
>>> ---
>>> tools/testing/selftests/resctrl/fill_buf.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/tools/testing/selftests/resctrl/fill_buf.c b/tools/testing/selftests/resctrl/fill_buf.c
>>> index 56ccbeae0638..f4880c962ec4 100644
>>> --- a/tools/testing/selftests/resctrl/fill_buf.c
>>> +++ b/tools/testing/selftests/resctrl/fill_buf.c
>>> @@ -68,6 +68,8 @@ static void *malloc_and_init_memory(size_t s)
>>> size_t s64;
>>>
>>> void *p = memalign(PAGE_SIZE, s);
>>
>> This may also be a good time to stop using an obsolete call?
>
> Sure, I can add another patch to change that to posix_memalign().

You can also consider aligned_alloc().

Reinette