Page 1 of 1

grsecurity-2.2.2-2.6.32.45-201108281458.patch failure

PostPosted: Mon Aug 29, 2011 1:27 pm
by crd
The latest -stable patch failed to compile for me:
[...]
CC [M] drivers/staging/hv/ChannelInterface.o
drivers/staging/hv/ChannelInterface.c: In function ‘GetChannelInterface’:
drivers/staging/hv/ChannelInterface.c:102:2: error: assignment of read-only location ‘*iface’
drivers/staging/hv/ChannelInterface.c:103:2: error: assignment of read-only location ‘*iface’
drivers/staging/hv/ChannelInterface.c:104:2: error: assignment of read-only location ‘*iface’
drivers/staging/hv/ChannelInterface.c:105:2: error: assignment of read-only location ‘*iface’
drivers/staging/hv/ChannelInterface.c:107:6: error: assignment of read-only location ‘*iface’
drivers/staging/hv/ChannelInterface.c:108:2: error: assignment of read-only location ‘*iface’
drivers/staging/hv/ChannelInterface.c:109:2: error: assignment of read-only location ‘*iface’
drivers/staging/hv/ChannelInterface.c:110:2: error: assignment of read-only location ‘*iface’
drivers/staging/hv/ChannelInterface.c:111:2: error: assignment of read-only location ‘*iface’
drivers/staging/hv/ChannelInterface.c:112:2: error: assignment of read-only location ‘*iface’
make[3]: *** [drivers/staging/hv/ChannelInterface.o] Error 1
make[2]: *** [drivers/staging/hv] Error 2
make[1]: *** [drivers/staging] Error 2
make: *** [drivers] Error 2

Ubuntu 11.04 desktop (32 bit)
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
linux-2.6.32.45 (vanilla from kernel.org)
grsecurity-2.2.2-2.6.32.45-201108281458.patch

The kernel compiles successfully without the grsecurity patch. I also needed to correct the diagnostic-core.h vs. diagnostic.h discrepancy already noted for the 3.0.3 version of the patch.

Thank you for all that you do...

Re: grsecurity-2.2.2-2.6.32.45-201108281458.patch failure

PostPosted: Mon Aug 29, 2011 6:44 pm
by PaX Team
crd wrote:The latest -stable patch failed to compile for me:
Code: Select all
  CC [M]  drivers/staging/hv/ChannelInterface.o
drivers/staging/hv/ChannelInterface.c: In function ‘GetChannelInterface’:
drivers/staging/hv/ChannelInterface.c:102:2: error: assignment of read-only location ‘*iface’
vmbus_channel_interface has to be __no_const, i'll fix it in the next patch, thanks.

Re: grsecurity-2.2.2-2.6.32.45-201108281458.patch failure

PostPosted: Tue Aug 30, 2011 9:02 am
by crd
Thank you. I updated to kernel version 2.6.32.46 and version grsecurity-2.2.2-2.6.32.46-201108300001.patch of the -stable patch. Now I get the following error:
Code: Select all
  CC [M]  drivers/staging/vt6656/hostap.o
drivers/staging/vt6656/hostap.c: In function ‘hostap_enable_hostapd’:
drivers/staging/vt6656/hostap.c:867:1: error: constified variable ‘apdev_netdev_ops’ cannot be local
make[4]: *** [drivers/staging/vt6656/hostap.o] Error 1
make[3]: *** [drivers/staging/vt6656] Error 2
make[2]: *** [drivers/staging] Error 2
make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.32.46'
make: *** [debian/stamp/build/kernel] Error 2

Sorry to keep being a pest. These seem to be a recurring theme in the support forum. What's the general pattern to fixing them?

Re: grsecurity-2.2.2-2.6.32.45-201108281458.patch failure

PostPosted: Tue Aug 30, 2011 9:13 am
by PaX Team
crd wrote:
Code: Select all
  CC [M]  drivers/staging/vt6656/hostap.o
drivers/staging/vt6656/hostap.c: In function ‘hostap_enable_hostapd’:
drivers/staging/vt6656/hostap.c:867:1: error: constified variable ‘apdev_netdev_ops’ cannot be local

Sorry to keep being a pest. These seem to be a recurring theme in the support forum. What's the general pattern to fixing them?
hmm, looks like some chunks didn't get backported to .32 from 3.0, i'll fix these up (you can look at the same file in 3.0 to see what's needed). in general, the constification plugin makes gcc detect certain constructs that we want to know about and fix one way or another. i hope there'll be a blog about it eventually, but for now just keep reporting them to us and we'll fix them up.

Re: grsecurity-2.2.2-2.6.32.45-201108281458.patch failure

PostPosted: Wed Aug 31, 2011 8:32 am
by crd
In case it was not expected, this problem persists in the grsecurity-2.2.2-2.6.32.46-201108301903.patch.

Thanks...

Re: grsecurity-2.2.2-2.6.32.45-201108281458.patch failure

PostPosted: Fri Sep 02, 2011 7:44 am
by crd
Still fails to compile with grsecurity-2.2.2-2.6.32.46-201109011725.patch:

Code: Select all
  CC [M]  drivers/staging/vt6656/hostap.o
drivers/staging/vt6656/hostap.c: In function ‘hostap_enable_hostapd’:
drivers/staging/vt6656/hostap.c:90:3: error: initializer element is not constant
drivers/staging/vt6656/hostap.c:90:3: error: (near initialization for ‘apdev_netdev_ops.ndo_start_xmit’)
make[4]: *** [drivers/staging/vt6656/hostap.o] Error 1
make[3]: *** [drivers/staging/vt6656] Error 2
make[2]: *** [drivers/staging] Error 2
make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.32.46'
make: *** [debian/stamp/build/kernel] Error 2


Thanks...

Re: grsecurity-2.2.2-2.6.32.45-201108281458.patch failure

PostPosted: Sat Sep 03, 2011 5:44 pm
by crd
Still fails to compile with grsecurity-2.2.2-2.6.32.46-201109021814.patch:

Code: Select all
  CC [M]  drivers/staging/vt6656/hostap.o
drivers/staging/vt6656/hostap.c: In function ‘hostap_enable_hostapd’:
drivers/staging/vt6656/hostap.c:90:3: error: initializer element is not constant
drivers/staging/vt6656/hostap.c:90:3: error: (near initialization for ‘apdev_netdev_ops.ndo_start_xmit’)
make[4]: *** [drivers/staging/vt6656/hostap.o] Error 1
make[3]: *** [drivers/staging/vt6656] Error 2
make[2]: *** [drivers/staging] Error 2
make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.32.46'
make: *** [debian/stamp/build/kernel] Error 2