-
Notifications
You must be signed in to change notification settings - Fork 92
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
begin kernel renaming. #99
Conversation
remove all ```ForDriver``` and ```ForKernel``` suffix and prefix every kernel function with ```ksce``` instead of ```sce```. Related issue vitasdk#80
Is it possible that there are two functions named |
@xyzz not that I've seen |
@DaveeFTW What's up about the renaming? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some corrections need to be taken in headers.
int sceBtStopAudioForDriver(int r0, int r1, int r2, int r3); | ||
int sceBtStopInquiryForDriver(void); | ||
int sceBtUnregisterCallbackForDriver(SceUID cb); | ||
int ksceBtAvrcpReadVolumeForDriver(int r0, int r1, int r2, int r3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove ForDriver
suffix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in IRC, I believe we should leave SceSysclibForDriver and SceDebugForDriver as is. At least for now, we can open up an issue and have farther debate about it.
I am being conservative about this and have to say that I am totally against this prefix. Anyways, if you guys all really want to do it, I don't want to stop you, but I agree with @yifanlu that using the k prefix for syclib is a bad idea since one would need to rename everything when using open source libraries. |
@TheOfficialFloW Can you explain what you mean by "original as possible?" and provide an example where reverse engineering is hindered by not having an "original" name? My understanding is that we have almost zero "official" kernel names and unlikely to stumble across any more in the future. Striving for official names is unrealistic. The SDK automatically links a significant portion of user libraries to assist developers. If we match names between user and kernel then kernel plugins will likely be compiled against user libraries or fail altogether without special flags. This can be frustrating to developer that are less experienced than yourself. If we have the correct flags, it is still possible for developers to link kernel libraries against user ones manually (or vice versa). Having a very simple namespace between the two APIs provides the needed abstraction to prevent all of this without significant re-engineering. This issue has already manifested several times throughout the beta period. For future readers: the argument for dropping the prefix on sysclib for maintaining compatibility is a compromise. Using the sysclib functions is not recommended as we cannot (have not/will not) verify whether the implementations are actually conforming to the C standard or will/wont continue to in the future. memcpy in the past did not conform to the standard for example. |
@DaveeFTW I mean from the "reverse engineer's" point of view, not that it is hindering reverse engineers. |
@TheOfficialFloW
This is not true, there are many occurrences of Kernel-only functions that don't have the suffix: |
@devnoname120 I mean the suffix of the stubs defined in Makefile. |
@TheOfficialFloW so there's a couple of problems we are trying to solve with this change
Your suggestion of just dropping prefix/suffix altogether doesn't work in all cases either. We have many user syscalls that can be called in kernel that might share the same name with a kernel function in kernel (SceCtrl is a good example, where the syscall version sees the flags differently). In these case, we might have both imports in the same application and therefore they require different names. |
@TheOfficialFloW we will merge this unless you have any farther objections? |
@yifanlu |
remove all
ForDriver
andForKernel
suffix and prefix every kernel function withksce
instead ofsce
. Related issue #80