[PATCH v5 14/22] elf: Issue audit la_objopen() for vDSO
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Nov 11 20:16:30 GMT 2021
On 11/11/2021 14:50, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>> +static int
>> +handle_restart (void)
>> +{
>> + fprintf (stderr, "vdso: %" PRIxPTR "\n", vdso_addr);
>> + return 0;
>> +}
>> +
>> +static unsigned long int
>> +parse_address (const char *str)
>> +{
>> + char *endptr;
>> + long int ret;
>> + errno = 0;
>> + ret = strtol (str, &endptr, 10);
>> + TEST_COMPARE (errno, 0);
>> + TEST_VERIFY (ret >= 0 && ret <= INT_MAX);
>> + return ret;
>> +}
>
> Doesn't parse_address always produce 0 fpr PRIxPTR values because
> reading stops at the 'x'? Maybe use printf and scanf with %p instead?
It is indeed better, I will change it.
>
> The rest of the patch looks okay to me. Placement of the audit call
> seems reasonable.
>
> Thanks,
> Florian
>
More information about the Libc-alpha
mailing list