On Thu, Apr 5, 2018 at 9:26 PM, Oliver <ooh...@gmail.com> wrote: > On Thu, Apr 5, 2018 at 5:14 PM, Balbir Singh <bsinghar...@gmail.com> wrote: >> The pmem infrastructure uses memcpy_mcsafe in the pmem >> layer so as to convert machine check excpetions into >> a return value on failure in case a machine check >> exception is encoutered during the memcpy. >> > > Would it be possible to move the bulk of the copyuser code into a > seperate file which can be #included once the these err macros are > defined? Anton's memcpy is pretty hairy and I don't think anyone wants > to have multiple copies of it in the tree, even in a cut down form. >
I've split it out for now, in the future that might be a good thing to do. The copy_tofrom_user_power7 falls backs on __copy_tofrom_user_base to track exactly how much is left over. Adding these changes there would create a larger churn and need way more testing. I've taken this short-cut for now with a promise to fix that as the semantics of memcpy_mcsafe() change to do more accurate tracking of how much was copied over. Balbir Singh.