Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement sysutil_check_name_string, Fix process default sdk version #6967

Merged
merged 3 commits into from
Nov 10, 2019

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Nov 8, 2019

  • Default sdk version is -1. (SYS_PROCESS_PARAM was not set)
  • Implement sysutil_check_name_string:
    • Only limited set of characters is allowed in parameters of a few sysutil functions (\ or / for example aren't allowed, thus the need to escape from / no longer needed there).
    • It turns out if sdk version is below 3.70 it is allowed to insert another character at the end of buffer length, must be proceeded by a null terminator. (e.g for cellSysCacheMount this null term is found at getCachePath[0].)

@Nekotekina
Copy link
Member

Nekotekina commented Nov 8, 2019

I see. I don't think that exposing syscache_info internals is necessary. exitspawn could just save and restore /dev_hdd1/ mount location. syscache_info constructor could detect it too.

@elad335
Copy link
Contributor Author

elad335 commented Nov 8, 2019

can't detect if mounted or not in exitspawn without access to syscache_info::init.

@elad335 elad335 changed the title cellSysCacheClear after exitspawn fix, Implement SysutilIsValidNameString, Fix process default sdk version Implement SysutilIsValidNameString, Fix process default sdk version Nov 9, 2019
@elad335
Copy link
Contributor Author

elad335 commented Nov 9, 2019

Removed exitspawn commit, also updated syscache testcase to include
extra char at end of cacheId test for older sdk version (redefined CELL_SDK_VERSION).

This fails on 4.75 with (↓) on mounting 32 chars long id (33 with null term):

cellSysCacheMount(error 0x8002bc03)
cache path=, id=16-45-01-83-01000000000000000000

For default sdk version test refer to commit elad335/myps3tests@67eae92 .

@Megamouse
Copy link
Contributor

Is that the string check we talked about. If yes then it might be used in that other place I don't remember

* Fully implement 3, 4, 16 and 17 error checks of cellSaveData.
* cellSysCacheMount restrict characters in ID.
* cellHddGameCheck restricts characters in dirName.
Note: sdk version checks are unsigned checks, such value results in always true.
vm::ptr::size() returns sizeof type instead.
@elad335 elad335 changed the title Implement SysutilIsValidNameString, Fix process default sdk version Implement sysutil_check_name_string, Fix process default sdk version Nov 10, 2019
@Megamouse Megamouse added CPU Firmware: HLE Savedata Anything that involves cellSaveData and removed CPU labels Nov 10, 2019
@Nekotekina Nekotekina merged commit 3f3ce53 into RPCS3:master Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Firmware: HLE Savedata Anything that involves cellSaveData
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants