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   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-24 21:47:15 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Upstream patch none

Description Eugene Teo (Security Response) 2009-03-20 03:43:56 EDT
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

http://bugzilla.kernel.org/show_bug.cgi?id=12597

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-24 21:47:15 EDT
Close as per comment #3. Reopen if needed.