Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134517 - sysprof-1.0.2 fails to compile for the new 2.6.17 kernel
Summary: sysprof-1.0.2 fails to compile for the new 2.6.17 kernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-27 06:09 UTC by PaX Team
Modified: 2006-06-11 09:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
fix for trying to modify the read-only fops (sysprof-1.0.2-fops-fix.patch,769 bytes, patch)
2006-05-27 06:10 UTC, PaX Team
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description PaX Team 2006-05-27 06:09:36 UTC
module/sysprof-module.c:init_module() directly modifies a member of a read-only structure that gcc catches and errors out:

   trace_proc_file->proc_fops->poll = procfile_poll;

this is actually a bug (as are most other instances probably, the change to mark fops pointers read-only is an attempt to catch those early) because this fops structure is actually shared across all proc entries, therefore modifying a member in it affects all... anyway, the attached patch fixes it hopefully properly (it creates a copy of the fops structure and modifies the poll member in there). the ebuild will need a new section to apply the patch:

src_unpack() {
        unpack ${A}
        cd ${S}
        epatch ${FILESDIR}/${P}-fops-fix.patch
}
Comment 1 PaX Team 2006-05-27 06:10:30 UTC
Created attachment 87643 [details, diff]
fix for trying to modify the read-only fops
Comment 2 SpanKY gentoo-dev 2006-06-11 09:32:10 UTC
1.0.3 now in portage