public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/3880] New: vfs.stp embedded-C functions need more deref() protection
@ 2007-01-17 19:11 fche at redhat dot com
  2007-01-17 19:35 ` [Bug tapsets/3880] " fche at redhat dot com
  2007-02-01 17:31 ` joshua dot i dot stone at intel dot com
  0 siblings, 2 replies; 3+ messages in thread
From: fche at redhat dot com @ 2007-01-17 19:11 UTC (permalink / raw)
  To: systemtap

Functions like __file_maxbytes and __file_filename make too many
assumptions about their arguments.  For example, the former only
uses deref() for one link in the pointer chain, whereas it really
needs it for all steps (in case the intermediate pointers are corrupted).
The latter needs to use a protected string-copy, not just a nullness test.

This whole tapset should be reviewed for similar optimism.

-- 
           Summary: vfs.stp embedded-C functions need more deref()
                    protection
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: fche at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=3880

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tapsets/3880] vfs.stp embedded-C functions need more deref() protection
  2007-01-17 19:11 [Bug tapsets/3880] New: vfs.stp embedded-C functions need more deref() protection fche at redhat dot com
@ 2007-01-17 19:35 ` fche at redhat dot com
  2007-02-01 17:31 ` joshua dot i dot stone at intel dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2007-01-17 19:35 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2007-01-17 19:35 -------
BTW, adding this to src/HACKING:

   Embedded-C code should avoid making references to the runtime or
-  other code possibly generated by the translator.
+  other code possibly generated by the translator.  Embedded-C code that
+  dereferences pointers should use deref() type functions to check each
+  individual operation if there exists a possibility that the function may
+  be called with invalid pointers or pointer chains.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=3880

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tapsets/3880] vfs.stp embedded-C functions need more deref() protection
  2007-01-17 19:11 [Bug tapsets/3880] New: vfs.stp embedded-C functions need more deref() protection fche at redhat dot com
  2007-01-17 19:35 ` [Bug tapsets/3880] " fche at redhat dot com
@ 2007-02-01 17:31 ` joshua dot i dot stone at intel dot com
  1 sibling, 0 replies; 3+ messages in thread
From: joshua dot i dot stone at intel dot com @ 2007-02-01 17:31 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From joshua dot i dot stone at intel dot com  2007-02-01 17:30 -------
With the resolution of bug #3079, I'm migrating the tapsets to use the
kread/kwrite macros.  I'll take this bug and audit the tapsets to make sure
we're protecting all unknown-pointer dereferences.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|systemtap at sources dot    |joshua dot i dot stone at
                   |redhat dot com              |intel dot com
             Status|NEW                         |ASSIGNED


http://sourceware.org/bugzilla/show_bug.cgi?id=3880

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-01 17:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-17 19:11 [Bug tapsets/3880] New: vfs.stp embedded-C functions need more deref() protection fche at redhat dot com
2007-01-17 19:35 ` [Bug tapsets/3880] " fche at redhat dot com
2007-02-01 17:31 ` joshua dot i dot stone at intel dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).