lkml.org 
[lkml]   [2023]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 05/30] selftests/rseq: Use ELF auxiliary vector for extensible rseq
Date
* Mathieu Desnoyers:

> +static
> +unsigned int get_rseq_feature_size(void)
> +{
> + unsigned long auxv_rseq_feature_size, auxv_rseq_align;
> +
> + auxv_rseq_align = getauxval(AT_RSEQ_ALIGN);
> + assert(!auxv_rseq_align || auxv_rseq_align <= RSEQ_THREAD_AREA_ALLOC_SIZE);
> +
> + auxv_rseq_feature_size = getauxval(AT_RSEQ_FEATURE_SIZE);
> + assert(!auxv_rseq_feature_size || auxv_rseq_feature_size <= RSEQ_THREAD_AREA_ALLOC_SIZE);
> + if (auxv_rseq_feature_size)
> + return auxv_rseq_feature_size;
> + else
> + return ORIG_RSEQ_FEATURE_SIZE;
> +}

Do you intend to use the auxiliary vector as the userspace handshake
for glibc-managed rseq, too? I don't think it works if the kernel
overtakes glibc. Or is there some other approach shown in the series
that I missed?

Maybe we should just skip the existing padding and use it only for
some vaguely kernel-internal purpose (say through a vDSO helper), so
that it is less of an issue how to communicate the presence of these
fields to userspace.

\
 
 \ /
  Last update: 2023-03-26 23:27    [W:0.226 / U:1.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site