-
Notifications
You must be signed in to change notification settings - Fork 65
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
access() fix #86
access() fix #86
Conversation
sysLv2FsAccess() crashes and halts the system :-( this is a workaround that doesn't use the lv2 syscall
I don't particularly like this workaround. If |
https://www.psdevwiki.com/ps3/LV2_Functions_and_Syscalls |
Maybe of interest is #63 from 6 years ago, which also says access didn't work out... Anyway, if As for |
Ah, there is a change to |
For reference, there is an earlier case of emulating access() using stat() inside newlib already: |
hello @zeldin , thanks for the feedback
As mentioned by @crystalct , the info was taken from the psdevwiki syscall page I also checked the RPCS3 emu source, and they have a similar definition for but again, it's not working in real hardware. (perhaps it was removed at some point)
alright, so
it compiles, but requires the updated newlib patch that adds |
Alright, if understand correctly, the rationale is to keep code in PSL1GHT if it's backed by some PS3 system functionality. If not, it should go to I think that having the Back on this topic, which changes should I focus on?
did I miss something, or got something wrong? thanks |
I'll try to propose a newlib patch with the emulated edit: newlib emulated access(), ps3dev/ps3toolchain#91 |
Yes.
Yes, and Please make sure that the newlib-1.20.0-PS3 repo and the patch in ps3toolchain are kept in sync. Thanks |
Well, that is not an official Sony document. Presumably the information comes either from a leak or from an RE effort, but either way we don't have direct access to the source so we can't check if a mistake was made on the wiki. Presumably the RPCS3 authors also blindly believed the wiki page. 😄 |
hello @zeldin , thanks for the explanation about newlib Indeed, as you said, RPCS3 is not official and they might have also based their work on the wiki docs or some dump/leak/RE. Since @crystalct mentioned that there's no reference about it in the official SDK docs, I guess it's safe to assume that the function is not available. Newlib PRs: |
About cellFSAccess and RPCS3: |
Also unzip and rhash are necessary (cgcomp). |
which os version are you using? |
I'm using macOS (10.15.5) |
no i mean on the ps3. |
I'm on 4.84 firmware. |
hmm i should try this on my 3.55 ps3. |
On windows raw2h must be compiled and installed. raw2s doesn't exist... i suppose they are the same..... |
RPCS3 guys claim that cellFsAccess (its syscal 816) exist. They found it using reverse engineering .... |
Yes, at least for information purposes, It would be nice to know if the lv2 access() was available on 3.55 😄 |
it seems that the only code I could find about I guess we could just re-add the original |
I don't see the need. raw2s is the new raw2h. Essentially it generates a header and a assembly file. |
you are referring as if |
raw2h was probably broken somehow, but it should be available for legacy projects that still call it. |
Is raw2s a standard linux command? |
@wargio you added check on VPCOMP and RAW2H variables to compile Tini3d and both variable doesn't exist inside psl1ght ppu_rules. CGCOMP exist, probably they are the same util. In the installation process they must be included and to check/install raw2h/s utility and an eventual vpcom utility. |
Only one raw2s that i found with google is inside n64tools-1-1 (nintendo 64 tools). |
I propose raw2h present in the old psl1ght as "offical" (when and where it is needed) |
Again, why you adding it back? https://github.com/ps3dev/PSL1GHT/blob/master/base_rules#L89 |
@wargio do you meen raw2h is bin2s? |
you can just check how bin2s works: https://github.com/wargio/NoRSX/blob/master/NoRSX_Example/Makefile#L147 |
yes it is. |
ohhhh good ^_^ |
@crystalct i think we just need to define these targets in the makefile https://github.com/ps3dev/PSL1GHT/blob/master/ppu_rules#L72 |
@wargio , i mean that.... just about VPCOMP & CGCOMP.... do we need both? |
they are synonym. so a PR is enough |
Now VPCOMP is CGCOMP |
It isn't hurting anything to be there in the tools folder. That way if any legacy software is calling for it you just compile it and be on your way. |
can i suggest to have a CI? |
@miigotu has been working on a workflow to build a Docker image for ps3toolchain/psl1ght using submodules on my fork I've made a simple workflow to build binaries for Ubuntu and macOS: |
Toolchain builds fine right now. Having some issue with my workflow right now, but there will be multi-arch docker builds and releases for win/Mac/Linux autocreated soon. If it builds it passes. |
@miigotu |
I'm thinking I pushed that vectormath commit that didn't belong. Can't remember if I put it up on master before lol. I'll revert that commit later, but you could try that @crystalct |
Why has the comment section of this PR turned into an IRC channel? 😕 |
Ha, I'm on both freenode and efnet same name if anyone needs to chat. |
thanks to @crystalct 's feedback, we detected that
sysLv2FsAccess()
crashes and halts the PS3 systemBased on code he shared, I'm proposing this
access()
workaround that doesn't use the lv2 syscall, while keeping the expected behavior.