Bug#349765: linux-2.6.14-2-alpha-generic: please support the prctl syscall
> After changing addr to value, compiles fine; prctl -q runs ok now, prctl
> --unaligned=signal doesn't have any effect. You say that it's going to be
> the prctl() function in the kernel that needs further tweaks?
>
I suspect this is the problem:
(linux/prctl.h)
# define PR_UNALIGN_NOPRINT 1 /* silently fix up unaligned user accesses */
# define PR_UNALIGN_SIGBUS 2 /* generate SIGBUS on unaligned user access */
(asm-parisc/processor.h & asm-ia64/processor.h)
#define PARISC_UAC_NOPRINT (1UL << 0) /* see prctl and unaligned.c */
#define PARISC_UAC_SIGBUS (1UL << 1)
IE, NOPRINT is set by 1, and SIGBUS set by 2.
on alpha, because it's reusing the OSF/1 crap, the order is
NOPRINT, NOFIX, SIGNAL, ie: 1, 2, 4.
I don't know what the best way to fix this is, but something like
this patch will probably help,
Index: prctl-1.4/prctl.c
===================================================================
--- prctl-1.4.orig/prctl.c 2003-03-05 13:52:32.000000000 -0500
+++ prctl-1.4/prctl.c 2006-01-28 01:47:20.000000000 -0500
@@ -67,6 +67,11 @@
printf(" --fpemu=[silent|signal|default]\n");
}
+#ifdef __alpha__
+#undef PR_UNALIGN_SIGBUS
+#define PR_UNALIGN_SIGBUS 4
+#endif /* __alpha__ */
+
int set_unaligned(int prctl_val)
{
int alignval, retval;
Reply to: