Thread (5 messages) 5 messages, 2 authors, 2011-08-12

Re: [PATCH] Alpha: unbreak osf_setsysinfo(SSI_NVPAIRS, [SSIN_UACPROC, UAC_SIGBUS])

From: Michael Cree <hidden>
Date: 2011-08-12 23:34:58

On 13/08/11 09:51, Sergei Trofimovich wrote:
quoted
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.
quoted
| (((value) << ALPHA_UAC_SHIFT)       & (1<<TIF_UAC_NOPRINT))
prctl.h: # define PR_UNALIGN_NOPRINT     1
quoted
|  (((value) << (ALPHA_UAC_SHIFT + 1)) & (1<<TIF_UAC_SIGBUS))
prctl.h: # define PR_UNALIGN_SIGBUS      2
quoted
| (((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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help