Playing with oracle DB 18c on-premises before official release

Rodrigo Jorge has already explained a great way to install and play with Oracle 18c DB instance on-premises using Exadata binaries downloaded from edelivery. The basic idea is to install the oracle exadata binaries and before creating the database replace the library “libserver18.a” with the  version gotten from an oracle cloud instance  (Using Oracle Cloud trial account). And that’s it !

But for those like me that don’t have an international credit card required to create an Oracle Cloud trial account  (Yes i don’t have one 😦 ) or don’t want to create one  ! How to proceed to get a copy of this working libserver18.a library ? May be ask one of the oracle folks to upload it to somewhere and hope that there is no backdoor on it :p  or just try to hack it your self 😀

So after some digging i figure out a way 😀 no need to change the library “libserver18.a” just run this systemtap script that will change the return value of the function “ksz_exadata_feature_on” to 1 and that’s all !!


stap -g -v -e ‘ function  _hatem_startup_force() %{ long ret; ret = 1; memcpy( ((char *)CONTEXT->uregs) + 80 , &ret, sizeof(ret)); %} probe process(“oracle”).function(“ksz_exadata_feature_on”).return { _hatem_startup_force(); }’

Before :

Capture 51

Capture 01

Patched / Hacked / whatever !!!

Capture 80

Capture 02

Capture 03

Of course this is only for fun and testing 😀


UPDATE 07/03/2018 : Another way is to set the parameter “_exadata_feature_on=true”

That’s all 😀

8 thoughts on “Playing with oracle DB 18c on-premises before official release

  1. That’s cool, especially the function _hatem_startup_force, the advanced C embedded function. Is there a detailed explanation for coming up the “memcpy( ((char *)CONTEXT->uregs) + 80 , &ret, sizeof(ret)); “? what “context->uregs” is? and why 80 is used here?

    Or is there any more in-depth material to show how to modify a return code of any functions of oracle binary or whatever a program?


  2. Thanks a lot, Mahmoud.
    By slightly modifying your script, I managed to cheat Oracle that I have 6 CPU_COUNT, although I really have 2:

    function modify_rax() %{ long ret; ret = 6; memcpy( ((char *)CONTEXT->uregs) + 80 , &ret, sizeof(ret)); %}
    probe process(“oracle”).function(“skgpnumcpu”).return { modify_rax(); }

    Best Regards

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s