Longstanding bug in Linux kernel floppy handling fixed
- Reference: 1670436011
- News link: https://www.theregister.co.uk/2022/12/07/longstanding_bug_in_linux_kernel/
- Source link:
This isn't the only such fix in recent years. As a series of articles on [1]Phoronix details, there has been a slow but steady flow of fixes for the kernel's handling of floppy drives since at least kernel 5.17, as The Reg [2]mentioned when it came out . Which implies that there are still people actively using floppy diskettes on machines with fairly current Linux kernels on them. If you are one of them, do let us know.
Back in July 2016, SUSE kernel developer [3]Jiři Kosina submitted a [4]patch . The problem arose because this change broke something else and later got [5]reverted , and so the problem hung around.
[6]
In July last year, he sent in a new [7]patch that fixed it again for the 5.12 kernel, and was later back-ported to 5.10, an LTS version, and [8]again into kernel 5.15 – another an LTS version, and the one you're running today if you're on the current Ubuntu LTS release, or something built from it such as Linux Mint 21.
[9]Microsoft realizes it hasn't updated list of banned dodgy Windows 10 drivers in years
[10]'Last man standing in the floppy disk business' reckons his company has 4 years left
[11]512 disk drives later, Floppotron computer hardware orchestra hits v3.0
[12]Boffins demonstrate a different kind of floppy disk: A legless robot that hops along a surface
Yet another [13]fix was new for kernel 5.17, a year ago: this one fixed a situation where the computer is trying to read from a damaged floppy and the user removes the diskette. That worked, but it exposed a new problem, and the somewhat brute-force response to this for kernel 5.18 was just to [14]disable raw access to the floppy disk controller.
Normally you don't need that to read and write to diskettes: it's only for things like handling floppies with formats other than the basic PC- and Mac- 1.4MB "high-density" format, or handling copy-protected disks, and so on. This sort of stuff won't work if you use a USB floppy drive, anyway: their embedded controllers only understand standard formats, and so can't handle classic Mac or Amiga double-density disks from the 1980s.
[15]
Now, in December 2022, a new [16]patch for the forthcoming kernel 6.2 fixes a memory leak that dates back to 5.11 or before.
Floppy diskettes seem to be [17]like the Motorola 680x0 CPU architecture : a 1970s technology that just won't die. The odd thing is that they've survived so long despite not evolving.
[18]
The "high density" 1.4MB 3½" disk format was defined by [19]the IBM PS/2 range in 1987 . By 1990, this evolved into "extra-high density": 2.8MB floppies, used by IBM in the PS/2 Model 57, and more visibly, in the NeXTcube and NeXTstation, the 68040-based successors to [20]the original NeXT Computer … but 2.8MB disks never took off on generic PCs. Through the 1990s, [21]the floppy disk gradually evolved , with 21MB "floptical" disks, then [22]128MB SuperDisks , then [23]Sony's 200MB HiFD .
None of these ever went mainstream: instead, the PC industry clung on to "DSHD" floppies – two sides, 80 tracks, 18 sectors per track – and it seems in some places that it still does. Perhaps it's a good thing for all of us. If later floppy disk tech had caught on, maybe they would have resisted the rise of writable CD-Rs, then rewritables, then DVD-R and DVD+R, and maybe we'd still have been using them when USB2 thumb drives finally came along. ®
Get our [24]Tech Resources
[1] https://www.phoronix.com/news/Linux-6.2-Floppy
[2] https://www.theregister.com/2022/03/20/linux_5_17/
[3] https://www.linux.com/news/30-linux-kernel-developers-30-weeks-jiri-kosina/
[4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=09954bad4
[5] https://lore.kernel.org/lkml/de10cb47-34d1-5a88-7751-225ca380f735@compro.net/
[6] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2Y5EbD@MsP90J@qHz4xPtmgAAAIc&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[7] https://lore.kernel.org/lkml/de10cb47-34d1-5a88-7751-225ca380f735@compro.net/
[8] https://lore.kernel.org/lkml/388418f4-2b9a-6fed-836c-a004369dc7c0@linux.com/
[9] https://www.theregister.com/2022/10/26/microsoft_windows_driver_hvci_blocked_list/
[10] https://www.theregister.com/2022/09/20/floppy_disk_business/
[11] https://www.theregister.com/2022/06/15/floppotron/
[12] https://www.theregister.com/2021/12/08/legless_robots/
[13] https://lore.kernel.org/lkml/045df549-6805-0a02-a634-81aca7d98db5@linux.com/T/#u
[14] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=233087ca063686964a53c829d547c7571e3f67bf
[15] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Y5EbD@MsP90J@qHz4xPtmgAAAIc&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[16] https://lore.kernel.org/lkml/805d7405-2e2f-ddda-8e17-97ac1934738c@linux.com/
[17] https://www.theregister.com/2022/12/05/new_atari_display_driver/
[18] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Y5EbD@MsP90J@qHz4xPtmgAAAIc&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[19] https://www.theregister.com/2017/04/04/30_years_ago_ibms_final_battle_with_reality/
[20] https://www.theregister.com/2013/04/09/feature_ten_sexy_computers_roundup/?page=3
[21] https://www.theregister.com/2010/04/26/sony_stops_selling_floppies/
[22] https://www.theregister.com/1998/11/13/samsung_readies_fast_floppy_replacement/
[23] https://www.theregister.com/1999/04/28/sony_preps_hifd_for_playstation/
[24] https://whitepapers.theregister.com/
> The capacity they offered was far greater than anything the floppy drive ever offered.
And durability also (for good quality CDs).
They were all proprietary too. SuperDisk, Zip drive, anything from Sony. The beauty of the plain old 5 1/4" and 3 1/2" floppy disks was that anyone could make the disks or the drives, and they did.
1.9MB floppies
I remember some app back then allowed you to format a regular 1.44MB (which I think was otherwise 2MB unformatted) floppy into a usable ~1.9MB disk, and I think it was done in a standard way no special software needed to read it.
I remember being excited to buy the retail version of win95, after having used pirated betas for a while. Bought from Fry's Electronics (RIP), wasn't paying attention since it wasn't until I got home I realized I bought the floppy version. Ugh. Then I made that same mistake again with OS/2 Warp, though I remember OS/2 being far worse(more disks? slower access?), or maybe that memory was incorrect. Also the OS/2 Warp addon that gave internet support? I didn't use it long just played with it, and multi booted with system commander(?).
Last time I think I was in a situation that required floppy disks was in 2009, needed to update the firmware on many Seagate drives on several older Dell rackmount systems, and the only way to do it was a DOS floppy. Fortunately I wasn't the one that had to go connect a USB floppy to each system and boot/update them but I did figure out what the issue was(after the company struggled to find a solution before I was hired for a year). It was the first time in my career where I needed to update the firmware of a disk drive.
Floppies against the passing of time
I last used 5 1/4" floppies in anger in 2017 to rescue the electronic forms of my grandmother's and some of her ancestors' memoirs. She had not entered the texts, one of my uncles had done them in the 90's when preparing a self-published book in WordPerfect. Despite the passing of the time, no problems in reading them, except I had to resuscitate an old PC to do it. LibreOffice then interpreted the WordPerfect files nicely. The 360k floppy appears to be fairly robust against aging, if stored decently. Of course it is not so durable mechanically. This floppy had probably been written and read only a few times, and then left alone for years.
Re: 1.9MB floppies
I remember being given the 28 (?) disk version of OS/2 Warp to install... it failed because my laptop for some reason had a SCSI interface built in, which couldn't be disabled, and which OS/2 Warp tried to configure and failed. I still have that box here somewhere...
Boeing use(d) them
El Reg article from 2020: [1]Boeing 747s receive critical software updates over 3.5" floppy disks , though, co-incidentally, [2]the last 747 rolled off the production line today.
[1] https://www.theregister.com/2020/08/10/boeing_747_floppy_drive_updates_walkthrough/
[2] https://boeing.mediaroom.com/2022-12-07-Final-Boeing-747-Airplane-Leaves-Everett-Factory
Re: Boeing use(d) them
Yes. I'm sure that if the remaining user(s) of floppy disks with Linux are ever identified, they'll turn out to be needing them for an embedded industrial application of some sort. CNC lathes, aerospace, or whatever. I highly doubt that there's any general-purpose home/office PC users still reliant on them... surely?
DIAGNOSING Embedded Industrial Systems
is a process using bootable Linux floppies. tomsrtbt jumps to mind. So does that bootable floppy diskette which chain-boots CDs ('cause the older systems' BIOSes aren't designed to boot from CD).
Re: Boeing use(d) them
With older machines that don't have Bluetooth, or have weird networking setups (or, shudder, a lone BNC socket for that), sometimes dumping files onto a bog standard 1.44MB floppy is the least annoying way of getting stuff from one machine to another.
There's probably no excuse or reason for floppies if none of your hardware predates Game of Thrones, but if you have stuff from the '90s then they can be useful.
Re: Boeing use(d) them
I'm certain you're right that embedded industrial applications ARE still running productively on kit that used to boot its firmware off floppies.
That's why hardware devices like Gotek units are still being manufactured and sold. These are hardware devices built to the same form factor and using the same connectors as 5.25" and 3.5" floppy drives and were designed from the outset to be replacements for the original drives. They provide legacy equipment with access to floppy disk images recorded on SD cards and/or USB sticks.
I've not used one myself, but I know that, apart from those keeping older computer-controlled tools in productive use, another gang using them is the 8-bit computer enthusiasts, who are more numerous than you may realize, and who use them, both as replacements as their 3.5 and 5.25 floppy drives die, but also as a hedge against the increasing deterioration of their original floppy disks: the Gotek also provides a convenient way to store and copy disk images when the original floppies and drives have died.
Boeing Uses Floppy Discs
The last 747 rolled off the line, but it, and all the other 747s in service, will still need software updates.
I used them in mid-2010s at a prior employer, we had an oscilloscope that would only store images to 3.5" floppy. It was oldish but sufficient for that company's occasional needs, and sufficiently expensive that there wasn't will to upgrade, so it's probably still in use barring a catastrophic failure.
Compaq Softpaqs
The last reason I ever found myself scrabbling round for a floppy drive connected to a PC.
tomsrtbt 1.722M on a 1.4M floppy ... probably the most useful thing since sliced bread.
Looks like I'll not be updating then
.. if they've disabled raw access to the controller.
I have an old Core2Duo box, which I think is the last motherboard new enough to support modern 64-bit linux, but old enough to have a floppy interface. I keep it for data recovery from old floppies.
Re: Looks like I'll not be updating then
You can compile a kernel with CONFIG_BLK_DEV_FD_RAWCMD in the meantime, before they remove it sometime in the future.
Rather disappointing that they've decided to clobber the option instead of fixing the race condition.
I can’t remember the last time I used a floppy but I found a sealed box of them (5 1/4) in a data centre about 3 years ago.
I can remember having a feeling of being a bit uncomfortable when I first got a PC that didn’t have a floppy drive.
I think I still have a Cd/DVD drive on a usb cable in a drawer somewhere.
I still have a machine with floppy drives on it. I don't remember where I picked up the drive unit, but it's a single half-height 5.25" form factor and has both a 5.25" 1.2M and a 3.5" 1.44MB floppy in it. As far as I know it still works, although I've not inserted a 3D model of a save icon in there for some time. There's probably a 3.5" USB drive somewhere on the shelf too, as well as a Zip drive.
For good measure I have a BBC Micro B (modified a bit) with dual floppies, although probably no original media to use with them.
I doubt the larger floppy formats would have delayed the rise of the writeable CDs & DVDs. The capacity they offered was far greater than anything the floppy drive ever offered.