Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Linux kernel port #5482

Open
wants to merge 112 commits into
base: master
Choose a base branch
from
Open

RFC: Linux kernel port #5482

wants to merge 112 commits into from

Conversation

Jongy
Copy link
Contributor

@Jongy Jongy commented Jan 1, 2020

I've been working on this port in the past month. It started as a fun PoC but I realized its usefulness for kernel research & debugging so I kept expanding it. It shows how powerful MicroPython is, due to the relative ease of porting it.

I'd happily continue maintaining it in a fork, but I prefer mainlining if possible. I think it'll be more accessible for others to contribute. @dpgeorge it's up to you.

TODOs list before merge, as I see it:

@dlech
Copy link
Contributor

dlech commented Jan 2, 2020

So you can build MicroPython as a Linux kernel module, then modprobe micropython and be able to peek/poke anything in the kernel via FFI?

@Jongy
Copy link
Contributor Author

Jongy commented Jan 2, 2020

So you can build MicroPython as a Linux kernel module, then modprobe micropython and be able to peek/poke anything in the kernel via FFI?

Basically, yep. You can also place hooks and everything. The ports/linux-kernel/README.rst is quite extensive.

@dpgeorge
Copy link
Member

dpgeorge commented Jan 3, 2020

Wow, very cool! And good work writing the extensive README.

I'll have to review it in more detail, but I'm +1 upon first glance.

@dpgeorge dpgeorge added the ports Relates to multiple ports, or a new/proposed port label Jan 3, 2020
@zsquareplusc
Copy link
Contributor

According to the readme, the REPL is exposed via TCP on all interfaces? wouldn't it be more (if at all) secure to only expose it via a character device file with root access only (i.e. something like a /dev/mpy)? allowing external access to this sounds just a bit risky from a security perspective ;-)

The lazy loading of globals to access kernel symbols looks interesting, but might be a bit confusing (typos may become a kernel symbol by chance, shadowed symbols)? maybe putting that into a module would make that more explicit, e.g. kernel.xy would look up the symbol xy in the kernel (e.g. from kernel import printk; printk(...) or import kernel; kernel.printk(...)).

@Jongy
Copy link
Contributor Author

Jongy commented Jan 3, 2020

I'll have to review it in more detail, but I'm +1 upon first glance.

Cool :D

According to the readme, the REPL is exposed via TCP on all interfaces? wouldn't it be more (if at all) secure to only expose it via a character device file with root access only (i.e. something like a /dev/mpy)? allowing external access to this sounds just a bit risky from a security perspective ;-

Usually I run this on QEMU and connect to the python via a host-only tap interface. I went this way because:

  1. It was easier to use existing sockets API, compared to creating a functioning read/write character device - the socket layer does the buffering for me, etc.
  2. It allows keeping a regular /bin/sh shell on the QEMU serial screen, for viewing dmesg separately, interacting with the kernel from usermode, ...

If security is an issue - this can be easily changed to bind on a specific interface and possibly include some iptables rules to prevent access from unwanted sources.

The lazy loading of globals to access kernel symbols looks interesting, but might be a bit confusing (typos may become a kernel symbol by chance, shadowed symbols)? maybe putting that into a module would make that more explicit, e.g. kernel.xy would look up the symbol xy in the kernel (e.g. from kernel import printk; printk(...) or import kernel; kernel.printk(...)).

Originally I had the globals on a separate module, but I valued typing speed and readability most, at least on the REPL, so I created the globals trick. I don't recall having any issue with this. However, it's totally a matter of taste, and we can add a runtime option to switch between those 2 modes, something like kernel_ffi.auto_globals(...).

@Jongy
Copy link
Contributor Author

Jongy commented Jan 5, 2020

With some changes in pyboard.py, I managed to run the tests:

591 tests performed (15390 individual testcases)
408 tests passed
64 tests skipped

I guess some work has to be done... :)

@IveJ
Copy link

IveJ commented Jan 6, 2020 via email

py/objint.c Outdated Show resolved Hide resolved
py/mpconfig.h Show resolved Hide resolved
py/mpconfig.h Outdated Show resolved Hide resolved
@dpgeorge
Copy link
Member

complete previous PRs required for this (#5420 #5412 #4928) and perhaps split out more unrelated commits into separate PRs

Yes, let's work on that first. One of those PR's is now merged (EMACS REPL), and the other two are pending revision.

Please try to split out all other core changes to separate PRs. Ideally this PR would add files only to the new ports/linux-kernel subdir.

@Jongy
Copy link
Contributor Author

Jongy commented Jan 12, 2020

Please try to split out all other core changes to separate PRs. Ideally this PR would add files only to the new ports/linux-kernel subdir.

I'll move everything that's logically okay to be separate. The remains are, currently:

  1. Fixes to py/nlrx64.c (the changes include direct reference to the __KERNEL__ define used for kernel-mode compilation, so it's weird to add it before the port itself)
  2. Upcoming changes I have for the tests to run (e.g adding linux-kernel to the list of EXTERNAL_TARGETS in tests/run-tests...)

@Jongy
Copy link
Contributor Author

Jongy commented Jan 17, 2020

Rebased on latest master.

Latest changes include:

  1. Running the full test suite:
494 tests performed (13123 individual testcases)
494 tests passed
163 tests skipped

Takes about 8 minutes to run.

  1. Allows binding the server on specific address.
  2. Allows disabling the automatic globals binding with kernel_ffi.auto_globals(False).

I've added 1 basic linux-kernel specific test, I've got ideas for a few more though.

Allow ports to provide a lazy load function for undefined globals.
Use it to remain with the default MPZ_DIG_SIZE = 32 on 64-bit builds.
Still has a long way to go, but IMO this is already proved useful when
you need to prototype APIs / monitor specific data.
Importing Python files from the filesystem works as expected.
Uses my "struct_layout" project, written for this purpose.
It sets the top of the stack. The stack should later include arguments passed in the "args" array, and
also "ts" itself. By wrapping everything with this function, we ensure that everything's contained.
… context.

I really don't know why I placed it inside that inner block. But luckily it seems like
this didn't change the compiler output at all; It would've been a tough bug to find...
Defined in 'include/linux/compiler_attributes.h', and it messes up with
MicroPython's MP_FALLTHROUGH.
Instead of reimplementing it here :p
@Jongy
Copy link
Contributor Author

Jongy commented Aug 12, 2021

I have rebased this branch on v1.16; the old commit (as of 7f2a088) is available at https://github.com/Jongy/micropython/tree/linux-kernel-v1.12.

This is git range-diff master..linux-kernel-v1.12 master..linux-kernel:

  1:  d021c8bd2 !   1:  bf8282d33 py/runtime: Add MICROPY_LAZY_LOAD_GLOBAL.
    @@ py/mpconfig.h: typedef double mp_float_t;
      ## py/runtime.c ##
     @@ py/runtime.c: mp_obj_t mp_load_global(qstr qst) {
              #endif
    -         elem = mp_map_lookup((mp_map_t*)&mp_module_builtins_globals.map, MP_OBJ_NEW_QSTR(qst), MP_MAP_LOOKUP);
    +         elem = mp_map_lookup((mp_map_t *)&mp_module_builtins_globals.map, MP_OBJ_NEW_QSTR(qst), MP_MAP_LOOKUP);
              if (elem == NULL) {
     +            #if MICROPY_LAZY_LOAD_GLOBAL
     +            // allow port to provide this global
    @@ py/runtime.c: mp_obj_t mp_load_global(qstr qst) {
     +                return obj;
     +            }
     +            #endif
    -             if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
    -                 mp_raise_msg(&mp_type_NameError, "name not defined");
    -             } else {
    ++
    +             #if MICROPY_ERROR_REPORTING <= MICROPY_ERROR_REPORTING_TERSE
    +             mp_raise_msg(&mp_type_NameError, MP_ERROR_TEXT("name not defined"));
    +             #else
     
      ## py/runtime.h ##
    -@@ py/runtime.h: static inline void mp_globals_set(mp_obj_dict_t *d) { MP_STATE_THREAD(dict_globa
    +@@ py/runtime.h: static inline void mp_globals_set(mp_obj_dict_t *d) {
      
      mp_obj_t mp_load_name(qstr qst);
      mp_obj_t mp_load_global(qstr qst);
  2:  dff5b7184 !   2:  3f6ca640b tools/makemanifest.py: Allow passing flags to mpy-tool.py
    @@ Metadata
      ## Commit message ##
         tools/makemanifest.py: Allow passing flags to mpy-tool.py
     
    +    Use it to remain with the default MPZ_DIG_SIZE = 32 on 64-bit builds.
    +
      ## ports/unix/Makefile ##
     @@ ports/unix/Makefile: ifneq ($(FROZEN_MANIFEST)$(FROZEN_MPY_DIR),)
      # freeze, then invoke make with FROZEN_MANIFEST=manifest.py (be sure to build from scratch).
    @@ py/mkrules.mk: $(HEADER_BUILD):
     
      ## tools/makemanifest.py ##
     @@ tools/makemanifest.py: def main():
    -     cmd_parser.add_argument('-o', '--output', help='output path')
    -     cmd_parser.add_argument('-b', '--build-dir', help='output path')
    -     cmd_parser.add_argument('-f', '--mpy-cross-flags', default='', help='flags to pass to mpy-cross')
    +     cmd_parser.add_argument(
    +         "-f", "--mpy-cross-flags", default="", help="flags to pass to mpy-cross"
    +     )
     +    cmd_parser.add_argument('--mpy-tool-flags', default='', help='flags to pass to mpy-tool')
    -     cmd_parser.add_argument('-v', '--var', action='append', help='variables to substitute')
    -     cmd_parser.add_argument('files', nargs='+', help='input manifest list')
    +     cmd_parser.add_argument("-v", "--var", action="append", help="variables to substitute")
    +     cmd_parser.add_argument("files", nargs="+", help="input manifest list")
          args = cmd_parser.parse_args()
     @@ tools/makemanifest.py: def main():
    -         sys.exit(1)
    - 
    -     # Freeze .mpy files
    --    res, output_mpy = system([sys.executable, MPY_TOOL, '-f', '-q', args.build_dir + '/genhdr/qstrdefs.preprocessed.h'] + mpy_files)
    -+    res, output_mpy = system([sys.executable, MPY_TOOL, '-f', '-q', args.build_dir + '/genhdr/qstrdefs.preprocessed.h']
    -+                             + args.mpy_tool_flags.split() + mpy_files)
    -     if res != 0:
    -         print('error freezing mpy {}: {}'.format(mpy_files, output_mpy))
    -         sys.exit(1)
    +                 "-q",
    +                 args.build_dir + "/genhdr/qstrdefs.preprocessed.h",
    +             ]
    +-            + mpy_files
    ++            + args.mpy_tool_flags.split() + mpy_files
    +         )
    +         if res != 0:
    +             print("error freezing mpy {}:".format(mpy_files))
  3:  1d98c4361 =   3:  9db453d95 linux-kernel: Add Linux kernel MicroPython port.
  4:  e7029ebf6 =   4:  84dcd467e linux-kernel: Implement very minimal import routines
  5:  78dfa8d28 =   5:  47e8f127c linux-kernel: Add memory write functions.
  6:  d15425668 =   6:  4975dd83a linux-kernel: Implement structs accessing.
  7:  f9dbd85ad =   7:  f62351a6b linux-kernel: Increase heap size.
  8:  3ef89cb70 =   8:  9db76ac1d linux-kernel: Remove GC info prints on gc_collect().
  9:  5e70841d3 =   9:  11b21982c linux-kernel: Enable uerrno module.
 10:  226a3dc56 =  10:  850054147 linux-kernel: kernel_ffi: Allow writing to "unwritable" memory via p64().
 11:  ecf0acad2 =  11:  40b82a63f linux-kernel: kernel_ffi: Impelemnt callbacks and kprobe hooks.
 12:  a0df2b7f8 =  12:  3462d7f3a linux-kernel: kernel_ffi: Allow instantiating Symbols.
 13:  d4f55ad76 =  13:  5ecc1c51b linux-kernel: Don't attempt send/receive data if no peer is connected.
 14:  19152d3d1 =  14:  dfd98910e linux-kernel: Print output via printk() if no peer is connected to the shell.
 15:  6ec5635f1 =  15:  befc6f31b linux-kernel: Add some debug prints on startup.
 16:  f586196f2 =  16:  6ac304b79 linux-kernel: Support compilation for older kernels (tested 4.4)
 17:  d721a6b70 =  17:  5224489c2 linux-kernel: Enable more REPL keys.
 18:  b764d78b0 <   -:  --------- py/nlrx64: Fix nlr_push() for Linux kernels with CONFIG_FRAME_POINTER.
  -:  --------- >  18:  38bd1fb8e py/nlrx64: Fix nlr_push() for Linux kernels with CONFIG_FRAME_POINTER.
 19:  de9ff920f =  19:  b8231c68f linux-kernel: Enable MICROPY_ENABLE_FINALISER.
 20:  9535146f0 =  20:  6f2c88be9 linux-kernel: Enable MICROPY_CAN_OVERRIDE_BUILTINS.
 21:  44e682dcb =  21:  6153522d5 linux-kernel: kernel_ffi: Print Python function exception with printk.
 22:  64c974bd6 =  22:  9d5682f4a linux-kernel: Export die() function.
 23:  6583a785f =  23:  dd248a152 linux-kernel: Reorder module initialization and support rmmod.
 24:  5e6ef4ec4 =  24:  c895dc2c2 linux-kernel: Remove -Wimplicit-fallthrough from CFLAGS.
 25:  22fa249ac =  25:  ed81c9313 linux-kernel: Export mp_print_printk.
 26:  17c20198a =  26:  c0f74a4d0 linux-kernel: Make use of mp_print_printk for MicroPython stdout printing.
 27:  80e3eff8a =  27:  8a0fe7fa0 linux-kernel: Don't escape printed characters with mp_print_printk.
 28:  8d208ccb2 =  28:  4ae485fba linux-kernel: Enable MICROPY_STACK_CHECK.
 29:  ef3bb5872 =  29:  39fc74eaa linux-kernel: Use pr_* macros.
 30:  eff938df9 =  30:  c4c24a08a linux-kernel: Break out from kernel_accept() on rmmod.
 31:  b3d5f21d7 =  31:  d11f6afc6 linux-kernel: kernel_ffi: Share Symbol init code between functions.
 32:  02dd3c41b =  32:  6a4a766b2 linux-kernel: kernel_ffi: Improve kprobes.
 33:  64fc986b0 =  33:  3a924aa87 linux-kernel: kernel_ffi: Introduce ftrace.
 34:  bab28c319 =  34:  cd4f4ca3c linux-kernel: Printk general info on startup.
 35:  841526cd0 =  35:  54e59705c linux-kernel: Get available stack space left more accurately.
 36:  cd3d8cc35 =  36:  a1bac2266 linux-kernel: kernel_ffi: Add kmalloc helper.
 37:  a6d1069af =  37:  26cbfcdcb linux-kernel: Add threading support and make this port thread-safe.
 38:  4535a49bb =  38:  3a77e5072 linux-kernel: kernel_ffi: Use direct insructions to write to cr0.
 39:  da845c082 =  39:  5fd431add linux-kernel: Build struct_layout automatically when it's enabled.
 40:  25f9c75f6 =  40:  12a549257 linux-kernel: Few docs improvements.
 41:  885041791 =  41:  fde53b74d linux-kernel: kernel_ffi: Take into account the "first arg" in callback args count.
 42:  f617986f5 =  42:  6a11b29c6 linux-kernel: Refrain from running gc_collect() in atomic contexts.
 43:  962d5b16e =  43:  6a99d3b37 linux-kernel: thread: Separate get_thread_for_current() responsibilities.
 44:  0bba254c8 =  44:  111c6e831 linux-kernel: kernel_ffi: Handle nested hooks.
 45:  2ec684dd9 =  45:  01e244d5f linux-kernel: Add future TODOs to the README.
 46:  ea112ba88 =  46:  78a2fd7c2 linux-kernel: Document code loading via imports / raw REPL mode.
 47:  d6df605e1 =  47:  5cc580288 linux-kernel: Fix includes on v4.4
 48:  7af0fa8ca =  48:  6dbfb8376 linux-kernel: kernel_ffi: Add current().
 49:  15bbb5c33 =  49:  e753a20ed linux-kernel: Direct output to kernel log in atomic context.
 50:  2a76957bb =  50:  7eb1676c6 linux-kernel: Enable MICROPY_STACKLESS.
 51:  121460f4c =  51:  ca41cea77 linux-kernel: kernel_ffi: Reorder ftrace unregister calls.
 52:  3f9686d00 =  52:  1f421fb27 linux-kernel: thread: Allocate thread context with GFP_ATOMIC.
 53:  cc487fa71 =  53:  b40fa11ff linux-kernel: kernel_ffi: Complete ftrace object initialization before registration.
 54:  c2032f116 =  54:  6617da989 linux-kernel: Defer GC request in atomic contexts to the server thread.
 55:  d7b7c6049 =  55:  cad63849f linux-kernel: Run gc_collect_root() on current thread registers' as well.
 56:  ea96ed139 =  56:  3c0ee9613 linux-kernel: Implement DEBUG_printf().
 57:  84e80e079 =  57:  329a0766c linux-kernel: Ensure the entire server thread stack is covered, for GC sweep purposes.
 58:  36c19ab91 =  58:  57c778e80 linux-kernel: kernel_ffi: Document why dynamically allocated ftrace_ops are okay.
 59:  786203a1d =  59:  2c6ac3040 linux-kernel: Automatically clean struct_layout on "make clean".
 60:  25e283d20 =  60:  ae86a913b linux-kernel: Set MICROPY_GC_ALLOC_THRESHOLD to 1/8 of the heap size.
 61:  ac7a02b61 =  61:  e3f9d90fe linux-kernel: Enable MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF.
 62:  69940df58 =  62:  54af864e7 linux-kernel: Enable MICROPY_MEM_STATS and friends.
 63:  ececae763 =  63:  ca7221b8a linux-kernel: Don't use alloca() at all.
 64:  2c55b86df =  64:  f2d5b9803 linux-kernel: Enable MICROPY_WARNINGS and more warnings.
 65:  89a57c3f9 =  65:  7ebf1c949 linux-kernel: kernel_ffi: Small typo fixes.
 66:  239dfb4a7 =  66:  33a4c65bd linux-kernel: kernel_ffi: Wrap mp_obj_print_exception() call with NLR.
 67:  94a303fde =  67:  e1dcbb36c linux-kernel: thread: Disable interrupts on writes to threads' list.
 68:  b3b4e0e96 =  68:  43e44be22 linux-kernel: Fix includes for different kernel versions
 69:  2997d0059 =  69:  423bdebb9 linux-kernel: Enable MICROPY_PY_BUILTINS_HELP.
 70:  d4088db80 =  70:  6f93f1bdc linux-kernel: Enable MICROPY_PY_BUILTINS_NOTIMPLEMENTED.
 71:  609060ba1 =  71:  70af81fee linux-kernel: Allow binding on different server address using a 'server_addr' module parameter.
 72:  70ae84984 =  72:  5a340310d linux-kernel: kernel_ffi: Provide alternative mechanism for accessing kernel symbols.
 73:  60e5928e4 =  73:  3c0df12d2 linux-kernel: Add docs on struct dumping
 74:  e594b1908 =  74:  66a66859e linux-kernel: Enable REPL type switching based on 'pyexec_mode_kind'.
 75:  33b4064b7 !  75:  143f84335 tests/pyboard: Add SocketToSerial class.
    @@ tools/pyboard.py: class TelnetToSerial:
          "Execute a process and emulate serial connection using its stdin/stdout."
      
     @@ tools/pyboard.py: class Pyboard:
    -             self.serial = ProcessToSerial(device[len("exec:"):])
    +             self.serial = ProcessToSerial(device[len("exec:") :])
              elif device.startswith("execpty:"):
    -             self.serial = ProcessPtyToTerminal(device[len("qemupty:"):])
    +             self.serial = ProcessPtyToTerminal(device[len("qemupty:") :])
     +        elif device.startswith("socket:"):
     +            ip, port = device[len("socket:"):].split(':')
     +            self.serial = SocketToSerial(ip, int(port), read_timeout=10)
    -         elif device and device[0].isdigit() and device[-1].isdigit() and device.count('.') == 3:
    +         elif device and device[0].isdigit() and device[-1].isdigit() and device.count(".") == 3:
                  # device looks like an IP address
                  self.serial = TelnetToSerial(device, user, password, read_timeout=10)
 76:  7758cdcdd <   -:  --------- tests/run-tests: Add linux-kernel to the list of external targets.
  -:  --------- >  76:  0f978dc82 tests/run-tests: Add linux-kernel to the list of external targets.
 77:  5d67294ae =  77:  89551ede2 linux-kernel: kernel_ffi: Implement equality test for symbols.
 78:  9d7a3f30b =  78:  51da5024a linux-kernel: structs: Use kernel_ffi.symbol instead of depending on auto globals binding.
 79:  3e7605c29 =  79:  359d5f747 linux-kernel: Add "tests_mode" module parameter that changes behavior for the tests.
 80:  e5151babc =  80:  5a83556e4 linux-kernel: Explain about the tests in README.
 81:  6f80008ee !  81:  ca0a2a18e linux-kernel: Add first linux-kernel specific tests.
    @@ tests/linux-kernel/symbols.py.exp (new)
     +NameError
     +NameError
     
    - ## tests/run-tests ##
    -@@ tests/run-tests: the last matching regex is used:
    -                 # Generate expected output files for qemu run.
    -                 # This list should match the test_dirs tuple in tinytest-codegen.py.
    -                 test_dirs += ('float', 'inlineasm', 'qemu-arm',)
    + ## tests/run-tests.py ##
    +@@ tests/run-tests.py: the last matching regex is used:
    +                     "inlineasm",
    +                     "qemu-arm",
    +                 )
     +            elif args.target == 'linux-kernel':
     +                test_dirs += ('linux-kernel', )
              else:
 82:  1af5d41ea =  82:  d41641cd1 linux-kernel: Enable some more configs to make tests pass.
 83:  74118fd41 <   -:  --------- tests/run-tests: Skip extmod/ticks_diff and extmod/time_ms_us automatically.
 84:  df569c59d <   -:  --------- tests/run-tests: Mark some tests as skipped for linux-kernel.
  -:  --------- >  83:  acc79be8c tests/run-tests: Mark some tests as skipped for linux-kernel.
 85:  e91af3d77 =  84:  d3c1a821e linux-kernel: Update license years.
 86:  0ac6ec794 <   -:  --------- tests/run-tests: Skip more tests for linux-kernel.
 87:  3c183b3ba <   -:  --------- tests/run-tests: Skip thread mutation tests for linux-kernel.
  -:  --------- >  85:  c48aab9bb tests/run-tests: Skip more tests for linux-kernel.
  -:  --------- >  86:  844db1da9 tests/run-tests: Skip thread mutation tests for linux-kernel.
 88:  316bb6885 =  87:  57d27a719 linux-kernel: Add minimal "utime" module.
 89:  c7a059e7b =  88:  5fcaf6aaa linux-kernel: kernel_ffi: Separate threading code to a wrapper function.
 90:  a95ad1d3e =  89:  0e67f4405 linux-kernel: kernel_ffi: Move definition of stack object to function context.
 91:  aa833c980 =  90:  765cfd80a linux-kernel: kernel_ffi: Fix typos
 92:  00084b394 =  91:  c0911ff9e linux-kernel: kernel_ffi: Special message for stack overflow in Python code
 93:  0f53a02fd =  92:  c6f3fb342 linux-kernel: Increase stack size limit (decrease unused margin)
 94:  47d596781 =  93:  0e7095eb1 linux-kernel: Use new lookup_struct()
 95:  4ae8bc129 =  94:  bced2c320 linux-kernel: Makefile: Pin struct_layout version
 96:  f3ef84291 =  95:  6b14ffdbf linux-kernel: kernel_ffi: Automatically convert StructPtrs to ints
 97:  7f2a08834 =  96:  a7c3c8c00 linux-kernel: structs: Update to new struct_layout
  -:  --------- >  97:  6dd76f50e linux-kernel: Define UINT8_MAX.
  -:  --------- >  98:  e815b9d48 linux-kernel: Undefine kernel macro "fallthrough"
  -:  --------- >  99:  da258853f linux-kernel: Implement mp_hal_time_ns().
  -:  --------- > 100:  94b77b4fa linux-kernel: Fix prototype of mp_thread_set_state().
  -:  --------- > 101:  b729312fc linux-kernel: Use gc_helper_collect_regs_and_stack()
  -:  --------- > 102:  60086e17f linux-kernel: Implement AArch64 support.
  -:  --------- > 103:  2f3a25549 linux-kernel: Update struct_layout.
  -:  --------- > 104:  0a2774d5c linux-kernel: Define MPZ_DIG_SIZE to 32.
  -:  --------- > 105:  a8830e61f linux-kernel: modkernel_ffi: Add TODO
  -:  --------- > 106:  eddca73d1 linux-kernel: modkernel_ffi: Initialize gc_lock_depth.
  -:  --------- > 107:  0324be3f7 linux-kernel: Add KBUILD_MODNAME.
  -:  --------- > 108:  7fd49d51b linux-kernel: modkernel_ffi: Initialize locals.
  -:  --------- > 109:  ec2426cf6 linux-kernel: modkernel_ffi: Always-inline some functions to reduce stack usage.
  -:  --------- > 110:  7a3a010c3 linux-kernel: Avoid kernel_setsockopt() in versions where it was removed.
  -:  --------- > 111:  17da30e33 linux-kernel: modkernel_ffi: Use __vmalloc_node_range() to allocate PAGE_KERNEL_EXEC pages in new kernels.

Additionally, I have added some commits from the past few months of my work on making this build on Aarch64. Builds and runs but I haven't tested it very thoroughly.

tannewt added a commit to tannewt/circuitpython that referenced this pull request Oct 28, 2021
@projectgus
Copy link
Contributor

This is an automated heads-up that we've just merged a Pull Request
that removes the STATIC macro from MicroPython's C API.

See #13763

A search suggests this PR might apply the STATIC macro to some C code. If it
does, then next time you rebase the PR (or merge from master) then you should
please replace all the STATIC keywords with static.

Although this is an automated message, feel free to @-reply to me directly if
you have any questions about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ports Relates to multiple ports, or a new/proposed port
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants