On 13/08/11 09:01, Sergei Trofimovich wrote: > The bug was accidentally found by the following program: > #include <asm/sysinfo.h> > #include <asm/unistd.h> > #include <sys/syscall.h> > static int setsysinfo(unsigned long op, void *buffer, unsigned long size, > int *start, void *arg, unsigned long flag) { > return syscall(__NR_osf_setsysinfo, op, buffer, size, start, arg, flag); > } > > int main(int argc, char **argv) { > short x[10]; > unsigned int buf[2] = { SSIN_UACPROC, UAC_SIGBUS, }; > setsysinfo(SSI_NVPAIRS, buf, 1, 0, 0, 0); > > int *y = (int*) (x+1); > *y = 0; > return 0; > } > > The program shoud fail on SIGBUS, but didn't. > > The patch is a second part of userspace flag fix: >> commit 745dd2405e281d96c0a449103bdf6a895048f28c >> Author: Michael Cree <mcree@xxxxxxxxxxxx> >> Date: Mon Nov 30 22:44:40 2009 -0500 >> >> Alpha: Rearrange thread info flags fixing two regressions >> >> Both regressions fixed by (1) rearranging TIF_NOTIFY_RESUME flag to be >> in lower 8 bits of the thread info flags, and (2) making sure that >> ALPHA_UAC_SHIFT matches the rearrangement of the thread info flags. > > Deleted outdated out-of-sync 'UAC_SHIFT' (the cause of bug) in favour of 'ALPHA_UAC_SHIFT'. > > Signed-off-by: Sergei Trofimovich <slyfox@xxxxxxxxxx> > Cc: linux-alpha@xxxxxxxxxxxxxxx > Cc: Michael Cree <mcree@xxxxxxxxxxxx> > Cc: Richard Henderson <rth@xxxxxxxxxxx> > Cc: Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx> > Cc: Matt Turner <mattst88@xxxxxxxxx> > --- > arch/alpha/include/asm/sysinfo.h | 9 --------- > arch/alpha/include/asm/thread_info.h | 8 ++++---- > arch/alpha/kernel/osf_sys.c | 7 ++++--- > 3 files changed, 8 insertions(+), 16 deletions(-) Looks good to me. Acked-by: Michael Cree <mcree@xxxxxxxxxxxx> Thanks 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