On 13/08/11 09:51, Sergei Trofimovich wrote: >> I'll build alpha toolchain / qemu root and will try to cook >> nicer patch with compile-time safety checks. > > Sent reworked patch: http://marc.info/?l=linux-alpha&m=131318270531656&w=2 > > Yelling at the header I've found minor nit: > ... > #define SET_UNALIGN_CTL(task,value) ({ \ > task_thread_info(task)->flags = ((task_thread_info(task)->flags & \ > ~ALPHA_UAC_MASK) > | (((value) << ALPHA_UAC_SHIFT) & (1<<TIF_UAC_NOPRINT))\ > | (((value) << (ALPHA_UAC_SHIFT + 1)) & (1<<TIF_UAC_SIGBUS)) \ > | (((value) << (ALPHA_UAC_SHIFT - 1)) & (1<<TIF_UAC_NOFIX)));\ > 0; }) > > #define GET_UNALIGN_CTL(task,value) ({ \ > put_user((task_thread_info(task)->flags & (1 << TIF_UAC_NOPRINT))\ > >> ALPHA_UAC_SHIFT \ > | (task_thread_info(task)->flags & (1 << TIF_UAC_SIGBUS))\ > >> (ALPHA_UAC_SHIFT + 1) \ > | (task_thread_info(task)->flags & (1 << TIF_UAC_NOFIX))\ > >> (ALPHA_UAC_SHIFT - 1), \ > (int __user *)(value)); \ > }) > > The macros SET_UNALIGN_CTL/GET_UNALIGN_CTL are used > only in kernel/sys.c:prctl syscall. > >> | (((value) << ALPHA_UAC_SHIFT) & (1<<TIF_UAC_NOPRINT)) > prctl.h: # define PR_UNALIGN_NOPRINT 1 > >> | (((value) << (ALPHA_UAC_SHIFT + 1)) & (1<<TIF_UAC_SIGBUS)) > prctl.h: # define PR_UNALIGN_SIGBUS 2 > >> | (((value) << (ALPHA_UAC_SHIFT - 1)) & (1<<TIF_UAC_NOFIX))); > > prctl.h: no '4' value > > Do you think it's worth adding to userspace interface > or should one just remove it from handled by prctl flags [ABI change]? My understanding is that user-space ABI changes/removals are unacceptable. It has been there for some time thus must remain. But I do note that the NOFIX option is not documented in the prctl syscall man page or in the prctl application man page, so only someone acquainted with the kernel code would know it exists. My feeling is that it should stay the way it is. I'm not aware of a use for the NOFIX option, and I have no idea why it was originally implemented -- its implementation predates git history. But others more familiar with early development of Alpha arch code may disagree with me. Cheers Michael. -- To unsubscribe from this list: send the line "unsubscribe linux-alpha" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html