Skip to content

Instantly share code, notes, and snippets.

View utzig's full-sized avatar

Fabio Utzig utzig

  • Brazil
View GitHub Profile
@utzig
utzig / performance-package-lock.diff
Last active June 5, 2023 13:47
Update performance package dependencies
diff --git a/package-lock.json b/package-lock.json
index e7a83a6..17f0c07 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7478,7 +7478,7 @@
},
"node_modules/basic-auth": {
"version": "2.0.1",
- "resolved": "https://artifactory.banno-tools.com/artifactory/api/npm/npm/basic-auth/-/basic-auth-2.0.1.tgz",
+ "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
@utzig
utzig / sdk-mcuboot-swap-move-fix2.diff
Created February 8, 2023 00:53
Swap move reset fix
--- sdk-mcuboot-1.9.99-ncs1/boot/bootutil/src/swap_move.c.orig 2022-05-24 08:15:45.000000000 -0300
+++ sdk-mcuboot-1.9.99-ncs1/boot/bootutil/src/swap_move.c 2023-02-07 21:50:22.259499220 -0300
@@ -47,7 +47,26 @@
#define BOOT_STATUS_ASSERT(x) ASSERT(x)
#endif
-static uint32_t g_last_idx = UINT32_MAX;
+uint32_t
+find_last_idx(struct boot_loader_state *state, uint32_t swap_size)
+{
@utzig
utzig / flash_map.c
Created July 2, 2020 12:16 — forked from aport/flash_map.c
MCUBoot flash_map layer for ChibiOS
#include <hal.h>
#include <flash_map_backend/flash_map_backend.h>
#include <bootconf.h>
/* License this file however you want, feel free to do anything */
/*
* This depends on a file bootconf.h which contains the following information:
@utzig
utzig / infosec_newbie.md
Created May 30, 2020 14:43 — forked from mubix/infosec_newbie.md
How to start in Infosec
@utzig
utzig / gist:1daf05bc449255ebd68d19aad8c03be6
Created November 29, 2019 15:21 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@utzig
utzig / penetration.md
Last active October 24, 2022 03:21
Penetration Resources
@utzig
utzig / nffs_dump.txt
Created April 8, 2019 13:23
NFFS inspect
Disk Area 0
magic: good
length: 4096
version: 1
gc_seq: 4
id: 255 (scratch)
Free space: 4048
Disk Area 1
magic: good
length: 4096
@utzig
utzig / k64f-vectors-in-flash.patch
Created December 3, 2018 10:34
k64f-vectors-in-flash.patch
diff --git a/hw/bsp/frdm-k64f/MK64FN1M0xxx12_flash.ld b/hw/bsp/frdm-k64f/MK64FN1M0xxx12_flash.ld
index 838e64db9..a02d81646 100644
--- a/hw/bsp/frdm-k64f/MK64FN1M0xxx12_flash.ld
+++ b/hw/bsp/frdm-k64f/MK64FN1M0xxx12_flash.ld
@@ -53,41 +53,35 @@ ENTRY(Reset_Handler)
HEAP_SIZE = DEFINED(__heap_size__) ? __heap_size__ : 0x10000;
STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x0400;
-M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? 0x0400 : 0x0;
@utzig
utzig / mcuboot-zephyr-no-sign.diff
Created November 21, 2018 10:28
mcuboot-zephyr-no-sign.diff
diff --git a/boot/zephyr/CMakeLists.txt b/boot/zephyr/CMakeLists.txt
index 15c2ece05..4289fd357 100644
--- a/boot/zephyr/CMakeLists.txt
+++ b/boot/zephyr/CMakeLists.txt
@@ -94,7 +94,7 @@ target_sources(app PRIVATE "${BOOT_DIR}/bootutil/src/image_rsa.c")
target_sources(app PRIVATE "${BOOT_DIR}/bootutil/src/image_ec256.c")
target_sources(app PRIVATE "${BOOT_DIR}/bootutil/src/caps.c")
-if(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256)
+if(CONFIG_BOOT_USE_TINYCRYPT)
@utzig
utzig / zig-argv.md
Created October 6, 2018 12:41
zig argv
const std = @import("std");
const warn = std.debug.warn;
const allocator = std.debug.global_allocator;

pub fn main() !void {
    const args = try std.os.argsAlloc(allocator);
    defer std.os.argsFree(allocator, args);

 warn("total args: {}\n", args.len);