Page 1 of 1

Grsec and OpenAFS

PostPosted: Fri Nov 18, 2011 6:39 pm
by hmpf
Hello :)

Using Kernel 3.1.1 (older versions since 3.x seems to have the same problem) and OpenAFS 1.6 - both unpatched except Grsec for the Kernel.
Upon the compile run of the OpenAFS module it stops pointing out:

Code: Select all
rx_event.c: In function '_rxevent_Post':
rx_event.c:312:2: error: assignment of member 'newfunc' in read-only object
rx_event.c:314:38: error: assignment of member 'oldfunc' in read-only object
make[3]: *** [..../..../rx_event.o] Error 1
make[2]: *** [_module_.....] Error 2


Just replaced some long directory names with "...."

When the Kernel isn't patched with Grsec, everything compiles & runs fine. Using the same configuration of the Kernel, patching with Grsec , then re-configuring only Grsec features and touching nothing else, still no luck so far.

Thanks for some help

Re: Grsec and OpenAFS

PostPosted: Sun Nov 20, 2011 4:10 pm
by PaX Team
hmpf wrote:When the Kernel isn't patched with Grsec, everything compiles & runs fine. Using the same configuration of the Kernel, patching with Grsec , then re-configuring only Grsec features and touching nothing else, still no luck so far.
this is due to the constification plugin, openafs will need a small patch in src/rx/rx_event.h:
Code: Select all
--- src/rx/rx_event.h.orig      2011-08-16 14:26:14.000000000 +0200
+++ src/rx/rx_event.h   2011-11-20 21:09:42.290300654 +0100
@@ -36,7 +36,7 @@
     union {
        void (*oldfunc) (struct rxevent *, void *, void *);
        void (*newfunc) (struct rxevent *, void *, void *, int);
-    } func;                    /* Function to call when this expires */
+    } __no_const func;         /* Function to call when this expires */
     void *arg;                 /* Argument to the function */
     void *arg1;                        /* Another argument */
     int arg2;                  /* An integer argument */

Re: Grsec and OpenAFS

PostPosted: Fri Nov 25, 2011 4:11 am
by hmpf
Bit late but yes, that's it. :)

Thank you