Messages in this thread | | | From | Bret Indrelee <> | Subject | RE: Per-Processor Data Page | Date | Thu, 9 Dec 1999 16:32:31 -0600 |
| |
Linus Torvalds [mailto:torvalds@transmeta.com] wrote: > On 9 Dec 1999, Andi Kleen wrote: > > > > I've seen gettimeofday() often as a example here in this > thread for magic > > user process mappings, and I think that is wrong. > gettimeofday() nowadays > > uses the CPU internal cycle counter to get very accurate > timings. You would > > never be able to implement a counter in some memory > location as accurately > > as the CPU does. Reading it requires some internal > knowledge though (e.g. > > the delta between the counters on SMP systems and thus the > current CPU cpu), > > which are better left in a system call. > > Note that I will NOT EVER accept a patch that exports kernel data > structures to user space this way. No way will I have > something that says > "at magic address 0xffff002 can you find the current time". > That is just > broken.
The other thing to consider is if you return time as accurate as the CPU cycle counter, you have just created a mechanism for a covert information channel. One of the things that surprised me was that the higher security levels do not want a process to be able to get a highly accurate time.
If processes can get a highly accurate time value from some sort of global clock, it allows a pair of processes to create a covert channel for passing information. The less secure program monitors the time variences of the high-security program in order to get information about or from them.
-Bret
------------------------------------------------------------- SBS Technologies, Connectivity Products ... solutions for real-time connectivity
Bret Indrelee, Engineer SBS Technologies, Inc., Connectivity Products 1284 Corporate Center Drive, St. Paul MN 55121 Direct: (651) 905-4731 Main: (651) 905-4700 Fax: (651) 905-4701 E-mail: bindrelee@sbs-cp.com http://www.sbs.com -------------------------------------------------------------
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |