History log of /openbmc/slpd-lite/ (Results 1 – 25 of 46)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
8375b78424-May-2024 Andrew Geissler <geissonator@yahoo.com>

test-suite: manual test script

A series of tests that exercise a variety of paths in the slpd
application

Change-Id: I2087e08af009921da948e4aa95d104fdb8ba23ec
Signed-off-by: Andrew Geissler <geisso

test-suite: manual test script

A series of tests that exercise a variety of paths in the slpd
application

Change-Id: I2087e08af009921da948e4aa95d104fdb8ba23ec
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...

1a6b1c2b16-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: I28d013e312a5f3f7d5d3331e4c98feee86b514f5
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

40efe67224-Jul-2024 Andrew Geissler <geissonator@yahoo.com>

fix new gcc compile warnings about unused variables

The latest yocto has brought in a new gcc which is causing building of
this repo due to fails like this:

```
slpd-lite/sock_channel.cpp:27:23: er

fix new gcc compile warnings about unused variables

The latest yocto has brought in a new gcc which is causing building of
this repo due to fails like this:

```
slpd-lite/sock_channel.cpp:27:23: error: value computed is not used [-Werror=unused-value]
| 27 | buffer outBuffer(0);
| |
```

Fix this by just using the default vector constructor with no arguments
(resulting in a empty container to start with).

Change-Id: If06dfccd2aa234956e124c11bd268198be569e6d
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...

20bab74824-May-2024 Andrew Geissler <geissonator@yahoo.com>

SrvRqst: Add bounds checking on buffer parsing

There are multiple length fields provided by the user in this command.
Need to ensure those lengths do not exceed the input buffer size.

Tested:
- Exe

SrvRqst: Add bounds checking on buffer parsing

There are multiple length fields provided by the user in this command.
Need to ensure those lengths do not exceed the input buffer size.

Tested:
- Executed new unit tests successfully

Change-Id: Ife4b74d7541d6939bdc30a381fc5cc80cfd24057
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...

f60e710824-May-2024 Andrew Geissler <geissonator@yahoo.com>

SrvTypeRqst: Add bounds checking on buffer parsing

There are multiple length fields provided by the user in this command.
Need to ensure those lengths do not exceed the input buffer size.

Tested:
-

SrvTypeRqst: Add bounds checking on buffer parsing

There are multiple length fields provided by the user in this command.
Need to ensure those lengths do not exceed the input buffer size.

Tested:
- Executed new unit tests successfully

Change-Id: Id42c8c2f7f87cab07982edabe93f09cd9ef4208a
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...

6f01edce24-May-2024 Andrew Geissler <geissonator@yahoo.com>

Do not use input header for error responses

When parsing of the input header fails, it could be for a variety of
issues, including an overflow of the language tag length. We should not
utilize any v

Do not use input header for error responses

When parsing of the input header fails, it could be for a variety of
issues, including an overflow of the language tag length. We should not
utilize any variable aspects of the header in our response and
instead just send back a default of all 0's with the static fields set
along with error the code.

Utilize std::bitset to get the function ID properly written to
cout/cerr.

Tested:
- Verified when sending in an invalid header, it no longer can cause
unexpected error paths in parseHeader function

Change-Id: I17a8a013bcd90e083b1156f794f059fc1b830a63
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...

eebd081524-May-2024 Andrew Geissler <geissonator@yahoo.com>

Only allow a maximum packet size of 255 bytes

This code was written with an assumption that the input/output buffer
sizes would not exceed 255 bytes. The assumption can be seen throughout
the code w

Only allow a maximum packet size of 255 bytes

This code was written with an assumption that the input/output buffer
sizes would not exceed 255 bytes. The assumption can be seen throughout
the code where it is using a "uint8_t" for size calculations when doing
offsets into the data buffers.

As this application was written for OpenBMC and the service list
provided by OpenBMC is very minimal, supporting a maximum request
buffer of 255 bytes is a fine assumption. Just need to enforce it.

Without this change, very unexpected things can happen with uint8_t
overflow issues when a packet size greater then 255 bytes is passed in
or created internally.

Tested:
- Verified a request with a packet size over 255 bytes is rejected

Change-Id: Icec15fe100d6514a3309fa89e9f79d565de05553
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...

c668313e23-May-2024 Andrew Geissler <geissonator@yahoo.com>

unit-test: add language tag length validation

Ensure caller has provided enough language tag data to match with their
input length

Change-Id: Icc60601d19ee33a52413dd8f2b8462791571ebcb
Signed-off-by

unit-test: add language tag length validation

Ensure caller has provided enough language tag data to match with their
input length

Change-Id: Icc60601d19ee33a52413dd8f2b8462791571ebcb
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...

0e948dca23-May-2024 Andrew Geissler <geissonator@yahoo.com>

unit-test: add basic header validation tests

Ensure header size is correct and write tests to validate it.

The goal of this patch series is to match with the validation done
within openslp (slp_v2m

unit-test: add basic header validation tests

Ensure header size is correct and write tests to validate it.

The goal of this patch series is to match with the validation done
within openslp (slp_v2message.c, SLPv2MessageParseHeader)

Change-Id: I42aace162051a9e4795ebbaf36f193efe4738dcd
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

show more ...

26b0360124-May-2024 Andrew Geissler <geissonator@yahoo.com>

gitignore: add vscode

Change-Id: I2e13b9aece30f866c19351f4420665ad9b745f98
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>

99f391ba20-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Icef58e8de2e3ca88ee29c81073d65e90c1cf7aea
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

77350e1212-Jul-2023 Patrick Williams <patrick@stwcx.xyz>

build: upgrade to C++23

Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of
the standard has been implemented. Upgrade the build to leverage it.

Change-Id: I39907e0cac91ca4d4001d

build: upgrade to C++23

Meson 1.1.1 and GCC-13 both support C++23 and a sufficient portion of
the standard has been implemented. Upgrade the build to leverage it.

Change-Id: I39907e0cac91ca4d4001da65b1e6a27005389840
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

16424ed310-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I8c35a35b4491e5c42b9c1c4ac6c6c8ee35951aab
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

55aac8e104-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

build: remove autotools support

Change-Id: I84969d1cd703364a05c513a47f124cdf003ef6be
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

43dc41fb04-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

build: add meson support

Change-Id: Id426d32b63d5cdeb2b5fcbac9fc6d29d5d0e4a97
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

f191bd8f04-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

slp_parser: fix missing-field-initializers warnings

By attempting to pass a single field value into the Message,
the implication is that the other fields are non-initialized, due
to list-initializat

slp_parser: fix missing-field-initializers warnings

By attempting to pass a single field value into the Message,
the implication is that the other fields are non-initialized, due
to list-initialization rules. Remove the first `0` parameter, so
that the default initialization is done.

Change-Id: If85a39c8c34299ec508edd888c052f622a463770
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

3964d55204-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

main: fix 'unused-parameter' warnings

Change-Id: I4412ff1707fca77556ca8e3a1b15f912f32f8213
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

edf88cb204-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

error: fix handling of error codes

GCC correctly warning as follows:

```
inlined from ‘slp::buffer slp::handler::processError(const slp::Message&, uint8_t)’ at slp_message_handler.cpp:363:16:
/

error: fix handling of error codes

GCC correctly warning as follows:

```
inlined from ‘slp::buffer slp::handler::processError(const slp::Message&, uint8_t)’ at slp_message_handler.cpp:363:16:
/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/bits/stl_algobase.h:431:30: warning: ‘void* __builtin_memmove(void*, const void*, long unsigned int)’ reading 2 bytes from a region of size 1 [-Wstringop-overread]
431 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
| ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
slp_message_handler.cpp: In function ‘slp::buffer slp::handler::processError(const slp::Message&, uint8_t)’:
slp_message_handler.cpp:358:49: note: source object ‘err’ of size 1
```

We were taking the address of a `uint8_t` and copying two bytes of it.

The original code was not correct anyhow because it used a static
OFFSET_ERROR constant. The location of errors is not constant because
it depends on the length of the language tag. Modify the code to
correctly place the 1 byte error type into the 2nd byte of the error
field, which is calculated as immediately after the language tag.

Change-Id: I1bee6bdb1b6301403cf1dff319641587c683f799
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

b422c55a04-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

MAINTAINERS: remove file

The MAINTAINERS file is deprecated in favor of OWNERS.

Change-Id: I5bd8e8622b6e17c134c46d358f118ad79aaa6b1b
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>


2d00c78004-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

OWNERS: switch 'matches' to 'matchers'

The original OWNERS template had a mistake which used 'matches' instead
of the field supported by the Gerrit plugin 'matchers'. Update the
OWNERS file to have

OWNERS: switch 'matches' to 'matchers'

The original OWNERS template had a mistake which used 'matches' instead
of the field supported by the Gerrit plugin 'matchers'. Update the
OWNERS file to have the correct field.

Change-Id: Ic42d189b183ee8f632c48be15846ceb2a089db00
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

f93142e804-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

configure: make SERVICE_DIR static

There is really no value in making this a configuration option since
nobody modifies it anywhere. Remove the configuration to simplify.

Change-Id: Ia36d5b45a7942

configure: make SERVICE_DIR static

There is really no value in making this a configuration option since
nobody modifies it anywhere. Remove the configuration to simplify.

Change-Id: Ia36d5b45a7942c2f26f039b194f10fa5d08aa13c
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

aa902c6e04-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: update with latest

Change-Id: I9550e13176264c875ac6bb52b18c70cc7e52197a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

0757597b04-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

prettier: reformat markdown

Change-Id: Ie725617155f5c5978ca9acc697a391138c11c4fb
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

a867f3f204-Apr-2023 Patrick Williams <patrick@stwcx.xyz>

bootstrap: fix shellcheck warnings

Change-Id: I277b84c709d1a6c313f6df1b8f1351d8cb82d478
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

ef078cd023-Oct-2021 Manojkiran Eda <manojkiran.eda@gmail.com>

Add OWNERS file

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I611927506d9ccca2a581c6907b690764e680a244

12