Skip to content

Mseo test - #10

Merged
MahmoodSeoud merged 359 commits into
masterfrom
mseo-test
Jun 4, 2026
Merged

Mseo test#10
MahmoodSeoud merged 359 commits into
masterfrom
mseo-test

Conversation

@MahmoodSeoud

Copy link
Copy Markdown

pull the latest spaceinventor commits into here for furhter testing and fit our needs

jeanbaptistelab and others added 30 commits November 7, 2024 12:53
Seems to work work when playing around with it.
But there are still some edge cases when specifying invalid files.
This keeps it more consistent with previous init scripts
…ommand.

User may now refer to $(__FILE_DIR__) in .csh files, which ensures that files are found relative to eachother,
rather than from the working directory of CSH.
The implimentation also supports nested calls to "run <file>.csh,
which will unroll/restore like a stack.
…cript-path-env-var

PLT-291 Set environment varibles to chosen init file.
…ltin CSH commands as partool now does the sorting itself for slash commands
* PLT-288 Change param default prio to NORM

* Param signature updated

---------

Co-authored-by: Jean-Baptiste Lab <jean.baptiste@space-inventor.com>
…or#28)

* PLT-294 Added slash command to check used version of CSH

"require version csh" is useful in .csh scripts (init or not),
where it can tell CSH to: exit, error or warn when a version constraint fails.

* PLT-294 Added wildcard support to "require version csh"

So it's now possible to require version ==2.5.*

* PLT-294 Rename error-level to error-action and fatal to quit

* PLT-294 Added unit tests to require version

They are failing of course. So I guess I have to fix that.

* PLT-294 Made parse_version() a lot more flexible and fixed operator for compare_version()

Also expanded the unit tests quite a bit.

* PLT-294 Forgot to push meson.build update

* PLT-294 Some more tests and fixes for compare_version()

* PLT-294 Forgot to commit header file

* PLT-294 Forgot to compile new file dedicated to the "require version csh" slash command.

* PLT-294 Allow semver suffix, so we can parse CSH version itself.

We also no longer use a mutable copy of the version string,
so we allow much larger versions.
jeanbaptistelab and others added 29 commits December 17, 2025 21:00
This fixes "-Wstrict-prototypes" & "-Wmissing-prototypes" warnings
…uired, it is implemented elsewhere (in libcblk/crypto)
* OBC-92: In hk param sniffer handle extended UTC timestamp

* Updated timestamp used for checking if UTC time
For example:
list add reset 285 u08
get reset
… does not include it, since this will potentially skip/drop the information from the stdbuf2 server.
… loaded (spaceinventor#61)

* Add helper function to find an APM entry in the list of registered APMs

* Update py_apm_load_cmd so that it updates the count of Python APMs it loaded

This allows streamlining output from "apm load"

(cherry picked from commit 872b858)
…-csh

# Conflicts:
#	.gitmodules
#	README.md
#	doc/MAN/Installation/init_config.rst
#	doc/MAN/Installation/install.rst
#	doc/MAN/Installation/launch_sw.rst
#	doc/MAN/Introduction/description.rst
#	doc/MAN/Operating_Instructions/builtin_commands.csv
#	doc/MAN/Operating_Instructions/command_examples.rst
#	doc/MAN/Operating_Instructions/environment_variables.rst
#	doc/MAN/Operating_Instructions/example.rst
#	doc/MAN/Operating_Instructions/shell_interface.rst
#	doc/index_man.rst
#	lib/apm_csh
#	lib/csp
#	lib/param
#	lib/pycsh_core
#	lib/slash
#	meson.build
#	src/csh_defaults.c
#	src/csh_internals.h
#	src/csp_init_cmd.c
#	src/environment.c
#	src/hk_param_sniffer.c
#	src/known_hosts.c
#	src/loki.c
#	src/main.c
#	src/nav.c
#	src/param_list_slash.c
#	src/param_slash.c
#	src/param_sniffer.c
#	src/python/python_loader.c
#	src/python/python_loader.h
#	src/slash_apm.c
#	src/slash_apm.h
#	src/slash_hooks.c
#	src/slash_run_environment.c
#	src/slash_utils.c
#	src/spaceboot_slash.c
#	src/stdbuf_client.c
#	src/victoria_metrics.c
#	src/vmem_client_slash.c
#	src/vmem_client_slash_ftp.c
…13 packets

hk_param_sniffer() accepts any packet whose CSP source port is 13. The DIPP
ring_size/observation_meta RPC replies also use sport 13 and are short RDP
frames. The payload-length math

    size_t data_len = packet->length - 5 - ((flags & CSP_FRDP) ? 5 : 0);

is unsigned, so a packet shorter than the 5/10-byte overhead underflows
data_len to ~SIZE_MAX. param_queue_init + the mpack reader are then pointed at
buffer..buffer+SIZE_MAX and walk off the packet -> segfault. This is the crash
seen under `prometheus start` when running DIPP commands.

Guard the subtraction: a packet too short to carry a param payload is skipped.

Adds tests/hk_sniffer_host.c (fork-isolated) which feeds the real
hk_param_sniffer() short sport-13 packets and asserts they are skipped; fails
without the guard, passes with it. Wired as hk_sniffer_tests in
tests/meson.build. README gains a Testing section + a note that meson build
dirs are not relocatable.
@MahmoodSeoud
MahmoodSeoud merged commit a7a27df into master Jun 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants