Project

General

Profile

Actions

Bug #2875

closed

Plain models don't work with 3.4 Linux kernel

Added by Evgeny Novikov almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
High
Category:
-
Start date:
05/22/2012
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:
0933ee3

Description

For all drivers RCV prints in its log:

...
include/linux/rcupdate.h:432: Error: Cannot resolve variable rcu_lock_map. 
include/linux/rcupdate.h:432: Error: Expected lval for ADDROF. Got Const(Int64(0,int,None)) 
include/linux/rcupdate.h:917: Warning: CALL in constant
include/linux/rcupdate.h:917: Error: Length of array is negative
include/linux/rcupdate.h:920: Warning: CALL in constant
include/linux/rcupdate.h:920: Error: doPureExp: not pure
...

The first issue seems to be connected with incorrect manual kernel configuring. We unset CONFIG_DEBUG_LOCK_ALLOC and CONFIG_PROVE_LOCKING, but don't touch CONFIG_PROVE_RCU, that in fact depends on CONFIG_PROVE_LOCKING. So, I guess that solution is to turn off CONFIG_PROVE_RCU.
The second issue comes from:
BUILD_BUG_ON(!__builtin_constant_p(offset));

that becomes after preprocessing:
((void)sizeof(char[1 - 2*!!(!__builtin_constant_p(offset))]));

That also is a problem for aspect models:
In file included from include/linux/rculist.h:10:0, from include/linux/dcache.h:6, from include/linux/fs.h:387, from include/linux/tty.h:39, from /ldv/launch/work/current--X--drivers/usb/serial/kobil_sct.ko--X--defaultlinux--X--100_1a/linux/csd_deg_dscv/11/dscv_tempdir/dscv/ri/100_1a/drivers/usb/serial/kobil_sct.c.p:2: 
include/linux/rcupdate.h: In function '__kfree_rcu': 
include/linux/rcupdate.h:917:2: error: size of unnamed array is negative

Looks like 3.4 kernel isn't intended for build... __kfree_rcu function body is unconditional. May be just configure BUILD_BUG_ON in some way.


Related issues 1 (1 open0 closed)

Related to Linux Driver Verification - Feature #2876: Investigate why we have to redefine BUILD_BUG_ON macroNewVadim Mutilin05/22/2012

Actions
Actions #1

Updated by Evgeny Novikov almost 12 years ago

Evgeny Novikov wrote:

The second issue comes from:
[...]
that becomes after preprocessing:
[...]
That also is a problem for aspect models:
[...]
Looks like 3.4 kernel isn't intended for build... __kfree_rcu function body is unconditional. May be just configure BUILD_BUG_ON in some way.

In according with the issue may be related with turning on/off gcc optimizations (-Ox, -O2, -Os, etc.). Some investigation should be done.

Actions #2

Updated by Evgeny Novikov almost 12 years ago

The second issue is due to BUILD_BUG_ON define was moved from include/linux/kernel.h to include/linux/bug.h. But it's strange nevertheless that we need to remove this definition. It seems that the real problem is in our Makefile patches. And it should be investigated separately.

Actions #3

Updated by Evgeny Novikov almost 12 years ago

  • Status changed from Open to Resolved
  • Published in build set to 0933ee3

0933ee3 fixed both issues, but I don't like both fixes. See #2875 that continues investigation for the second issue. As for the first issue, I hope that we'll give up plain models and all related workarounds soon.

Actions #4

Updated by Evgeny Novikov almost 12 years ago

Evgeny Novikov wrote:

0933ee3 fixed both issues, but I don't like both fixes. See #2875 that continues investigation for the second issue. As for the first issue, I hope that we'll give up plain models and all related workarounds soon.

*Fix: see #2876.

Actions #5

Updated by Evgeny Novikov almost 12 years ago

  • Status changed from Resolved to Closed

Reference launch results demonstrated, that fixes work. But #2876 is waiting for research.

Actions

Also available in: Atom PDF