366651d9 | 22-Aug-2024 |
Marshall Zhan <marshall.zhan.wiwynn@gmail.com> |
log-handler: Set the end of the file as the file size
The file descriptor is lost after system AC cycle. The log file will grow indefinitely if the log recorded does not exceed the maximum log size
log-handler: Set the end of the file as the file size
The file descriptor is lost after system AC cycle. The log file will grow indefinitely if the log recorded does not exceed the maximum log size after each AC cycle.
Change-Id: If23d68b08817d54731dd6eff8a42e9eb476b6437 Fixes: 46d9ef298f2e ("Do not truncate log files after reboot") Signed-off-by: Marshall Zhan <marshall.zhan.wiwynn@gmail.com>
show more ...
|
6498f9fa | 13-Sep-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
log-handler: fix console logs
server->n_consoles was not incremented until after console_init.
But the log handler already made use of that value to decide which filename to use for logging, in the
log-handler: fix console logs
server->n_consoles was not incremented until after console_init.
But the log handler already made use of that value to decide which filename to use for logging, in the case of config with no sections.
This fix avoids use of server->n_consoles in favor of looking at the number of sections in the config.
Change-Id: Ic19802808197557cd1f632c63a0123604a619039 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
b965c220 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I2f8eeee40b0b2583092d351979dd77fd277a97ba Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
85055f99 | 05-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
docs/mux-support.md: Fix MD014 warnings
The following warnings are generated by using markdownlint analysis: ``` MD014/commands-show-output Dollar signs used before commands without showing output [
docs/mux-support.md: Fix MD014 warnings
The following warnings are generated by using markdownlint analysis: ``` MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ obmc-console-server --config..."] ``` Refer to markdown-lint [1] to fix MD014 [1]: https://github.com/updownpress/markdown-lint/blob/master/rules/014-commands-show-output.md
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I9daa0403355e45bf39410ccf92693bdccf1830c4
show more ...
|
ce3688c9 | 05-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
docs/mux-support.md: Fix MD040 warnings
The following warnings are generated by using markdownlint analysis: ``` MD040/fenced-code-language Fenced code blocks should have a language specified [Conte
docs/mux-support.md: Fix MD040 warnings
The following warnings are generated by using markdownlint analysis: ``` MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] ``` Refer to markdown-lint [1] to fix MD040 [1]: https://github.com/updownpress/markdown-lint/blob/master/rules/040-fenced-code-language.md
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I67875268370268715241c0ddb2c58da4a9a3f54f
show more ...
|
97e7e51e | 02-Aug-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
test: multiple consoles
Change-Id: Ib7e63eb9b5a9c000ad7548115e46517b8b0bfc92 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.
test: multiple consoles
Change-Id: Ib7e63eb9b5a9c000ad7548115e46517b8b0bfc92 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
c7602e0a | 02-Aug-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
test: console socket write
Change-Id: I77ba9168f5b363f7e776d54eb143a716544b5bb5 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.c
test: console socket write
Change-Id: I77ba9168f5b363f7e776d54eb143a716544b5bb5 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
e11cca1e | 02-Aug-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
test: console socket read
Change-Id: Ic7c2035640db4e403afe9db01a33ccb532d195d6 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.co
test: console socket read
Change-Id: Ic7c2035640db4e403afe9db01a33ccb532d195d6 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
a30b7659 | 02-Aug-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
test: console-client can write
Change-Id: Iffc38fb78ebbf79f8a0bdd7cd0b8cbc5916768cc Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstru
test: console-client can write
Change-Id: Iffc38fb78ebbf79f8a0bdd7cd0b8cbc5916768cc Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
12bf483b | 02-Aug-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
test: console-client can read
Change-Id: I08c7523af548968c1545189c0007f44144589aec Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruc
test: console-client can read
Change-Id: I08c7523af548968c1545189c0007f44144589aec Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
29a8f989 | 30-Jul-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
test: console logs to file
Test for the logging feature of obmc-console-server.
Change-Id: I9836727a944a0351962133baa2fd2ff5eb60e67f Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> Sign
test: console logs to file
Test for the logging feature of obmc-console-server.
Change-Id: I9836727a944a0351962133baa2fd2ff5eb60e67f Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au> Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
3ff250d7 | 08-Aug-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
changelog: List UART mux support and iniparser dependency
UART mux support is a notable feature. Make sure users can be aware of it.
Change-Id: I26ae052f5b64d4eaaea1f814bfddf9632739f2c7 Signed-off-
changelog: List UART mux support and iniparser dependency
UART mux support is a notable feature. Make sure users can be aware of it.
Change-Id: I26ae052f5b64d4eaaea1f814bfddf9632739f2c7 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
13d3aa75 | 05-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
docs/mux-support.md: README.md: Fix MD041 warnings
The following warnings are generated by using markdownlint analysis: ``` docs/mux-support.md:1 MD041/first-line-heading/first-line-h1 First line in
docs/mux-support.md: README.md: Fix MD041 warnings
The following warnings are generated by using markdownlint analysis: ``` docs/mux-support.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## Mux Support"] ``` Refer to markdown-lint [1] to fix MD041 [1]: https://github.com/updownpress/markdown-lint/blob/master/rules/041-first-line-h1.md
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Id2dc44fd63b40492a67965c4a51aceeb67b9307d
show more ...
|
289e6479 | 05-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
README.md: Fix MD041 warnings
The following warnings are generated by using markdownlint analysis: ``` README.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level h
README.md: Fix MD041 warnings
The following warnings are generated by using markdownlint analysis: ``` README.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## To Build"] ``` Refer to markdown-lint [1] to fix MD041 [1]: https://github.com/updownpress/markdown-lint/blob/master/rules/041-first-line-h1.md
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I561d1b2950153f2b26bddbf9d1888a02016d4722
show more ...
|
86f6f619 | 05-Aug-2024 |
George Liu <liuxiwei@ieisystem.com> |
README.md: Fix MD040 warnings
The following warnings are generated by using markdownlint analysis: ``` README.md:5 MD040/fenced-code-language Fenced code blocks should have a language specified [Con
README.md: Fix MD040 warnings
The following warnings are generated by using markdownlint analysis: ``` README.md:5 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] README.md:12 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] README.md:20 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] README.md:29 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] README.md:40 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] README.md:78 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] ``` Refer to markdown-lint [1] to fix MD040 [1]: https://github.com/updownpress/markdown-lint/blob/master/rules/040-fenced-code-language.md
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: Ibb0ba5ad26c7b362258dad92acad48ea10cae9a2
show more ...
|
8fee4242 | 06-Jun-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
UART Mux Support: Documentation
This commit adds markdown documentation of how uart-mux support is implemented in obmc-console. The supported hardware configuration and example config files are show
UART Mux Support: Documentation
This commit adds markdown documentation of how uart-mux support is implemented in obmc-console. The supported hardware configuration and example config files are shown.
Change-Id: I19cd3de0f9cb6b98742fc264c4e2963c06ff9db1 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
a6b29104 | 10-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
console-server: Add UART Mux Support
This commit adds support for uart-muxes which can be controlled via gpios.
Change-Id: I91a4de1962554adf4302a2a59d2b371f492dc21d Signed-off-by: Alexander Hansen
console-server: Add UART Mux Support
This commit adds support for uart-muxes which can be controlled via gpios.
Change-Id: I91a4de1962554adf4302a2a59d2b371f492dc21d Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
312ecdc2 | 10-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
console-server: Enable multiple consoles
obmc-console can now support multiple consoles that can be configured.
The first console is the active console, if not configured otherwise.
This serves as
console-server: Enable multiple consoles
obmc-console can now support multiple consoles that can be configured.
The first console is the active console, if not configured otherwise.
This serves as preparation for uart mux support.
Change-Id: I6f350b8efe70c3b424bdadaa3fe1bbf89d310e5d Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
2325d5d5 | 07-Jun-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
console-server: refactor pollfd management
Instead of the previous memory management of pollfd array, with a fixed and flexible part and hardcoded indices, provide two functions to request and relea
console-server: refactor pollfd management
Instead of the previous memory management of pollfd array, with a fixed and flexible part and hardcoded indices, provide two functions to request and release pollfds.
- console_server_request_pollfd - console_server_release_pollfd
The pollfds are still in the same array but can be requested and released by these functions now. struct console_server and struct console now contain indices into that array of pollfds.
The benefit of this contribution is that the new interface provides a clean allocator-like abstraction for requesting and releasing pollfds, which will scale to multiple consoles and can be refactored or unit-tested more easily in the future.
The previous implementation was tightly coupled to the single-console use-case and the pollfds stored at hardcoded indices.
Change-Id: I93226699618130b175bffbeb4f71c20c91a7083a Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com> Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
e3a083eb | 08-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
config: support sections in config_ api
This commit wraps some functions from iniparser to support sections in our config files.
The new functions become part of the config_* api and will help to s
config: support sections in config_ api
This commit wraps some functions from iniparser to support sections in our config files.
The new functions become part of the config_* api and will help to support the uart mux feature.
Change-Id: I7fa9aa1d60b67458943d5c53a1aeb90406c5fcf3 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
c2b0d8c7 | 07-Jun-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
console-server: introduce `struct console_server`
Lift `struct console_server` from `struct console`
struct console_server will enable obmc-console to support multiple consoles in a single obmc-con
console-server: introduce `struct console_server`
Lift `struct console_server` from `struct console`
struct console_server will enable obmc-console to support multiple consoles in a single obmc-console-server in the future.
Currently the 'struct console_server' only supports one active console.
Change-Id: Icb22fb46f217b174f3bccc0a03485549d82d1d6b Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
e3f1aa1e | 10-Jul-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
util: Consolidate ARRAY_SIZE() definitions
ARRAY_SIZE() was defined several times around the code-base. Provide a single definition in util.h and include it where necessary.
Change-Id: Idc4cf030969
util: Consolidate ARRAY_SIZE() definitions
ARRAY_SIZE() was defined several times around the code-base. Provide a single definition in util.h and include it where necessary.
Change-Id: Idc4cf030969ffc7f0928c6897a23962a70adcf05 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
ace05dcc | 09-Jul-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
meson: Exploit `tests` option to disable the test suite
Somehow we had the option, but no use of it to define the build.
Change-Id: I42431d962288bbc642413d77eafe754e48e599a6 Signed-off-by: Andrew J
meson: Exploit `tests` option to disable the test suite
Somehow we had the option, but no use of it to define the build.
Change-Id: I42431d962288bbc642413d77eafe754e48e599a6 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
adedc333 | 09-Jul-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
console-server: Enable handler iteration with -fsanitize=address
Currently when running obmc-console-server built with -fsanitize=address we receive the following abort:
``` $ dbus-run-session ./bu
console-server: Enable handler iteration with -fsanitize=address
Currently when running obmc-console-server built with -fsanitize=address we receive the following abort:
``` $ dbus-run-session ./build/obmc-console-server -i test $(realpath pts) iniparser: cannot open etc/obmc-console.conf 3 handler types obmc-console-server: Can't open log buffer file /var/local/log/obmc-console.log: No such file or directory console 'test': handler log [inactive] ================================================================= ==724703==ERROR: AddressSanitizer: global-buffer-overflow on address 0x559163200b08 at pc 0x5591631e6d08 bp 0x7ffdb2e64350 sp 0x7ffdb2e64348 READ of size 8 at 0x559163200b08 thread T0 #0 0x5591631e6d07 in handlers_init ../console-server.c:560 #1 0x5591631e6d07 in main ../console-server.c:1025 #2 0x7f8e3f446249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #3 0x7f8e3f446304 in __libc_start_main_impl ../csu/libc-start.c:360 #4 0x5591631e7390 in _start (/home/andrew/src/openbmc.org/openbmc/obmc-console/build/obmc-console-server+0x26390)
0x559163200b08 is located 24 bytes to the left of global variable 'socket_handler' defined in '../socket-handler.c:515:34' (0x559163200b20) of size 32 0x559163200b08 is located 8 bytes to the right of global variable 'log_handler' defined in '../log-handler.c:222:34' (0x559163200ae0) of size 32 SUMMARY: AddressSanitizer: global-buffer-overflow ../console-server.c:560 in handlers_init Shadow bytes around the buggy address: 0x0ab2ac638110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ab2ac638120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ab2ac638130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ab2ac638140: 00 00 00 00 00 00 00 00 f9 f9 f9 f9 00 00 00 00 0x0ab2ac638150: 00 00 00 00 00 00 00 00 f9 f9 f9 f9 00 00 00 00 =>0x0ab2ac638160: f9[f9]f9 f9 00 00 00 00 f9 f9 f9 f9 00 00 00 00 0x0ab2ac638170: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00 0x0ab2ac638180: 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 0x0ab2ac638190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ab2ac6381a0: 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 0x0ab2ac6381b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==724703==ABORTING ```
Rework the start and stop symbol declarations to indicate we're accessing an array, which keeps the sanitizer happy.
Change-Id: Ib17506a018702e64bbc419f0056da571847e2787 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|
d659cfcd | 09-Jul-2024 |
Andrew Jeffery <andrew@codeconstruct.com.au> |
config: Allow NULL for internal dict pointer
If the default configuration file is not present, behave as if it were empty. This allows obmc-console-server to not fail out if no configuration is prov
config: Allow NULL for internal dict pointer
If the default configuration file is not present, behave as if it were empty. This allows obmc-console-server to not fail out if no configuration is provided, but still fail out if a struct config object couldn't be allocated.
Change-Id: Ic188281f5fc41d94b3175c8009c97f1efb62699a Fixes: 1e04f449b7f0 ("use iniparser dependency for config file parsing") Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
show more ...
|