Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/sys Modify/re-do last pull-up (via patch, requested...



details:   https://anonhg.NetBSD.org/src/rev/7ba7717be06d
branches:  netbsd-1-4
changeset: 470542:7ba7717be06d
user:      he <he%NetBSD.org@localhost>
date:      Sun Apr 30 20:12:04 2000 +0000

description:
Modify/re-do last pull-up (via patch, requested by sommerfeld):
  Fix two bugs:
   o A malicious or erroneous program can hog the CPU in uiomove()
   o A ktrace of such a program can hog large amounts of kernel memory
  This version of the fix does not increase the size of struct proc
  compared to 1.4.2.

diffstat:

 sys/sys/proc.h |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r a05c923a2c8c -r 7ba7717be06d sys/sys/proc.h
--- a/sys/sys/proc.h    Sun Apr 30 13:24:28 2000 +0000
+++ b/sys/sys/proc.h    Sun Apr 30 20:12:04 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: proc.h,v 1.74.2.1 2000/04/30 12:07:06 he Exp $ */
+/*     $NetBSD: proc.h,v 1.74.2.2 2000/04/30 20:12:04 he Exp $ */
 
 /*-
  * Copyright (c) 1986, 1989, 1991, 1993
@@ -148,7 +148,6 @@
        const char *p_wmesg;     /* Reason for sleep. */
        u_int   p_swtime;        /* Time swapped in or out. */
        u_int   p_slptime;       /* Time since last blocked. */
-       int     p_schedflags;    /* PSCHED_* flags */
 
        struct  itimerval p_realtimer;  /* Alarm timer. */
        struct  timeval p_rtime;        /* Real time. */
@@ -231,9 +230,11 @@
 #define        P_NOCLDWAIT     0x20000 /* No zombies if child dies */
 
 /*
- * These flags are kept in p_schedflags.  p_schedflags may be modified
+ * These flags are kept in schedflags.  schedflags may be modified
  * only at splstatclock().
  */
+extern int schedflags;
+
 #define        PSCHED_SEENRR           0x0001  /* process has been in roundrobin() */
 #define        PSCHED_SHOULDYIELD      0x0002  /* process should yield */
 



Home | Main Index | Thread Index | Old Index