[CRIU] [PATCH 1/5] x86: Add builtin_memcmp, builtin_strcmp helpers

Cyrill Gorcunov gorcunov at openvz.org
Mon May 20 08:08:53 EDT 2013


On Mon, May 20, 2013 at 04:04:09PM +0400, Pavel Emelyanov wrote:
> On 05/20/2013 03:59 PM, Cyrill Gorcunov wrote:
> > On Mon, May 20, 2013 at 03:55:10PM +0400, Pavel Emelyanov wrote:
> >> On 05/16/2013 07:33 PM, Cyrill Gorcunov wrote:
> >>> Will need it for vDSO library parsing.
> >>>
> >>> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> >>> ---
> >>>  arch/x86/include/asm/string.h | 33 +++++++++++++++++++++++++++++++++
> >>>  1 file changed, 33 insertions(+)
> >>>  create mode 100644 arch/x86/include/asm/string.h
> >>>
> >>
> >>
> >> I haven't found where in the pie/ code these are used. 
> > 
> > arch/x86/include/asm/vdso.h:            if (!builtin_strcmp(symbol, vdso_x86_symbols[i]))
> > arch/x86/include/asm/vdso.h:    if (builtin_memcmp(ehdr->e_ident, vdso_ident, sizeof(vdso_ident))) {
> > arch/x86/include/asm/vdso.h: builtin_strcmp(&section_names[shdr->sh_name],
> > arch/x86/include/asm/vdso.h: builtin_strcmp(&section_names[shdr->sh_name],
> > arch/x86/include/asm/vdso.h: builtin_strcmp(&section_names[shdr->sh_name],
> > arch/x86/include/asm/vdso.h:                    builtin_memcpy(t->sym[k].name, vdso_x86_symbols[k],
> > 
> > they are used in inline functions
> 
> Which are in turn are used in crtools code, not in pie/ one...

No, it's used for both -- plain criu code (on restorer, when I need to
parse run-time vdso symbols) and in parasite code, which is called on
dump stage, see parasite_parse_vdso function.


More information about the CRIU mailing list