{"action":"created","comment":{"url":"https://api.github.com/repos/ARMmbed/uvisor/pulls/comments/65724983","id":65724983,"diff_hunk":"@@ -0,0 +1,285 @@\n+/*\n+ * Copyright (c) 2016, ARM Limited, All Rights Reserved\n+ * SPDX-License-Identifier: Apache-2.0\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n+ * not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+/* This file can be compiled externally to provide the page allocator algorithm\n+ * for devices NOT supported by uVisor. For this purpose this file is copied as\n+ * is into the target build folder and compiled by the target build system. */\n+#if defined(UVISOR_PRESENT) && (UVISOR_PRESENT == 1)\n+\n+#include <uvisor.h>\n+#include \"page_allocator.h\"\n+#include \"mpu/vmpu_unpriv_access.h\"\n+#include \"mpu/vmpu.h\"\n+#include \"halt.h\"\n+#include \"context.h\"\n+\n+/* Since the page table memory is provided by the user, all accesses to it\n+ * are depriviledged! */\n+#define page_table_read  vmpu_unpriv_uint32_read\n+#define page_table_write vmpu_unpriv_uint32_write\n+/* For uVisor in supported mode the page allocator is always called through a\n+ * SVC call, which automagically serializes access to it. */\n+#define UVISOR_PAGE_ALLOCATOR_MUTEX_AQUIRE  {}\n+#define UVISOR_PAGE_ALLOCATOR_MUTEX_RELEASE {}\n+\n+#endif /* defined(UVISOR_PRESENT) && (UVISOR_PRESENT == 1) */\n+\n+/* We can only protect a small number of pages efficiently, so there should be\n+ * a relatively low limit to the number of pages.\n+ * By default a maximum of 16 pages are allowed. This can only be overridden\n+ * by the porting engineer for the current platform. */\n+#ifndef UVISOR_PAGE_TABLE_MAX_COUNT\n+#define UVISOR_PAGE_TABLE_MAX_COUNT ((uint32_t) 16)\n+#endif\n+/* The number of pages is decided by the page size. A small page size leads to\n+ * a lot of pages, however, number of pages is capped for efficiency.\n+ * Furthermore, when allocating large continous memory, a too small page size\n+ * will lead to allocation failures. This can only be overridden\n+ * by the porting engineer for the current platform. */\n+#ifndef UVISOR_PAGE_SIZE_MINIMUM\n+#define UVISOR_PAGE_SIZE_MINIMUM ((uint32_t) 1024)\n+#endif\n+\n+/* The page box_id is the box id which is 8-bit large. */\n+typedef uint8_t page_owner_t;\n+/* Maps the page to the owning box handle. */\n+static page_owner_t g_page_owner_table[UVISOR_PAGE_TABLE_MAX_COUNT];\n+/* Define a unused value for the page table. */\n+#define UVISOR_PAGE_UNUSED ((page_owner_t) (-1))\n+\n+/* Contains the configured page size. */\n+static uint32_t g_page_size;\n+/* Points to the beginning of the page heap. */\n+static const void * g_page_heap_start;\n+/* Points to the end of the page heap. */\n+static const void * g_page_heap_end;\n+/* Contains the number of free pages. */\n+static uint8_t g_page_count_free;\n+/* Contains the total number of available pages. */\n+static uint8_t g_page_count_total;\n+\n+\n+void page_allocator_init(void * const heap_start, void * const heap_end, const uint32_t * const page_size)\n+{\n+    /* Make sure the UVISOR_PAGE_UNUSED is definitely NOT a valid box id. */\n+    if (vmpu_is_box_id_valid(UVISOR_PAGE_UNUSED)) {\n+        HALT_ERROR(SANITY_CHECK_FAILED,\n+            \"UVISOR_PAGE_UNUSED (%u) must not be a valid box id!\\n\",\n+            UVISOR_PAGE_UNUSED);\n+    }\n+    if (!page_size || !vmpu_public_flash_addr((uint32_t) page_size)) {\n+        HALT_ERROR(SANITY_CHECK_FAILED,\n+            \"Page size pointer (0x%08x) is not in flash memory.\\n\",\n+            (unsigned int) page_size);\n+    }\n+    if (!heap_start || !vmpu_sram_addr((uint32_t) heap_start)) {\n+        HALT_ERROR(SANITY_CHECK_FAILED,\n+            \"Page heap start pointer (0x%08x) is not in sram memory.\\n\",\n+            (unsigned int) heap_start);\n+    }\n+    if (!heap_end || !vmpu_sram_addr((uint32_t) heap_end)) {\n+        HALT_ERROR(SANITY_CHECK_FAILED,\n+            \"Page heap end pointer (0x%08x) is not in sram memory.\\n\",\n+            (unsigned int) heap_end);\n+    }\n+    if (heap_end < heap_start) {\n+        HALT_ERROR(SANITY_CHECK_FAILED,\n+            \"Page heap end pointer (0x%08x) is smaller than heap start pointer (0x%08x).\\n\",\n+            (unsigned int) heap_end,\n+            (unsigned int) heap_start);\n+    }\n+    if ((*page_size < UVISOR_PAGE_SIZE_MINIMUM) || !vmpu_is_region_size_valid(*page_size)) {\n+        HALT_ERROR(SANITY_CHECK_FAILED,\n+            \"Page size (%uB) not supported by this platform!\\n\",\n+            *page_size);\n+    }\n+\n+    uint32_t start = vmpu_round_up_region((uint32_t) heap_start, *page_size);\n+    if (start == 0) {\n+        HALT_ERROR(SANITY_CHECK_FAILED,\n+            \"Page heap start address 0x%08x cannot be aligned with page size %uB!\\n\",\n+            (unsigned int) heap_start,\n+            (unsigned int) *page_size);\n+    }\n+\n+    g_page_size = *page_size;\n+    /* This is the page heap start address. */\n+    g_page_heap_start = (void *) start;\n+\n+    /* How many pages can we fit in here? */\n+    if ((start + g_page_size) > (uint32_t) heap_end) {\n+        g_page_count_total = 0;\n+    } else {\n+        g_page_count_total = ((uint32_t) heap_end - start) / g_page_size;\n+    }\n+    /* Clamp page count to table size. */\n+    if (g_page_count_total > UVISOR_PAGE_TABLE_MAX_COUNT) {\n+        g_page_count_total = UVISOR_PAGE_TABLE_MAX_COUNT;\n+    }\n+    g_page_count_free = g_page_count_total;\n+    /* Remember the end of the heap. */\n+    g_page_heap_end = g_page_heap_start + g_page_count_free * g_page_size;\n+\n+    DPRINTF(\"uvisor_page_init:\\n.page_heap start 0x%08x\\n.page_heap end   0x%08x\\n.page_heap available %ukB split into %u pages of %ukB\\n\\n\",\n+            (unsigned int) g_page_heap_start,\n+            (unsigned int) g_page_heap_end,\n+            (unsigned int) (g_page_count_free * g_page_size / 1024),\n+            (unsigned int) g_page_count_total,\n+            (unsigned int) (g_page_size / 1024));\n+\n+    uint32_t page = 0;\n+    for (; page < g_page_count_total; page++) {\n+        g_page_owner_table[page] = UVISOR_PAGE_UNUSED;\n+    }\n+}\n+\n+int page_allocator_malloc(UvisorPageTable * const table)\n+{\n+    UVISOR_PAGE_ALLOCATOR_MUTEX_AQUIRE;\n+    uint32_t pages_required = page_table_read((uint32_t) &(table->page_count));\n+    uint32_t page_size = page_table_read((uint32_t) &(table->page_size));\n+    /* Check if the user even wants any pages. */\n+    if (pages_required == 0) {\n+        DPRINTF(\"uvisor_page_malloc: FAIL: No pages requested!\\n\\n\");\n+        UVISOR_PAGE_ALLOCATOR_MUTEX_RELEASE;\n+        return UVISOR_ERROR_PAGE_INVALID_PAGE_COUNT;\n+    }\n+    /* Check if we can fulfill the requested page size. */\n+    if (page_size != g_page_size) {\n+        DPRINTF(\"uvisor_page_malloc: FAIL: Requested page size %uB is not the configured page size %uB!\\n\\n\", page_size, g_page_size);\n+        UVISOR_PAGE_ALLOCATOR_MUTEX_RELEASE;\n+        return UVISOR_ERROR_PAGE_INVALID_PAGE_SIZE;\n+    }\n+    /* Check if we have enough pages available. */\n+    if (pages_required > g_page_count_free) {\n+        DPRINTF(\"uvisor_page_malloc: FAIL: Cannot serve %u pages with only %u free pages!\\n\\n\", pages_required, g_page_count_free);\n+        UVISOR_PAGE_ALLOCATOR_MUTEX_RELEASE;\n+        return UVISOR_ERROR_PAGE_OUT_OF_MEMORY;\n+    }\n+\n+    /* Get the calling box id. */\n+    const page_owner_t box_id = g_active_box;\n+    DPRINTF(\"uvisor_page_malloc: Requesting %u pages with size %uB for box %u\\n\", pages_required, page_size, box_id);\n+\n+    /* Update the free pages count. */\n+    g_page_count_free -= pages_required;\n+    /* Point to the first entry in the table. */\n+    void * * page_table = table->page_origins;\n+\n+    /* Iterate through the page table and find the empty pages. */\n+    uint32_t page = 0;\n+    for (; (page < g_page_count_total) && pages_required; page++) {\n+        /* If the page is unused, it's entry is UVISOR_PAGE_UNUSED (not NULL!). */\n+        if (g_page_owner_table[page] == UVISOR_PAGE_UNUSED) {\n+            /* Marry this page to the box id. */\n+            g_page_owner_table[page] = box_id;\n+            /* Get the pointer to the page. */\n+            void * ptr = (void *) g_page_heap_start + page * g_page_size;\n+            /* Zero the entire page before handing it out. */\n+            memset(ptr, 0, g_page_size);\n+            /* Write the pages address to the table in the first page. */\n+            page_table_write((uint32_t) page_table, (uint32_t) ptr);\n+            page_table++;\n+            /* One less page required. */\n+            pages_required--;\n+            DPRINTF(\"uvisor_page_malloc: Found an empty page 0x%08x entry at index %u\\n\", (unsigned int) ptr, page);\n+        }\n+    }\n+    DPRINTF(\"uvisor_page_malloc: %u free pages remaining.\\n\\n\", g_page_count_free);\n+\n+    UVISOR_PAGE_ALLOCATOR_MUTEX_RELEASE;\n+    return UVISOR_ERROR_PAGE_OK;\n+}\n+\n+int page_allocator_free(const UvisorPageTable *const table)\n+{\n+    UVISOR_PAGE_ALLOCATOR_MUTEX_AQUIRE;\n+    if (g_page_count_free == g_page_count_total) {\n+        DPRINTF(\"uvisor_page_free: FAIL: There are no pages to free!\\n\\n\");\n+        UVISOR_PAGE_ALLOCATOR_MUTEX_RELEASE;\n+        return UVISOR_ERROR_PAGE_INVALID_PAGE_TABLE;\n+    }\n+    uint32_t page_count = page_table_read((uint32_t) &(table->page_count));\n+    uint32_t page_size = page_table_read((uint32_t) &(table->page_size));\n+    if (page_size != g_page_size) {\n+        DPRINTF(\"uvisor_page_free: FAIL: Requested page size %uB is not the configured page size %uB!\\n\\n\", page_size, g_page_size);\n+        UVISOR_PAGE_ALLOCATOR_MUTEX_RELEASE;\n+        return UVISOR_ERROR_PAGE_INVALID_PAGE_SIZE;\n+    }\n+    if (page_count == 0) {\n+        DPRINTF(\"uvisor_page_free: FAIL: Pointer table is empty!\\n\\n\");\n+        UVISOR_PAGE_ALLOCATOR_MUTEX_RELEASE;\n+        return UVISOR_ERROR_PAGE_INVALID_PAGE_COUNT;\n+    }\n+    if (page_count > (unsigned) (g_page_count_total - g_page_count_free)) {\n+        DPRINTF(\"uvisor_page_free: FAIL: Pointer table too large!\\n\\n\");\n+        UVISOR_PAGE_ALLOCATOR_MUTEX_RELEASE;\n+        return UVISOR_ERROR_PAGE_INVALID_PAGE_TABLE;\n+    }\n+\n+    /* Get the calling box id. */\n+    const page_owner_t box_id = g_active_box;\n+    int table_size = page_count;\n+\n+    /* Contains the bit mask of all the pages we need to free. */\n+    uint32_t free_mask[(UVISOR_PAGE_TABLE_MAX_COUNT + 31) / 32] = {0};\n+    /* Iterate over the table and validate each pointer. */\n+    void * const * page_table = table->page_origins;\n+\n+    for (; table_size > 0; page_table++, table_size--) {\n+        void *page = (void *) page_table_read((uint32_t) page_table);\n+        /* Range check the returned pointer. */\n+        if (page < g_page_heap_start || page >= g_page_heap_end) {\n+            DPRINTF(\"uvisor_page_free: FAIL: Pointer 0x%08x does not belong to any page!\\n\\n\", (unsigned int) page);\n+            UVISOR_PAGE_ALLOCATOR_MUTEX_RELEASE;\n+            return UVISOR_ERROR_PAGE_INVALID_PAGE_ORIGIN;\n+        }\n+        /* Compute the index for the pointer. */\n+        uint32_t page_index = (page - g_page_heap_start) / g_page_size;\n+        /* Check if the page belongs to the caller. */\n+        if (g_page_owner_table[page_index] == box_id) {\n+            free_mask[page_index / 32] |= (1 << (page_index & 31));\n+        }","path":"core/system/src/page_allocator.c","position":256,"original_position":256,"commit_id":"b73c6cee82e95af07dc8ee068d7f02c54a38bb8a","original_commit_id":"f6a881c67deb32fb9fadafdecde0e7ccaf1ef182","user":{"login":"AlessandroA","id":8617445,"avatar_url":"https://avatars.githubusercontent.com/u/8617445?v=3","gravatar_id":"","url":"https://api.github.com/users/AlessandroA","html_url":"https://github.com/AlessandroA","followers_url":"https://api.github.com/users/AlessandroA/followers","following_url":"https://api.github.com/users/AlessandroA/following{/other_user}","gists_url":"https://api.github.com/users/AlessandroA/gists{/gist_id}","starred_url":"https://api.github.com/users/AlessandroA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlessandroA/subscriptions","organizations_url":"https://api.github.com/users/AlessandroA/orgs","repos_url":"https://api.github.com/users/AlessandroA/repos","events_url":"https://api.github.com/users/AlessandroA/events{/privacy}","received_events_url":"https://api.github.com/users/AlessandroA/received_events","type":"User","site_admin":false},"body":"```diff\r\n-        }\r\n-        /* Abort if the page doesn't belong to the caller. */\r\n-        else {\r\n-            if (g_page_owner_table[page_index] == UVISOR_PAGE_UNUSED) {\r\n\r\n+        } else {\r\n+            /* Abort if the page doesn't belong to the caller. */\r\n+            if (g_page_owner_table[page_index] == UVISOR_PAGE_UNUSED) {\r\n```","created_at":"2016-06-03T15:18:23Z","updated_at":"2016-06-03T15:18:23Z","html_url":"https://github.com/ARMmbed/uvisor/pull/227#discussion_r65724983","pull_request_url":"https://api.github.com/repos/ARMmbed/uvisor/pulls/227","_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/uvisor/pulls/comments/65724983"},"html":{"href":"https://github.com/ARMmbed/uvisor/pull/227#discussion_r65724983"},"pull_request":{"href":"https://api.github.com/repos/ARMmbed/uvisor/pulls/227"}}},"pull_request":{"url":"https://api.github.com/repos/ARMmbed/uvisor/pulls/227","id":71713218,"html_url":"https://github.com/ARMmbed/uvisor/pull/227","diff_url":"https://github.com/ARMmbed/uvisor/pull/227.diff","patch_url":"https://github.com/ARMmbed/uvisor/pull/227.patch","issue_url":"https://api.github.com/repos/ARMmbed/uvisor/issues/227","number":227,"state":"open","locked":false,"title":"1. Add tier-1 page allocator","user":{"login":"niklas-arm","id":15176141,"avatar_url":"https://avatars.githubusercontent.com/u/15176141?v=3","gravatar_id":"","url":"https://api.github.com/users/niklas-arm","html_url":"https://github.com/niklas-arm","followers_url":"https://api.github.com/users/niklas-arm/followers","following_url":"https://api.github.com/users/niklas-arm/following{/other_user}","gists_url":"https://api.github.com/users/niklas-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/niklas-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklas-arm/subscriptions","organizations_url":"https://api.github.com/users/niklas-arm/orgs","repos_url":"https://api.github.com/users/niklas-arm/repos","events_url":"https://api.github.com/users/niklas-arm/events{/privacy}","received_events_url":"https://api.github.com/users/niklas-arm/received_events","type":"User","site_admin":false},"body":"This adds the page allocator algorithm, initialization code and SVC calls.\r\n\r\nThis is part of larger changes, but I'd prefer to review these parts separately when possible.\r\n\r\n@Patater @AlessandroA @meriac ","created_at":"2016-05-27T13:31:18Z","updated_at":"2016-06-03T15:18:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c8d4d26531ae88c9134dcd6318acf925ccb44875","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ARMmbed/uvisor/pulls/227/commits","review_comments_url":"https://api.github.com/repos/ARMmbed/uvisor/pulls/227/comments","review_comment_url":"https://api.github.com/repos/ARMmbed/uvisor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARMmbed/uvisor/issues/227/comments","statuses_url":"https://api.github.com/repos/ARMmbed/uvisor/statuses/b73c6cee82e95af07dc8ee068d7f02c54a38bb8a","head":{"label":"niklas-arm:feature/page_heap_allocator","ref":"feature/page_heap_allocator","sha":"b73c6cee82e95af07dc8ee068d7f02c54a38bb8a","user":{"login":"niklas-arm","id":15176141,"avatar_url":"https://avatars.githubusercontent.com/u/15176141?v=3","gravatar_id":"","url":"https://api.github.com/users/niklas-arm","html_url":"https://github.com/niklas-arm","followers_url":"https://api.github.com/users/niklas-arm/followers","following_url":"https://api.github.com/users/niklas-arm/following{/other_user}","gists_url":"https://api.github.com/users/niklas-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/niklas-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklas-arm/subscriptions","organizations_url":"https://api.github.com/users/niklas-arm/orgs","repos_url":"https://api.github.com/users/niklas-arm/repos","events_url":"https://api.github.com/users/niklas-arm/events{/privacy}","received_events_url":"https://api.github.com/users/niklas-arm/received_events","type":"User","site_admin":false},"repo":{"id":56140266,"name":"uvisor","full_name":"niklas-arm/uvisor","owner":{"login":"niklas-arm","id":15176141,"avatar_url":"https://avatars.githubusercontent.com/u/15176141?v=3","gravatar_id":"","url":"https://api.github.com/users/niklas-arm","html_url":"https://github.com/niklas-arm","followers_url":"https://api.github.com/users/niklas-arm/followers","following_url":"https://api.github.com/users/niklas-arm/following{/other_user}","gists_url":"https://api.github.com/users/niklas-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/niklas-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niklas-arm/subscriptions","organizations_url":"https://api.github.com/users/niklas-arm/orgs","repos_url":"https://api.github.com/users/niklas-arm/repos","events_url":"https://api.github.com/users/niklas-arm/events{/privacy}","received_events_url":"https://api.github.com/users/niklas-arm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/niklas-arm/uvisor","description":"mbed OS uVisor -- device security layer for ARMv7M microcontrollers","fork":true,"url":"https://api.github.com/repos/niklas-arm/uvisor","forks_url":"https://api.github.com/repos/niklas-arm/uvisor/forks","keys_url":"https://api.github.com/repos/niklas-arm/uvisor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/niklas-arm/uvisor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/niklas-arm/uvisor/teams","hooks_url":"https://api.github.com/repos/niklas-arm/uvisor/hooks","issue_events_url":"https://api.github.com/repos/niklas-arm/uvisor/issues/events{/number}","events_url":"https://api.github.com/repos/niklas-arm/uvisor/events","assignees_url":"https://api.github.com/repos/niklas-arm/uvisor/assignees{/user}","branches_url":"https://api.github.com/repos/niklas-arm/uvisor/branches{/branch}","tags_url":"https://api.github.com/repos/niklas-arm/uvisor/tags","blobs_url":"https://api.github.com/repos/niklas-arm/uvisor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/niklas-arm/uvisor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/niklas-arm/uvisor/git/refs{/sha}","trees_url":"https://api.github.com/repos/niklas-arm/uvisor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/niklas-arm/uvisor/statuses/{sha}","languages_url":"https://api.github.com/repos/niklas-arm/uvisor/languages","stargazers_url":"https://api.github.com/repos/niklas-arm/uvisor/stargazers","contributors_url":"https://api.github.com/repos/niklas-arm/uvisor/contributors","subscribers_url":"https://api.github.com/repos/niklas-arm/uvisor/subscribers","subscription_url":"https://api.github.com/repos/niklas-arm/uvisor/subscription","commits_url":"https://api.github.com/repos/niklas-arm/uvisor/commits{/sha}","git_commits_url":"https://api.github.com/repos/niklas-arm/uvisor/git/commits{/sha}","comments_url":"https://api.github.com/repos/niklas-arm/uvisor/comments{/number}","issue_comment_url":"https://api.github.com/repos/niklas-arm/uvisor/issues/comments{/number}","contents_url":"https://api.github.com/repos/niklas-arm/uvisor/contents/{+path}","compare_url":"https://api.github.com/repos/niklas-arm/uvisor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/niklas-arm/uvisor/merges","archive_url":"https://api.github.com/repos/niklas-arm/uvisor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/niklas-arm/uvisor/downloads","issues_url":"https://api.github.com/repos/niklas-arm/uvisor/issues{/number}","pulls_url":"https://api.github.com/repos/niklas-arm/uvisor/pulls{/number}","milestones_url":"https://api.github.com/repos/niklas-arm/uvisor/milestones{/number}","notifications_url":"https://api.github.com/repos/niklas-arm/uvisor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/niklas-arm/uvisor/labels{/name}","releases_url":"https://api.github.com/repos/niklas-arm/uvisor/releases{/id}","deployments_url":"https://api.github.com/repos/niklas-arm/uvisor/deployments","created_at":"2016-04-13T09:50:01Z","updated_at":"2016-04-13T09:50:02Z","pushed_at":"2016-06-03T15:13:49Z","git_url":"git://github.com/niklas-arm/uvisor.git","ssh_url":"git@github.com:niklas-arm/uvisor.git","clone_url":"https://github.com/niklas-arm/uvisor.git","svn_url":"https://github.com/niklas-arm/uvisor","homepage":"","size":5206,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ARMmbed:dev","ref":"dev","sha":"8357f564ee83d00fe33de6c311b310f1309bbfb8","user":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars.githubusercontent.com/u/8916057?v=3","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"repo":{"id":27869517,"name":"uvisor","full_name":"ARMmbed/uvisor","owner":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars.githubusercontent.com/u/8916057?v=3","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARMmbed/uvisor","description":"mbed OS uVisor -- device security layer for ARMv7M microcontrollers","fork":false,"url":"https://api.github.com/repos/ARMmbed/uvisor","forks_url":"https://api.github.com/repos/ARMmbed/uvisor/forks","keys_url":"https://api.github.com/repos/ARMmbed/uvisor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARMmbed/uvisor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARMmbed/uvisor/teams","hooks_url":"https://api.github.com/repos/ARMmbed/uvisor/hooks","issue_events_url":"https://api.github.com/repos/ARMmbed/uvisor/issues/events{/number}","events_url":"https://api.github.com/repos/ARMmbed/uvisor/events","assignees_url":"https://api.github.com/repos/ARMmbed/uvisor/assignees{/user}","branches_url":"https://api.github.com/repos/ARMmbed/uvisor/branches{/branch}","tags_url":"https://api.github.com/repos/ARMmbed/uvisor/tags","blobs_url":"https://api.github.com/repos/ARMmbed/uvisor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARMmbed/uvisor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARMmbed/uvisor/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARMmbed/uvisor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARMmbed/uvisor/statuses/{sha}","languages_url":"https://api.github.com/repos/ARMmbed/uvisor/languages","stargazers_url":"https://api.github.com/repos/ARMmbed/uvisor/stargazers","contributors_url":"https://api.github.com/repos/ARMmbed/uvisor/contributors","subscribers_url":"https://api.github.com/repos/ARMmbed/uvisor/subscribers","subscription_url":"https://api.github.com/repos/ARMmbed/uvisor/subscription","commits_url":"https://api.github.com/repos/ARMmbed/uvisor/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARMmbed/uvisor/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARMmbed/uvisor/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARMmbed/uvisor/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARMmbed/uvisor/contents/{+path}","compare_url":"https://api.github.com/repos/ARMmbed/uvisor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARMmbed/uvisor/merges","archive_url":"https://api.github.com/repos/ARMmbed/uvisor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARMmbed/uvisor/downloads","issues_url":"https://api.github.com/repos/ARMmbed/uvisor/issues{/number}","pulls_url":"https://api.github.com/repos/ARMmbed/uvisor/pulls{/number}","milestones_url":"https://api.github.com/repos/ARMmbed/uvisor/milestones{/number}","notifications_url":"https://api.github.com/repos/ARMmbed/uvisor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARMmbed/uvisor/labels{/name}","releases_url":"https://api.github.com/repos/ARMmbed/uvisor/releases{/id}","deployments_url":"https://api.github.com/repos/ARMmbed/uvisor/deployments","created_at":"2014-12-11T11:59:50Z","updated_at":"2016-05-30T04:35:22Z","pushed_at":"2016-06-03T15:13:51Z","git_url":"git://github.com/ARMmbed/uvisor.git","ssh_url":"git@github.com:ARMmbed/uvisor.git","clone_url":"https://github.com/ARMmbed/uvisor.git","svn_url":"https://github.com/ARMmbed/uvisor","homepage":"","size":6418,"stargazers_count":57,"watchers_count":57,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":33,"mirror_url":null,"open_issues_count":29,"forks":33,"open_issues":29,"watchers":57,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/uvisor/pulls/227"},"html":{"href":"https://github.com/ARMmbed/uvisor/pull/227"},"issue":{"href":"https://api.github.com/repos/ARMmbed/uvisor/issues/227"},"comments":{"href":"https://api.github.com/repos/ARMmbed/uvisor/issues/227/comments"},"review_comments":{"href":"https://api.github.com/repos/ARMmbed/uvisor/pulls/227/comments"},"review_comment":{"href":"https://api.github.com/repos/ARMmbed/uvisor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARMmbed/uvisor/pulls/227/commits"},"statuses":{"href":"https://api.github.com/repos/ARMmbed/uvisor/statuses/b73c6cee82e95af07dc8ee068d7f02c54a38bb8a"}}}}
{"actor":{"display_login":"AlessandroA"}}