Hi there. Recently i wanted to mount my PS3 hdd on my linux PC and I had some headache trying to port glevand's dm-bswap16 to newer kernels.
Eventually I gave up with the kernel module and I started looking for something else, in the end I bumped into Network Block Devices.
I forked nbdcpp from dsroche on github and I replicated the behavior of the glevand's kernel module by swapping bytes every 16 bit words.
Please keep in mind that this code has not been tested deeply, if you care about your data make a backup of your hard drive before using the tool.
Usefull informations (keys and fat/slim differences):
Edit: http://www.psdevwiki.com/ps3/Talk:HDD_Encryption (I just wrote some easy openssl commands to get the needed keys from your eid_root_key)
You can find my fork here: https://github.com/sguerrini97/nbdcpp
git clone https://github.com/sguerrini97/nbdcpp
To mount ps3 hdd (slim console, /dev/sdc is the ps3 hdd, run as root):
./makedev bswap16 /dev/sdc
cryptsetup create -c aes-xts-plain64 -d ./hdd_key.bin -s 256 ps3hdd_crypt /dev/nbd0
kpartx -a /dev/mapper/ps3hdd_crypt
mount -t ufs -o ufstype=ufs2,ro /dev/mapper/ps3hdd_crypt2 /mnt
To safely remove ps3 hdd (run as root):
kpartx -d /dev/mapper/ps3hdd_crypt
cryptsetup remove ps3hdd_crypt
Edit: in case you need to mount vflash (slim console, run as root)
cryptsetup create -c aes-xts-plain64 -d ./vflash_key.bin -s 256 -p 8 vflash_crypt /dev/mapper/ps3hdd_crypt1
kpartx -a /dev/mapper/vflash_crypt
mount /dev/mapper/vflash_crypt2 /mnt/dev_flash
mount /dev/mapper/vflash_crypt3 /mnt/dev_flash2
mount /dev/mapper/vflash_crypt4 /mnt/dev_flash3
# do your stuff ...
kpartx -d /dev/mapper/vflash_crypt
cryptsetup remove vflash_crypt