Page MenuHomeFreeBSD

Provide string functions for use before ifuncs get resolved.
ClosedPublic

Authored by mjg on Oct 9 2018, 9:20 PM.

Details

Summary

The change is a no-op for architectures which don't ifunc memset, memcpy nor memmove.

Test Plan

tinderbox, royger's use case

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mjg created this revision.Oct 9 2018, 9:20 PM
royger accepted this revision.Oct 10 2018, 7:31 AM

Thanks, this allows to fix the Xen boot issue. Would you mind including the following diff into your patch?

http://xenbits.xen.org/people/royger/fix_early_memset.patch

I think it's much better if the patch also fixes the current usages, or else you are introducing a set of functions that are unused.

This revision is now accepted and ready to land.Oct 10 2018, 7:31 AM
kib added a comment.Oct 10 2018, 12:09 PM

Thanks, this allows to fix the Xen boot issue. Would you mind including the following diff into your patch?
http://xenbits.xen.org/people/royger/fix_early_memset.patch
I think it's much better if the patch also fixes the current usages, or else you are introducing a set of functions that are unused.

There is also the use in link_elf.c:link_elf_ireloc().

sys/amd64/include/cpufunc.h
1019 ↗(On Diff #48950)

cpufunc.h is definitely wrong place. I suggested cpu.h.

mjg updated this revision to Diff 49019.Oct 11 2018, 2:30 PM
  • move macros to cpu.h
  • convert current hand-rolled code to use early, xen bits from royger
This revision now requires review to proceed.Oct 11 2018, 2:30 PM
emaste added a subscriber: emaste.Oct 11 2018, 2:52 PM
imp added a comment.Oct 11 2018, 2:59 PM

Is there any way to know you've got them all?

kib accepted this revision.Oct 11 2018, 4:20 PM
This revision is now accepted and ready to land.Oct 11 2018, 4:20 PM
This revision was automatically updated to reflect the committed changes.