بیــــــــوقفه

۰۸ آبان ۹۲ ، ۱۳:۴۲

Adding instructions to the Simplscalar decode tree

The simplscalar decode tree for instructions can be at first quiet daunting.
Tracing the decode pattern is a pen and paper exercise.
e.g the range of instructions that start with 0×06 are defined as
DEFLINK(MEMREGPOST_LINK, 0×06, “memregpost_link”, 20, 0x0f)
CONNECT(MEMREGPOST_LINK)
This means shift the inst that start with 0×06 e.g 0×06000000 and examine bits 20 – 23
After the connect code we have an entry for 0×00 this means that if bits 20 -23 are 00 this will match and generate an opcode for this instruction
e.g 0×06000000
#define STR_R_IMPL \
etc etc
DEFINST(STR_R, 0×00,
etc
The challenge facing anyone is to add extra opcodes that are meaningful.
If one examines the 0×06 range of opcodes it is evident that instructions such as
0×06000100, 0×06000200 are unused.
So how do we use them in Simplescalar?
Well what we need to do is modify arm.def to examine bits 8 – 11 first, if these bits are 0 then they are the original instructions defined under memregpost. If not they are our new instructions.
A statement such as the one below takes care of examining bits 8 -11 of an inst that starts with 0×06
DEFLINK(MEMREGPOST_LINK, 0×06, “memregpost_link”, 8, 0x0f)
CONNECT(MEMREGPOST_LINK)
We now need to ensure that 0×06 instructions whose bits are 0 from pos 8 to 11 are directed to a different part of the decode tree. The deflink code below will be executed if the bits are 0 and will examine bits 20 – 23 of the 0×06 inst in the connect section.
In the example below inst 0×06000000 will be associated with a deflink to a new tree where the isnt str%c will be associated with 0×06000000. While inst 0×06000100 will be associated with the inst demo because bits 8 to 11 equate to 1
DEFLINK(MEMREGPOSTNEW_LINK, 0×00, “memregpostnew_link”, 20, 0x0f)
#define demo_IMPL \
etc
DEFINST(demo, 0×01,
“demo%c”, “%d,%n,%m”,
etc
CONNECT(MEMREGPOSTNEW_LINK)
#define STR_R_IMPL \
etc
DEFINST(STR_R, 0×00,
“str%c”, “%d,[%n],-%m!”,
etc
We also need to to add these new opcodes to your gas see http://www-unix.ecs.umass.edu/~yhan/ for more details on how to hack GAS.


http://www.irishsilicon.com/tag/simplescalar-decode-tree-add-instruction-arm-def/

For the last few days, I am looking at Simple scalar toolset for my research work. I need to add new instructions to SimpleScalar’s native Instruction Set Architecture (PISA). Adding new instruction to the simulator tool seems to be straight forward. But , adding new instructions to the GNU/Assembler for PISA seems to be little complecated. Eventhough there is adocuments on how to add new instructions to the GNU/Assembler for ARM ISA, I couldn’t find one for PISA. I have to mention that I coundn’t find an analogy between ARM Assembler and the one for PISA!

Finally, after much trouble and with the help of Alex and Steve, I have managed to add new instructions to the SImpleScalar’s native ISA – PISA. The process is not hard if you are aware how the tool-set works.

Basically, you need to modify two files.
1] ../simplescalar/simpleutil-version_number/opcode/ss-opc.c

This is the file, where you tell the assembler about the new instructions by telling the opcode, type of instruction, etc.

2] ../simplescalar/simplesim-v.num/pisa-target/pisa.def

This is where you tell the software simulator on what to do when it enconters an instruction of the new type you inserted.

Please ask me for further details.. if anyone in interested on doing this!


http://roshan.wordpress.com/2006/03/23/adding-new-instruction-to-simplescalar-pisa-toolset/



سوالات


Hi, I am wondering how to use the new instruction. Sample programs of SS are written in C. Should I can just call the new instruction as assemble code?

You are right. You need to either use inline assembly or you compile the program to assembly and then insert your code and assemble using your “new” assembler.


۰۷ آبان ۹۲ ، ۱۵:۴۰

Reassemble edited objdump disassembled file

توضحیات کاربران سایت سرریزپشته که ناامید کننده ست در این مورد

۲۶ مهر ۹۲ ، ۰۹:۳۲

انواع بنچمارکها

در این صفحه می توان بخش قابل توجهی از سورس بنچمارکها را دید

https://github.com/jevinskie/llvm-test-suite/tree/master/MultiSource/Benchmarks

۲۶ مهر ۹۲ ، ۰۹:۰۹

حملات تحلیل توان

سایت مربوط به کتاب منتشر شده در این زمینه است: http://www.dpabook.org

در منوی سمت چپ اسکریپتهای نرم افزار متلب و داده های مورد نیاز پیاده سازی این حمله قرار داده شده است.

۱۵ مرداد ۹۲ ، ۱۵:۰۷

استاندارد سازی خدمات

سازمان استاندارد ایالات متحده مجموعه ای از روالهای پیشنهادی برای استاندارد سازی سرویس ها و کارهای گوناگون را تهیه کرده و ارائه می دهد. در سایت این سازمان بسته به موضوع کاری می توان مطالب قابل استفاده ای را یافت.

در خبر زیر می توان نحوه روال سازی و مدیریت تولید استانداردهای کاری را توسط این سازمان دید.

کارگاه افزایش امنیت سایبری زیربناهای حیاتی

۳۱ تیر ۹۲ ، ۱۶:۳۴

Malware Targeting

برای نمایش مطلب باید رمز عبور را وارد کنید
۱۸ تیر ۹۲ ، ۱۱:۵۷

خوش اخلاقی چه شرایطی دارد؟

حجت الاسلام والمسلمین استاد انصاریان به این پرسش که خوش اخلاقی چه شرایطی دارد؟ این گونه پاسخ داده است:

برای این که شخص خوش اخلاق باشید، موارد زیر را رعایت کنید:
1- کمتر راجع به مشکلات گذشته تان فکر کنید،
2- کم توقع باشید،
3- در هر پیشامد بدی احتمال این که خیر دنیا یا آخرت شما در آن باشد را فراموش نکنید،
4- به خدا توکل داشته باشید،
5- در کارها خیلی خود را خسته نکنید،
6- از خواب و خوراک به اندازه کافی استفاده کنید
7- ورزش کنید، حتی اگر نیم ساعت در روز به صورت نرمش باشد
8- برنامه ای برای تفریح تنظیم کنید (سعی کنید تفریحتان در فضای سبز باشد)،
9- به هیچ وجه در ذهن خود مشکلات کوچک را بزرگ کنید،
10- عطر استفاده کنید و از غذاهای خوش بو بیشتر استفاده نمایید.


شفقنا(پایگاه بین المللی همکاری های خبری شیعه)

۱۰ تیر ۹۲ ، ۱۳:۳۳

مدیریت زمان

در دنیایی که همه چیز به سرعت در حال رخ دادن است، مدیریت زمان یکی از اصولی است که به کار هر انسانی در قرن ۲۱ می آید. مدیریت زمان یکی از مباحثی است که این روزها در مورد آن بسیار شنیده می شود و وب سایت ها و کتاب های مختلفی در این مورد منتشر شده است که هدفشان مدیریت زمان و افزایش بهره وری شماست.

امام صادق (ع) می فرمایند: انسان عاقل موظّف است زمان خود را بشناسد و به وظائف خویش متوجّه باشد. (بحار ۵ ، ص۳۴۲)

هدف از این دوره آموزشی آن است که شما دچار یک تغییر پایدار شوید به طوری که به کمک راهنمایی ها و تکنیک هایی که در این دوره آموزشی آن را فرا خواهید گرفت، بتوانید زمان خود را به بهترین نحو ممکن مدیریت کنید و شاهد یک تغییر دائمی باشید، تغییری که بدست آوردن آن نیاز به صرف سال ها تجربه دارد.

۲۸ خرداد ۹۲ ، ۱۹:۵۶

آموزش Metasploit

لینکهای مفید برای آموزش Metasploit:

1 - آموزشهای تصویری متاسپلویت (فایلها فعلا غیرفعال)

2 - آموزش متااسپلویت از پایه (فایلها فعلا غیرفعال)

3- آرشیو فیلم های آموزشی بک ترک

4 - ویدئوهای آموزشی Metasploit & Armitage (فایلها روی پرشین گیگ --> صفحه فایلها)

5 - مجموعه فیلم آموزشی کلاینت هکینگ که بخش از آن با متاسپلوبت هست و مطالب بسیار مفید و کاربردی هست.

برنامه Armitage واسط گرافیکی قدرتمندی هست برای استفاده از متاسپلویت
دانلود برنامه Armitage