Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 May 1995 13:00:01 -0700
From:      "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
To:        freebsd-bugs
Subject:   kern/411: bad144
Message-ID:  <199505142000.NAA26178@freefall.cdrom.com>
In-Reply-To: Your message of Sun, 14 May 1995 12:55:29 -0700 <199505141955.MAA04402@gndrsh.aac.dev.com>

next in thread | previous in thread | raw e-mail | index | archive | help

>Number:         411
>Category:       kern
>Synopsis:       bad144 allow you to add blocks in the remap area
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs (FreeBSD bugs mailing list)
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 14 13:00:00 1995
>Originator:     Rodney W. Grimes
>Organization:
Rod Grimes                                      rgrimes@gndrsh.aac.dev.com
Accurate Automation Company                   Custom computers for FreeBSD
>Release:        FreeBSD 2.1.0-Development i386
>Environment:

	All FreeBSD versions with bad144 support.

>Description:

	Bad144 allows you to add a bad block to the bad144 table
	that is in the remapped sector area.  It is not clear
	just what the bad144 kernel support does when this is done.

	THIS IS NOT THE SAME BUG AS REPORTED IN bin/410!

	From Bruce Evans:
	Actually it would be a good idea to check the 126 + (5 * 2 -1) sectors
	beyond the above `bend' and complain louder if any are bad.  I'm not
	sure if bad144 handles recursive remapping of bad sectors!  I think
	it handles bad sectors in the bad sector table itself OK.  There are
	5 copies of the table, and the first good one is used.

	Also, the in check (sn < 0 || sn >= size), `size' should probably be
	`bend' or `bend + 126 + 5 * (2 -1)' for the same reason.

>How-To-Repeat:

	Add a bad144 block in the space sector area and see what
	the kernel does with it.

>Fix:
	

Index: bad144.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/bad144/bad144.c,v
retrieving revision 1.7
diff -c -r1.7 bad144.c
*** 1.7	1995/05/14 08:40:37
--- bad144.c	1995/05/14 19:54:16
***************
*** 345,351 ****
  	while (argc > 0) {
  		sn = atoi(*argv++);
  		argc--;
! 		if (sn < 0 || sn >= size) {
  			printf("%ld: out of range [0,%ld) for disk %s\n",
  			    sn, size, dp->d_typename);
  			errs++;
--- 345,351 ----
  	while (argc > 0) {
  		sn = atoi(*argv++);
  		argc--;
! 		if (sn < 0 || sn >= bend) {
  			printf("%ld: out of range [0,%ld) for disk %s\n",
! 			    sn, bend, dp->d_typename);
  			errs++;
>Audit-Trail:
>Unformatted:





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505142000.NAA26178>