commit | c19d644792cf1a0a5d177069305181bfdbb2429a | [log] [tgz] |
---|---|---|
author | Marco Vanotti <mvanotti@google.com> | Fri Jun 16 13:57:53 2023 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jun 16 13:57:53 2023 +0000 |
tree | 3bc72ab8346f22112af69bf2479e567c4c1c0d0d | |
parent | c46c27b31e6a6b0f74e5b9b520a08081a7c7af7a [diff] |
[starnix] Refactor execve arg reading. This CL adds a method to memory manager to read a C string into a vector. This is intended to be used for reading strings that can be very large. The other alternative, `read_c_string`, required the entire buffer to be preallocated all at once, and copied all that memory each time. The `execve` `argv` and `envp` parameters can take up to 32 pages each, which was not a good fit for `read_c_string`. There is still some room for improvement to avoid extra copies and accept uninitialized data, but out of scope for this CL. Change-Id: If347557e2dcba93969dcccbffef0e5c4d659205a Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/871261 Reviewed-by: Adam Barth <abarth@google.com> Commit-Queue: Marco Vanotti <mvanotti@google.com>
Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.