home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / bsd / 5455 < prev    next >
Encoding:
Text File  |  1992-09-10  |  2.8 KB  |  75 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!mcsun!sun4nl!eur.nl!pk
  3. From: pk@cs.few.eur.nl (Paul Kranenburg)
  4. Subject: [386BSD] bugfix for kern__physio.c [Was: kvm.c patch wanted]
  5. Message-ID: <1992Sep9.131126.1009@cs.few.eur.nl>
  6. Sender: news@cs.few.eur.nl
  7. Reply-To: pk@cs.few.eur.nl
  8. Organization: Erasmus University Rotterdam
  9. References: <1992Sep7.190727.9631@Urmel.Informatik.RWTH-Aachen.DE> <Bu975K.4n7@ibmpcug.co.uk>
  10. Date: Wed, 9 Sep 1992 13:11:26 GMT
  11. Lines: 62
  12.  
  13. In <Bu975K.4n7@ibmpcug.co.uk> root@ibmpcug.co.uk (The root of all evil) writes:
  14.  
  15. >In article <1992Sep7.190727.9631@Urmel.Informatik.RWTH-Aachen.DE> kuku@acds.physik.rwth-aachen.de writes:
  16. >>
  17. >>Has anyone gotten ps to output the user command line?
  18. >>
  19. >>There were two posts on that issue in July, I believe. These two patches
  20. >>for kvm.c at al.gave this  "hunk 2 failed" - oh I love these kind of
  21. >>messages. Should add it to my .signature file :-)
  22.  
  23. >Thats because whoever did the patch missed off semi-colons in the
  24. >most awkward of places... The best plan is to look at the original
  25. >and the patch and decide which semicolons to delete from the patch :)
  26.  
  27. >If you e-mail me, I will send you a patched copy of kvm.c.
  28.  
  29. An even more patched version of kvm.c is available from `ftp.cs.few.eur.nl'
  30. in directory: ~/pub/386BSD/unofficial.
  31.  
  32. This version contains a first attempt to cul the u area and command arguments
  33. from the swap device if the pages containing them are not available from
  34. /dev/mem. This is a rather costly operation since it involves traversing a
  35. lot of VM data structures (fortunately, I need it only for arguments since
  36. I've set enableswap to zero in `vm/vm_glue.c'). It may also have difficulties
  37. in retrieving more than a page full of args.
  38.  
  39. Before you try this, you need to apply a patch to `kern/kern__physio.c' to
  40. prevent your machine from crashing on an attempt to read from /dev/drum.
  41. This problem is due to an improperly initialized buffer in the routine
  42. `physstrat'. Here's a diff:
  43.  
  44.  
  45. ------- kern__physio.c -------
  46. *** /tmp/da16742    Wed Sep  9 14:51:37 1992
  47. --- kern__physio.c    Tue Sep  8 19:03:09 1992
  48. ***************
  49. *** 95,100 ****
  50. --- 95,101 ----
  51.   
  52.       /* create and build a buffer header for a transfer */
  53.       bp = (struct buf *)malloc(sizeof(*bp), M_TEMP, M_NOWAIT);
  54. +     bzero((char *)bp, sizeof(*bp));
  55.       bp->b_flags = B_BUSY | B_PHYS | rw;
  56.       bp->b_proc = p;
  57.       bp->b_dev = dev;
  58. ***************
  59. *** 120,126 ****
  60.               ftype = VM_PROT_READ | VM_PROT_WRITE;
  61.           else
  62.               ftype = VM_PROT_READ;
  63. !         for (adr = trunc_page(base) ; adr < base + bp->b_bcount;
  64.               adr += NBPG) {
  65.               vm_fault(&curproc->p_vmspace->vm_map,
  66.                   adr, ftype, FALSE);
  67. --- 121,127 ----
  68.               ftype = VM_PROT_READ | VM_PROT_WRITE;
  69.           else
  70.               ftype = VM_PROT_READ;
  71. !         for (adr = (caddr_t)trunc_page(base); adr < base + bp->b_bcount;
  72.               adr += NBPG) {
  73.               vm_fault(&curproc->p_vmspace->vm_map,
  74.                   adr, ftype, FALSE);
  75.