archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <>
To: John Levon <>
Subject: Re: [PATCH][RFC] oprofile 2.5.38 patch
Date: 24 Sep 2002 14:43:47 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: John Levon's message of "24 Sep 2002 00:31:55 +0200"

John Levon <> writes:

> At :

+       page = (unsigned char *)__get_free_page(GFP_KERNEL);
+       if (!page)
+               return -ENOMEM;
+       spin_lock(&oprofilefs_lock);
+       len = sprintf(page, "%lu\n", *value);
+       spin_unlock(&oprofilefs_lock);

wouldn't an on stack buffer do nicely to format a single number ? 


it doesn't length limit count before passing to kmalloc - hole.
Also has overflow bugs (consider someone passing 0xffffffff-1). 

The sys_lookup_dcookie call looks like a security hole to me. After
all it could allow everybody to lookup random paths by trying all 
dcookies, even though the directories may be unreadable for him. It should 
be probably made root only

Adding a list_head to task_struct looks quite ugly to me. Is there
surely no better way ? e.g. you could just put it in a file private
structure and the daemon keeps the file open.


       reply	other threads:[~2002-09-24 12:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2002-09-24 12:43 ` Andi Kleen [this message]
2002-09-24 12:55   ` [PATCH][RFC] oprofile 2.5.38 patch John Levon
2002-09-23 22:29 John Levon
2002-09-24 18:48 ` Christoph Hellwig
2002-09-24 12:23   ` John Levon
2002-09-26 16:08 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).