Bug 318203 - setsockopt handling needs to handle SOL_SOCKET/SO_ATTACH_FILTER
Summary: setsockopt handling needs to handle SOL_SOCKET/SO_ATTACH_FILTER
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.9.0.SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-11 19:57 UTC by Guy Harris
Modified: 2013-07-17 14:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to fix this problem (5.40 KB, patch)
2013-04-11 19:58 UTC, Guy Harris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Harris 2013-04-11 19:57:24 UTC
The setsockopt handling for Linux needs special handling for SOL_SOCKET/SO_ATTACH_FILTER so as not to report bogus "uninitialized data" for locations the kernel doesn't look at (because they're padding) and to handle the fact that the structure being passed in contains a pointer that is dereferenced by the kernel (so that we check validity of data read through that pointer).

Reproducible: Always

Steps to Reproduce:
1. Run tcpdump under Valgrind
Actual Results:  
A warning about setsockopt() that doesn't reflect an actual problem.  (There may be other warnings, but some are due to bug 303536, and others may be due to a Valgrind bug or may be due to a libnl bug - I haven't investigated that yet.)

Expected Results:  
No such warning.
Comment 1 Guy Harris 2013-04-11 19:58:03 UTC
Created attachment 78818 [details]
Patch to fix this problem

And here's a fix.
Comment 2 Tom Hughes 2013-07-17 14:37:14 UTC
Committed with minor adjustments as r13461.