Bug 491271

Summary: kernel-rt should be built with -fwrapv [mrg-1.2]
Product: Red Hat Enterprise MRG Reporter: Eugene Teo (Security Response) <eteo>
Component: realtime-kernelAssignee: Red Hat Real Time Maintenance <rt-maint>
Status: CLOSED NOTABUG QA Contact: David Sommerseth <davids>
Severity: high Docs Contact:
Priority: high    
Version: DevelopmentCC: bhu, lgoncalv, ovasik, security-response-team, williams
Target Milestone: 1.2   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-25 01:47:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
Upstream patch none

Description Eugene Teo (Security Response) 2009-03-20 07:43:56 UTC
Description of problem:
Add '-fwrapv' to gcc CFLAGS. This makes sure that gcc doesn't try to optimize
away wrapping arithmetic, which the kernel occasionally uses for overflow
testing, ie things like

if (ptr + offset < ptr)

which technically is undefined for non-unsigned types. See


for details.

Not all versions of gcc support it, so we need to make it conditional (it looks
like it was introduced in gcc-3.4).

This bug is filed to address the mrg-1.2 kernel. This is not a dup of bug 491264.

Comment 4 Eugene Teo (Security Response) 2009-05-25 01:47:15 UTC
Close as per comment #3. Reopen if needed.