Figured out how to disable HDD encryption permanently by patching HV
Just theory for now, still needs testing

Will report back after i tested it.
Holy crap, guys

Patched HV at runtime, disabled HDD encryption, rebooted GameOS and GameOS started to format my HDD and i lost all data on my HDD

I guess because everything was encrypted and GameOS didn’t understand it because i disabled decryption, so it reformated HDD.
HV reversing is fun
Dumped raw and decrypted UFS2 filesystem of PS3 with HV calls
The difference is that i do not use LV2 at all to decrypt/encrypt storage devices. Storage device encryption/decryption is done by HV and peripheral devices like ENCDEC or RBD. I’m trying to understand how the storage subsystem of HV works currently, it’s by far the most complex part of HV i have seen so far.
And recently i figured out that the VFLASH region, where Linux boot loader (otheros.bld) is stored, is still there on 3.41 firmware. I’m trying now to boot Linux bootloader from this region. OtherOs.self writes otheros.bld image to this VFLASH region and creates cekk_ext_os_area where several parameters are stored. On 3.15 firmware, when Linux was booted, the Linux System Manager (in HV process 9) loads Linux bootloader from the VFLASH region, decompresses it and boots it.
The problem with 3.4.1 firmware is, that SONY removed Linux System Manager from HV process 9. It’s no problem for me to store Linux bootloader on this VFLASH partition. But there are 2 problems, first the VFLASH region where Linux is stored is 0×40000 bytes large, so there is not much place for Linux bootloader on VFLASH, so it should be compressed to make it smaller. Second problem is, i have to patch HV process, insert my code which loads it from VFLASH and decompresses Linux bootloader. And after that we could boot Linux from HDD and it would have GameOS rights, e.g. has access to Dispatcher Manager e.g.
or run isolated SPUs.
And more, HV has a nice feature to boot Linux bootloader with System Debugger

Too bad i don’t have a debugger for HV
I dumped now both decrypted and encrypted sectors of UFS2. And the same plaintext is encrypted to the same ciphertext

Encryption is independent of sector position.
And SONY uses 128-bit block cipher to encrypt the blocks within a sector.
Yeah, it would be possible to redirect dev_flash to another HDD region, e.g. by patching Hypervisor’s storage subsystem. HDD has enough space for that.
And i figured out that the size of VFLASH region where 3.15 stored otheros.bld can be doubled and i will be able to store decompressed Linux bootloader otheros.bld on this VFLASH region

It will simplify HV patching immensely, i do not need now to decompress Linux bootloader in HV. I will test it today and report back. There are 0×2000 extra unused sectors between the VFLASH region for otheros.bld and the next VFLASH region, so i can use those sectors and increase the size of VFLASH region for otheros.bld.
We could make a CFW by patching HV with dual boot option, either GameOS or Linux could be booted from HDD.
It’s not as easy as booting Linux from HDD or booting second lv2 kernel from FLASH. I don’t want to say it’s impossible but it’s very hard.
I updated now my partition table of VFLASH and incresed the size of VFLASH region where Linux bootloader is stored. After that i stored petitboot Linux bootloader on VFLASH successfully. Next step – patching HV at runtime and booting petitboot from HDD which will allow me to install a Linux distribution on a HDD region on my 3.41 PS3.
CORE OS is not on VFLASH, it’s on a real FLASH, NOR flash. That makes it hard to redirect, i would say impossible. But by creating our HV which could switch ISO loaders table and redirecting VFLASH it would be possible to boot 2 different GameOS versions. For that we need our own patched HV.
My approach will enable OtherOS to have the same access rigths as GameOS, it means access to Dispatcher Manager, Update Manager, VFLASH, HDD encryption/decryption, isolated SPUs and RSX of course. GameOS is only good for games, for PS3 development and hacking is Linux or FreeBSD with GameOS rights are a lot better. And i want a clean approach for booting Linux, not like AsbestOS, it’ not very clean.
I have my loader for OtherOS bootloader ready now, will patch HV today and try it out in the evening, after that will report back. Stay tuned.