NetBSD-Bugs archive

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

Re: kern/53217: -current: dumping to wedges on GPT disks broken



The following reply was made to PR kern/53217; it has been noted by GNATS.

From: Frank Kardel <kardel%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/53217: -current: dumping to wedges on GPT disks broken
Date: Fri, 27 Apr 2018 16:42:53 +0200

 That would be the dump functions in the disk drivers, but that have the 
 same problem as parent devices, they would still be looking at "whole 
 disk" in the GPT case. In the GPT case only dkwedge/dk.c knows about the 
 swap type. In the BSD label case the check would make sense.
 The check would only be valid for non whole disk partitions in the disk 
 drivers or even in this place or am I missing something?
 
 Frank
 
 On 04/27/18 15:55, Martin Husemann wrote:
 > The following reply was made to PR kern/53217; it has been noted by GNATS.
 >
 > From: Martin Husemann <martin%duskware.de@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc:
 > Subject: Re: kern/53217: -current: dumping to wedges on GPT disks broken
 > Date: Fri, 27 Apr 2018 15:53:58 +0200
 >
 >   On Fri, Apr 27, 2018 at 01:50:01PM +0000, Frank Kardel wrote:
 >   
 >   >  dk.c:dkdump()
 >   >      1624         bdev = bdevsw_lookup(sc->sc_pdev);
 >   >      1625         rv = (*bdev->d_dump)(sc->sc_pdev, blkno +
 >   >  sc->sc_offset, va, size);
 >   
 >   OK, I missed the parent device here.
 >   
 >   >  In dksubr.c dkdump (not the wedge code, the general disk support) then
 >   >  examines as I quoted
 >   >        796         /* Convert to disk sectors.  Request must be a
 >   >  multiple of size. */
 >   >       797         part = DISKPART(dev);
 >   >  ...
 >   >       806         p = &lp->d_partitions[part];
 >   
 >   And here accessing the label at all is clearly a bug.
 >   
 >   We need to remove that check and move it into the callers.
 >   
 >   Martin
 >   
 
 


Home | Main Index | Thread Index | Old Index