Bug 491267

Summary: kernel should be built with -fwrapv [rhel-4.9]
Product: Red Hat Enterprise Linux 4 Reporter: Eugene Teo (Security Response) <eteo>
Component: kernelAssignee: Vivek Goyal <vgoyal>
Status: CLOSED WONTFIX QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.9CC: dhoward, jkurik, jplans, jskrabal, lwang, security-response-team, vgoyal
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-18 16:47:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 583726    
Attachments:
Description Flags
Upstream patch none

Description Eugene Teo (Security Response) 2009-03-20 06:44:53 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

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).

Comment 4 RHEL Program Management 2009-03-30 15:45:14 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.

Comment 5 Eugene Teo (Security Response) 2009-05-20 05:41:52 UTC
(In reply to comment #4)
> Development Management has reviewed and declined this request.  You may appeal
> this decision by reopening this request.  

Reopened the bug. See https://bugzilla.redhat.com/show_bug.cgi?id=491266#c5.