• R/O
  • SSH
  • HTTPS

akari: Commit


Commit MetaInfo

Revision655 (tree)
Zeit2020-09-22 17:15:00
Autorkumaneko

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- branches/kportreserve/probe.c (revision 654)
+++ branches/kportreserve/probe.c (revision 655)
@@ -225,7 +225,7 @@
225225 #if defined(CONFIG_ARM64)
226226
227227 /**
228- * probe_security_hook_heads_on_arm - Find security_hook_heads on ARM64.
228+ * probe_security_hook_heads_on_arm64 - Find security_hook_heads on ARM64.
229229 *
230230 * @base: Address of security_bprm_committed_creds().
231231 *
@@ -261,7 +261,7 @@
261261 tmp += offset;
262262 /*
263263 * Find
264- * ldr Xt, Xn, #uimm12
264+ * ldr Xt, [Xn, #uimm12]
265265 * sequence.
266266 */
267267 for (ip += 2; i < 32 - 2; ip++, i++) {
@@ -274,6 +274,38 @@
274274 }
275275 break;
276276 }
277+ for (i = 0; i < 32; ip++, i++) {
278+ unsigned long tmp;
279+ unsigned long offset;
280+
281+ /*
282+ * Find
283+ * adrp Xd, #imm21
284+ * sequence.
285+ */
286+ if ((*ip & 0x9F000000) != 0x90000000)
287+ continue;
288+ tmp = ((unsigned long) ip) & ~0xFFFUL;
289+ offset = (unsigned long) (((((*ip >> 5) & 0x007FFFF) << 2) |
290+ ((*ip >> 29) & 0x3))) << 12;
291+ if (offset & 0x100000000UL)
292+ offset |= 0xFFFFFFFF00000000UL;
293+ tmp += offset;
294+ /*
295+ * Find
296+ * ldr Xt, [Xn, #uimm12]
297+ * sequence.
298+ */
299+ for (ip += 1; i < 32 - 1; ip++, i++) {
300+ if ((*ip & 0xFFC00000) != 0xF9400000)
301+ continue;
302+ offset = ((*ip >> 10) & 0xFFF) << 3;
303+ tmp += offset;
304+ ip4ret = (unsigned int *) tmp;
305+ return &ip4ret;
306+ }
307+ break;
308+ }
277309 return NULL;
278310 }
279311
--- branches/tasktracker/probe.c (revision 654)
+++ branches/tasktracker/probe.c (revision 655)
@@ -225,7 +225,7 @@
225225 #if defined(CONFIG_ARM64)
226226
227227 /**
228- * probe_security_hook_heads_on_arm - Find security_hook_heads on ARM64.
228+ * probe_security_hook_heads_on_arm64 - Find security_hook_heads on ARM64.
229229 *
230230 * @base: Address of security_bprm_committed_creds().
231231 *
@@ -261,7 +261,7 @@
261261 tmp += offset;
262262 /*
263263 * Find
264- * ldr Xt, Xn, #uimm12
264+ * ldr Xt, [Xn, #uimm12]
265265 * sequence.
266266 */
267267 for (ip += 2; i < 32 - 2; ip++, i++) {
@@ -274,6 +274,38 @@
274274 }
275275 break;
276276 }
277+ for (i = 0; i < 32; ip++, i++) {
278+ unsigned long tmp;
279+ unsigned long offset;
280+
281+ /*
282+ * Find
283+ * adrp Xd, #imm21
284+ * sequence.
285+ */
286+ if ((*ip & 0x9F000000) != 0x90000000)
287+ continue;
288+ tmp = ((unsigned long) ip) & ~0xFFFUL;
289+ offset = (unsigned long) (((((*ip >> 5) & 0x007FFFF) << 2) |
290+ ((*ip >> 29) & 0x3))) << 12;
291+ if (offset & 0x100000000UL)
292+ offset |= 0xFFFFFFFF00000000UL;
293+ tmp += offset;
294+ /*
295+ * Find
296+ * ldr Xt, [Xn, #uimm12]
297+ * sequence.
298+ */
299+ for (ip += 1; i < 32 - 1; ip++, i++) {
300+ if ((*ip & 0xFFC00000) != 0xF9400000)
301+ continue;
302+ offset = ((*ip >> 10) & 0xFFF) << 3;
303+ tmp += offset;
304+ ip4ret = (unsigned int *) tmp;
305+ return &ip4ret;
306+ }
307+ break;
308+ }
277309 return NULL;
278310 }
279311
--- trunk/akari/policy_io.c (revision 654)
+++ trunk/akari/policy_io.c (revision 655)
@@ -2704,7 +2704,7 @@
27042704 if (strstr(value, ccs_mode[mode]))
27052705 /*
27062706 * Update lower 3 bits in order to distinguish
2707- * 'config' from 'CCS_CONFIG_USE_DEAFULT'.
2707+ * 'config' from 'CCS_CONFIG_USE_DEFAULT'.
27082708 */
27092709 config = (config & ~7) | mode;
27102710 if (config != CCS_CONFIG_USE_DEFAULT) {
--- trunk/akari/probe.c (revision 654)
+++ trunk/akari/probe.c (revision 655)
@@ -225,7 +225,7 @@
225225 #if defined(CONFIG_ARM64)
226226
227227 /**
228- * probe_security_hook_heads_on_arm - Find security_hook_heads on ARM64.
228+ * probe_security_hook_heads_on_arm64 - Find security_hook_heads on ARM64.
229229 *
230230 * @base: Address of security_bprm_committed_creds().
231231 *
@@ -261,7 +261,7 @@
261261 tmp += offset;
262262 /*
263263 * Find
264- * ldr Xt, Xn, #uimm12
264+ * ldr Xt, [Xn, #uimm12]
265265 * sequence.
266266 */
267267 for (ip += 2; i < 32 - 2; ip++, i++) {
@@ -274,6 +274,38 @@
274274 }
275275 break;
276276 }
277+ for (i = 0; i < 32; ip++, i++) {
278+ unsigned long tmp;
279+ unsigned long offset;
280+
281+ /*
282+ * Find
283+ * adrp Xd, #imm21
284+ * sequence.
285+ */
286+ if ((*ip & 0x9F000000) != 0x90000000)
287+ continue;
288+ tmp = ((unsigned long) ip) & ~0xFFFUL;
289+ offset = (unsigned long) (((((*ip >> 5) & 0x007FFFF) << 2) |
290+ ((*ip >> 29) & 0x3))) << 12;
291+ if (offset & 0x100000000UL)
292+ offset |= 0xFFFFFFFF00000000UL;
293+ tmp += offset;
294+ /*
295+ * Find
296+ * ldr Xt, [Xn, #uimm12]
297+ * sequence.
298+ */
299+ for (ip += 1; i < 32 - 1; ip++, i++) {
300+ if ((*ip & 0xFFC00000) != 0xF9400000)
301+ continue;
302+ offset = ((*ip >> 10) & 0xFFF) << 3;
303+ tmp += offset;
304+ ip4ret = (unsigned int *) tmp;
305+ return &ip4ret;
306+ }
307+ break;
308+ }
277309 return NULL;
278310 }
279311
Show on old repository browser