diff options
author | phk <phk@FreeBSD.org> | 1999-03-30 09:00:45 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-03-30 09:00:45 +0000 |
commit | 291460bc145159969f36b1e6e280fe2ec7d1637d (patch) | |
tree | e5f3ee63e334da3863819dac61feb89d40b94d6b /sys | |
parent | 2c5f507432dedea8f803432b4a7a7367f0287dfa (diff) | |
download | FreeBSD-src-291460bc145159969f36b1e6e280fe2ec7d1637d.zip FreeBSD-src-291460bc145159969f36b1e6e280fe2ec7d1637d.tar.gz |
Purging lint from the Bruce filter.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/support.S | 7 | ||||
-rw-r--r-- | sys/amd64/amd64/support.s | 7 | ||||
-rw-r--r-- | sys/i386/i386/support.s | 7 | ||||
-rw-r--r-- | sys/kern/kern_sysctl.c | 22 |
4 files changed, 25 insertions, 18 deletions
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index 3f60616..cb9fd3e 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: support.s,v 1.60 1999/01/09 17:29:38 bde Exp $ + * $Id: support.s,v 1.61 1999/03/21 12:30:50 phk Exp $ */ #include "npx.h" @@ -1614,13 +1614,16 @@ ENTRY(longjmp) ret /* - * Here for doing BB-profiling (gcc -a). + * Support for BB-profiling (gcc -a). The kernbb program will extract + * the data from the kernel. */ .data + ALIGN_DATA .globl bbhead bbhead: .long 0 + .text NON_GPROF_ENTRY(__bb_init_func) movl 4(%esp),%eax diff --git a/sys/amd64/amd64/support.s b/sys/amd64/amd64/support.s index 3f60616..cb9fd3e 100644 --- a/sys/amd64/amd64/support.s +++ b/sys/amd64/amd64/support.s @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: support.s,v 1.60 1999/01/09 17:29:38 bde Exp $ + * $Id: support.s,v 1.61 1999/03/21 12:30:50 phk Exp $ */ #include "npx.h" @@ -1614,13 +1614,16 @@ ENTRY(longjmp) ret /* - * Here for doing BB-profiling (gcc -a). + * Support for BB-profiling (gcc -a). The kernbb program will extract + * the data from the kernel. */ .data + ALIGN_DATA .globl bbhead bbhead: .long 0 + .text NON_GPROF_ENTRY(__bb_init_func) movl 4(%esp),%eax diff --git a/sys/i386/i386/support.s b/sys/i386/i386/support.s index 3f60616..cb9fd3e 100644 --- a/sys/i386/i386/support.s +++ b/sys/i386/i386/support.s @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: support.s,v 1.60 1999/01/09 17:29:38 bde Exp $ + * $Id: support.s,v 1.61 1999/03/21 12:30:50 phk Exp $ */ #include "npx.h" @@ -1614,13 +1614,16 @@ ENTRY(longjmp) ret /* - * Here for doing BB-profiling (gcc -a). + * Support for BB-profiling (gcc -a). The kernbb program will extract + * the data from the kernel. */ .data + ALIGN_DATA .globl bbhead bbhead: .long 0 + .text NON_GPROF_ENTRY(__bb_init_func) movl 4(%esp),%eax diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 958fa65..7418800 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 - * $Id: kern_sysctl.c,v 1.84 1999/02/16 10:49:48 dfr Exp $ + * $Id: kern_sysctl.c,v 1.85 1999/03/23 14:23:15 phk Exp $ */ #include "opt_compat.h" @@ -408,6 +408,8 @@ sysctl_sysctl_name2oid SYSCTL_HANDLER_ARGS if (!req->newlen) return ENOENT; + if (req->newlen >= MAXPATHLEN) /* XXX arbitrary, undocumented */ + return (ENAMETOOLONG); p = malloc(req->newlen+1, M_SYSCTL, M_WAITOK); @@ -511,10 +513,7 @@ sysctl_handle_int SYSCTL_HANDLER_ARGS } /* - * Handle a long, signed or unsigned. - * Two cases: - * a variable: point arg1 at it. - * a constant: pass it in arg2. + * Handle a long, signed or unsigned. arg1 points to it. */ int @@ -522,15 +521,14 @@ sysctl_handle_long SYSCTL_HANDLER_ARGS { int error = 0; + if (!arg1) + return (EINVAL); error = SYSCTL_OUT(req, arg1, sizeof(long)); if (error || !req->newptr) return (error); - if (!arg1) - error = EPERM; - else - error = SYSCTL_IN(req, arg1, sizeof(long)); + error = SYSCTL_IN(req, arg1, sizeof(long)); return (error); } @@ -548,11 +546,11 @@ sysctl_handle_string SYSCTL_HANDLER_ARGS error = SYSCTL_OUT(req, arg1, strlen((char *)arg1)+1); - if (error || !req->newptr || !arg2) + if (error || !req->newptr) return (error); - if ((req->newlen - req->newidx) > arg2) { - error = E2BIG; + if ((req->newlen - req->newidx) >= arg2) { + error = EINVAL; } else { arg2 = (req->newlen - req->newidx); error = SYSCTL_IN(req, arg1, arg2); |