Messages in this thread | | | Subject | Re: [PATCH][RFC] oprofile 2.5.38 patch | From | Andi Kleen <> | Date | 24 Sep 2002 14:43:47 +0200 |
| |
John Levon <movement@marcelothewonderpenguin.com> writes:
> At : > > http://oprofile.sourceforge.net/oprofile-2.5.html
+ 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 ?
ulong_write_file:
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.
-Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |