RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account
Forums → Bugs →

Filesystem Special Fields Page Zero access

Subscribe to Filesystem Special Fields Page Zero access 9 posts, 5 voices

 
May 6, 2022 5:28pm
Avatar Jon Abbott (1421) 2356 posts

I’ve come across a possible bug in FileSwitch, but would like to test it with another filesystem that supports Special Fields – does anyone know of any 32-bit FS that do?

I’m seeing a Page Zero access when FileSwitch touches PassedFilename when directories or wildcards are used. I don’t see it with individual files though. For example, if I Count files in a test directory FileSwitch Aborts:

SYS "OS_FSControl",28,"CFS#RAM::0.$.TestDir" TO ,,S%,C%

But if I count one file in the folder, it returns the correct values:

SYS "OS_FSControl",28,"CFS#RAM::0.$.TestDir.AFile" TO ,,S%,C%

PassedFilename appears to be 0 when a directory or wildcarded filename is used.

As you can see in the examples above, I’m using a 32-bit version of CFS that I converted. Its possible its related to that, but having added debug output I can’t see FileSwitch calling any of the CFS entries prior to the Abort in FileSwitch.

Note the Page Zero Compatibility page needs to be disabled to see the Abort, which can be done via:

SYS "OS_Memory",20,0
 
May 6, 2022 6:46pm
Avatar Steffen Huber (91) 1826 posts

Isn’t e.g. the “notypes” parameter of LanMan98 such a “special field”? And the whole USB stuff via DeviceFS? The latter being a bit more difficult to reproduce your test case with…

 
May 7, 2022 7:37am
Avatar Jon Abbott (1421) 2356 posts

From further testing this morning, I’ve noticed that if performing the test above directly after power-on doesn’t Abort. It only starts Aborting sometime later.

I’ll do some further digging and provide a Repro if applicable. I’m now wondering if a 3rd party is affecting FileSwitch in some way or corrupting PassedFilename.

EDIT: It’s not occurring after boot as the Page Zero Compatibility page is enabled by default. After turning it off the Aborts occur, I’ve noted that in the OP.

 
May 7, 2022 9:50am
Avatar Jon Abbott (1421) 2356 posts

The root cause is the “duff filesystem” code in LowLevel

Further up there’s a DuffFSTable and in that list it has 38 (CFS) set as “duff”. If I change the CFS filesystem number to something that isn’t in the “duff” list the Abort doesn’t occur.

It should be noted that the filesystems in DuffFSTable doesn’t match the Wiki Filing System Numbers list. Using CFS as an example, its correctly listed in the Wiki as “38 – CFS” but listed as “38 – PC” in LowLevel.

So the issue is a bug in FileSwitch, which is only triggered when FileSwitch checks for the absence of a “$” on a “duff” filesystem.

Perhaps a review of that table is also needed as it dates back to RO3?

I’m not sure how to proceed. Can 38 (CFS) be removed from the “duff” list by an OS developer? If not, I’ll request a new filesystem number for CFS.

 
May 18, 2022 9:08am
Avatar Jon Abbott (1421) 2356 posts

Does anyone know if DuffFSTable is actually still required?

It looks like a “hack” put into RO3 to work around differences with RO2. I doubt any filesystem in the list has a 32-bit Module and if they do they should have been updated to the revised documentation, so I would say the table and its associated code in SortSpecialForFSEntry and SortSpecialForFSExit are now redundant?

I’ve posted a Repro here

 
May 18, 2022 3:20pm
Avatar André Timmermans (100) 529 posts

According to the software compatibility page, ArcFS 2.60 is 32-bit OK. For the rest of the table, I have not even ever heard of most of these filing systems.

 
May 18, 2022 5:42pm
Avatar Rick Murray (539) 12250 posts

is 32-bit OK

ARMv7 (doesn’t use rotated loads)?
ARMv8 (doesn’t use SWP)?

I’m not expecting an answer, just pointing out that the phrase “32 bit okay” is only half a guarantee that something will actually work. ;)
After all, take a look at the various incarnations of Samba, WebJames, even Zap. Some builds work on some systems but not on others.

Though, this is arguably more an issue with the general situation and continual revisions to the ARM than anything else.

 
May 18, 2022 7:22pm
Avatar Jon Abbott (1421) 2356 posts

According to the software compatibility page, ArcFS 2.60 is 32-bit OK

ArcFS has been 32-bit for a while as I’m using 0.75 on a Pi3 without issues. I’ll see if it also causes FileSwitch to Page Zero access with the Repro.

 
Jan 9, 2023 12:15pm
Avatar Chris Evans (457) 1605 posts

Reportedly fixed Version 2.89. FileSwitch

Reply

To post replies, please first log in.

Forums → Bugs →

Search forums

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Description

Bug discussions that aren’t covered by the bugs database.

Voices

  • Jon Abbott (1421)
  • Steffen Huber (91)
  • AndrĂ© Timmermans (100)
  • Rick Murray (539)
  • Chris Evans (457)

Options

  • Forums
  • Login
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Beast theme is based on Beast's default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Beast © 2006 Josh Goebel and Rick Olson
This site runs on Rails

Hosted by Arachsys