X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B36F03951C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1592928424; bh=MzsGpCNb/Smn9Ms7h3zAVTr/77j00ooOHXjXGQCjTmE=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=lCqgn1cgCRUGDeLWmwyyjUqBsHnXWMPD0znFlaY5LFMtq5YN/cnSHdOBVzGlJviBc /MvmkqIVH/cqxPPScncqPVLgc1ycoOh8rh2HXig+P8DEaex7wUXrZApP0F/0UIMvnF heHnoNL8khNAnoA5aVOJk+R9sW6B74WT+zG72xok= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2A49B3939C14 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=paw7Qsbja8dHWZDTWbRw8XmH2i6tnlWsksKyVHv33Z0=; b=tq+sAmqNpWRSMjSnE+p5ijHi4Otl5kSaaur1tqdkZDYWQ9fyVG226w8IuBKt4XVF6l IrmPBr5Ml+V8D9sj37kzjeMbJiWZyMMppw9UM9SJ1y/iCc7fLn7GhkkN4/N/9x4rE4fq aGvMzBrEVk+kGBADdpkjd8uDxO7uFFiUH25wgjCATlGhStBx/6sWILTHVeNC2bsSlgqy 6EgDa4cLdNrA6HgHycbqiAKuzVJOCih6r7F+38Ps8d+azLP9XuyEkkAhjJTHcCGwBfLV zAgDn2epCe3FoUo565W1pIZoLICAV0XHW3UPP11E2jStn2bYw1KM6KjNL1H8RFJ+IBuR X5gw== X-Gm-Message-State: AOAM531sRi3rvTWFZpW4fc6Dx+kSIwwd4to8TXZvjtqEserdDQNhlILk TIMp6uG5uBFakZwB25nKpItFARH7oGckENRfUaJz4Ffl X-Google-Smtp-Source: ABdhPJzYt6xZNkb54a/SIMGA6k3Y3m+lMKpr9gFc6SrBuqv4aKWbj7/pAoKOgnTHz2z80ulYx6EXNrTg5cVUajwFxe4= X-Received: by 2002:a25:5d04:: with SMTP id r4mr33832025ybb.290.1592928421393; Tue, 23 Jun 2020 09:07:01 -0700 (PDT) MIME-Version: 1.0 References: <1d1801d64677$bea56050$3bf020f0$@pdinc.us> <60bf1507-4edb-a03f-ec14-07e1ab7f0d94 AT cs DOT umass DOT edu> In-Reply-To: Date: Tue, 23 Jun 2020 10:06:25 -0600 Message-ID: Subject: Re: [cygwin] DD bug fails to wipe last 48 sectors of a disk To: cygwin X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Nicholas Clark via Cygwin Reply-To: Nicholas Clark Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" Do you get the same behavior when you run dd with iflag=fullblock? Without that flag, it's possible dd's input to read a smaller block than requested (which would correspond with a smaller write to the output). On Tue, Jun 23, 2020 at 9:28 AM Hashim Aziz via Cygwin wrote: > I hadn't checked with 512 byte block sizes because of the amount of time > it would have taken, but sure enough have just finished trying with bs=512 > and no block size at all (so dd's default block size, which is either 512 > or 1024) and although each wipe took over 24 hours, they did indeed wipe > all of the sectors. So it seems that there's a bug with regards to how > Cygwin handles the last block when a large (i.e. sane) block size is > selected, and that this bug doesn't occur on actual UNIX-based systems. > > ________________________________ > From: Cygwin on behalf of Eliot Moss < > moss AT cs DOT umass DOT edu> > Sent: 20 June 2020 9:26 PM > To: The Cygwin Mailing List > Subject: Re: [cygwin] DD bug fails to wipe last 48 sectors of a disk > > On 6/20/2020 1:31 PM, Hashim Aziz via Cygwin wrote: > > To reproduce simply run the following command on a drive (obviously, > this will irreversibly wipe all data): > > > > dd if=/dev/zero of=/dev/sdX bs=4M status=progress > > > > Both drives were attached via internal SATA (by way of a PCIE to SATA > Host Bus Adapter). > > > > Cygwin was running in an elevated window as dd cannot run in Cygwin > without administrator access, at least not on Windows 10 and not when > dealing with raw disks. I was running Avast the first time I discovered > this, and am currently running Windows Defender, so doubt that the AV is > the cause of this. > > > > The hard drives are a Western Digital WD10PURX-64E5EY0 (Serial: > WD-WCC4J6HX189U) and a Kingston SV200S3128G (Serial: 12BA315PKAWK). > > > > I just ran DD for Windows 0.6beta3 with variations of the following > command: > > > > dd.exe if=/dev/zero of=\\.\PHYSICALDRIVEX --progress bs=4M > > > > ...and can confirm that the bug also manifests here, but in a slightly > different way - irrespective of the disk or block size, it fails to wipe > the last 176 sectors of the drive. > > I was going to ask: even with block size 512 bytes? But I guess you > checked that ... > > Regards - Eliot > -- > Problem reports: https://cygwin.com/problems.html > FAQ: https://cygwin.com/faq/ > Documentation: https://cygwin.com/docs.html > Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple > -- > Problem reports: https://cygwin.com/problems.html > FAQ: https://cygwin.com/faq/ > Documentation: https://cygwin.com/docs.html > Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple > -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple