Re: [PATCH/RFC 2.6.21 3/5] ehca: completion queue: remove use of do_mmap()
- From: Hoang-Nam Nguyen <hnguyen@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 12 Jan 2007 16:36:15 +0100
Hi,
you point to the right spot... This has a historic reason as we+ if (my_cq->ownpid != cur_pid) {
+ ehca_err(device, "Invalid caller pid=%x ownpid=%x "
+ "cq_num=%x",
+ cur_pid, my_cq->ownpid, my_cq->cq_number);
+ return -EINVAL;
+ }
(for other reviewers: this is not new code, just moved around)
Owner tracking by pid is really dangerous. File descriptors can be
passed around by unix sockets, a single process can have files open
more than once, etc..
It seems ehca wants to prevent threads other than the creating one
from performing most operations. Can you explain the reason for this?
have needed to support fork(), system("date") etc for kernel 2.6.9,
hence those vma flags manipulation and this pid checking as proactive
protection/restriction. For newer kernel, I guess >=2.6.12, this checking
were not necessary, but we would feel better after we had tested user
space stuff more thoroughly without this piece of code. Since this is
not new code, can we pls handle this later?
Regards
Nam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH/RFC 2.6.21 3/5] ehca: completion queue: remove use of do_mmap()
- From: Hoang-Nam Nguyen
- Re: [PATCH/RFC 2.6.21 3/5] ehca: completion queue: remove use of do_mmap()
- From: Christoph Hellwig
- [PATCH/RFC 2.6.21 3/5] ehca: completion queue: remove use of do_mmap()
- Prev by Date: Re: [PATCH/RFC 2.6.21 3/5] ehca: completion queue: remove use of do_mmap()
- Next by Date: 2.6.17 - weird, boot CPU (#0) not listed by the BIOS.
- Previous by thread: Re: [PATCH/RFC 2.6.21 3/5] ehca: completion queue: remove use of do_mmap()
- Next by thread: [PATCH/RFC 2.6.21 1/5] ehca: declaration of queue structures
- Index(es):
Relevant Pages
|
|