{"action":"created","issue":{"url":"https://api.github.com/repos/radare/radare2/issues/11079","repository_url":"https://api.github.com/repos/radare/radare2","labels_url":"https://api.github.com/repos/radare/radare2/issues/11079/labels{/name}","comments_url":"https://api.github.com/repos/radare/radare2/issues/11079/comments","events_url":"https://api.github.com/repos/radare/radare2/issues/11079/events","html_url":"https://github.com/radare/radare2/pull/11079","id":350285837,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MTcyNjg3","number":11079,"title":"Arm thumb syscalls","user":{"login":"jacobrosenthal","id":455796,"node_id":"MDQ6VXNlcjQ1NTc5Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/455796?v=4","gravatar_id":"","url":"https://api.github.com/users/jacobrosenthal","html_url":"https://github.com/jacobrosenthal","followers_url":"https://api.github.com/users/jacobrosenthal/followers","following_url":"https://api.github.com/users/jacobrosenthal/following{/other_user}","gists_url":"https://api.github.com/users/jacobrosenthal/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobrosenthal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobrosenthal/subscriptions","organizations_url":"https://api.github.com/users/jacobrosenthal/orgs","repos_url":"https://api.github.com/users/jacobrosenthal/repos","events_url":"https://api.github.com/users/jacobrosenthal/events{/privacy}","received_events_url":"https://api.github.com/users/jacobrosenthal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/radare/radare2/milestones/31","html_url":"https://github.com/radare/radare2/milestone/31","labels_url":"https://api.github.com/repos/radare/radare2/milestones/31/labels","id":3073181,"node_id":"MDk6TWlsZXN0b25lMzA3MzE4MQ==","number":31,"title":"2.9.0 - pre-r2con","description":"","creator":{"login":"radare","id":917142,"node_id":"MDQ6VXNlcjkxNzE0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/917142?v=4","gravatar_id":"","url":"https://api.github.com/users/radare","html_url":"https://github.com/radare","followers_url":"https://api.github.com/users/radare/followers","following_url":"https://api.github.com/users/radare/following{/other_user}","gists_url":"https://api.github.com/users/radare/gists{/gist_id}","starred_url":"https://api.github.com/users/radare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radare/subscriptions","organizations_url":"https://api.github.com/users/radare/orgs","repos_url":"https://api.github.com/users/radare/repos","events_url":"https://api.github.com/users/radare/events{/privacy}","received_events_url":"https://api.github.com/users/radare/received_events","type":"User","site_admin":false},"open_issues":135,"closed_issues":66,"state":"open","created_at":"2018-01-29T22:51:46Z","updated_at":"2018-08-23T14:31:52Z","due_on":"2018-09-01T07:00:00Z","closed_at":null},"comments":16,"created_at":"2018-08-14T05:32:03Z","updated_at":"2018-08-23T14:48:16Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/radare/radare2/pulls/11079","html_url":"https://github.com/radare/radare2/pull/11079","diff_url":"https://github.com/radare/radare2/pull/11079.diff","patch_url":"https://github.com/radare/radare2/pull/11079.patch"},"body":"Working to implement arm thumb syscalls in general, but in specific for the nordic s110 softdevice which could be thought of as an 'os'. In future Id like to see support for more softdevices and other full rtos like freertos, mynewt, zephyr.\r\n\r\narm thumb, at least on this cortext device and bin, uses the immediate in the svc call to indicate the syscall number. \r\n\r\n```\r\n0x00018dee      7cdf           svc 0x7c\r\n```\r\nand\r\n```\r\n0x000187b2      76df           svc 0x76\r\n```\r\netc...\r\n\r\n\r\nThis required some upstream fixes pancake took care of for me and for /as changes to look in op.val instead of emulating to find rax/r0 etc.\r\n\r\nCurrent commit has as asl and /as working but thats about it\r\n```\r\n[0x000187b2]> asl\r\nAPPLICATION_0 = 0x80.0\r\nAPPLICATION_1 = 0x80.1\r\nAPPLICATION_2 = 0x80.2\r\nAPPLICATION_3 = 0x80.3\r\nAPPLICATION_4 = 0x80.4\r\nAPPLICATION_5 = 0x80.5\r\nAPPLICATION_6 = 0x80.6\r\nAPPLICATION_7 = 0x80.7\r\nAPPLICATION_8 = 0x80.8\r\nAPPLICATION_9 = 0x80.9\r\nAPPLICATION_10 = 0x80.10\r\nAPPLICATION_11 = 0x80.11\r\nAPPLICATION_12 = 0x80.12\r\nAPPLICATION_13 = 0x80.13\r\nAPPLICATION_14 = 0x80.14\r\nAPPLICATION_15 = 0x80.15\r\nSD_SOFTDEVICE_ENABLE = 0x80.16\r\nSD_SOFTDEVICE_DISABLE = 0x80.17\r\nSD_SOFTDEVICE_IS_ENABLED = 0x80.18\r\nSD_SOFTDEVICE_VECTOR_TABLE_BASE_SET = 0x80.19\r\nSD_MBR_COMMAND = 0x80.24\r\nSD_PPI_CHANNEL_ENABLE_GET = 0x80.32\r\n...\r\n[0x00018dee]> /as @e:search.in=io.map\r\n0x000187b2 SD_BLE_GAP_DISCONNECT\r\n0x000187c2 SD_BLE_GAP_DISCONNECT\r\n0x000189ea SD_BLE_GATTS_SYS_ATTR_SET\r\n0x00018a0e SD_BLE_GAP_SEC_INFO_REPLY\r\n0x00018a16 SD_BLE_GAP_DISCONNECT\r\n0x00018b32 SD_BLE_GAP_DISCONNECT\r\n0x00018c32 SD_BLE_GAP_RSSI_STOP\r\n0x00018d0e SD_APP_EVT_WAIT\r\n0x00018d88 SD_BLE_GAP_RSSI_GET\r\n...\r\n```\r\n\r\nMainly whats left is I cant find the code path for the esil lookup\r\n```\r\n[0x00018dee]> pd--4\r\n|           0x00018de6      0872           strb r0, [r1, 8]\r\n|           0x00018de8      0a22           movs r2, 0xa                ; r2=0xa -> 0x6b10000 aav.0x0000000a ; zf=0x0\r\n|           0x00018dea      50a1           adr r1, str.EASYFIT_HR      ; 0x18f2c ; \"EASYFIT HR\" ; r1=0x140 -> 0x6809493e\r\n|           0x00018dec      02a8           add r0, sp, 8               ; r0=0x20004ab8\r\n|           ;-- hit0_16.SD_BLE_GAP_DEVICE_NAME_SET:\r\n|           0x00018dee      7cdf           svc 0x7c                    ; 0 = APPLICATION_0 ()\r\n|           0x00018df0      0028           cmp r0, 0                   ; zf=0x1 -> 0xd1000007 ; zf=0x1 -> 0xd1000007\r\n|       ,=< 0x00018df2      03d0           beq 0x18dfc                 ; pc=0x18dfc -> 0xdf78484e ; likely\r\n|       |   0x00018df4      0022           movs r2, 0                  ; r2=0x0 ; zf=0x1 -> 0xd1000007\r\n[0x00018dee]> \r\n```\r\n\r\nNo guarantees these are good implementations yet. WIP. feedback welcome."},"comment":{"url":"https://api.github.com/repos/radare/radare2/issues/comments/415445516","html_url":"https://github.com/radare/radare2/pull/11079#issuecomment-415445516","issue_url":"https://api.github.com/repos/radare/radare2/issues/11079","id":415445516,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTQ0NTUxNg==","user":{"login":"jacobrosenthal","id":455796,"node_id":"MDQ6VXNlcjQ1NTc5Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/455796?v=4","gravatar_id":"","url":"https://api.github.com/users/jacobrosenthal","html_url":"https://github.com/jacobrosenthal","followers_url":"https://api.github.com/users/jacobrosenthal/followers","following_url":"https://api.github.com/users/jacobrosenthal/following{/other_user}","gists_url":"https://api.github.com/users/jacobrosenthal/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobrosenthal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobrosenthal/subscriptions","organizations_url":"https://api.github.com/users/jacobrosenthal/orgs","repos_url":"https://api.github.com/users/jacobrosenthal/repos","events_url":"https://api.github.com/users/jacobrosenthal/events{/privacy}","received_events_url":"https://api.github.com/users/jacobrosenthal/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T14:48:16Z","updated_at":"2018-08-23T14:48:16Z","author_association":"CONTRIBUTOR","body":"Sounds good. Ill have some time to interact more in a day or two probably\nas well.\n\nOn Thu, Aug 23, 2018 at 7:36 AM radare <notifications@github.com> wrote:\n\n> tired of waiting. ill write the testcases from the assembly snippets you\n> shared and fix your pr\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/radare/radare2/pull/11079#issuecomment-415441130>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AAb0dOXo_Hl7JgJ_K3d2PipEHmx18XY2ks5uTr3kgaJpZM4V70Ft>\n> .\n>\n"}}
{"actor":{"display_login":"jacobrosenthal"}}