History log of /openbmc/libmctp/ (Results 1 – 25 of 335)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
9626db9a27-Oct-2025 Matt Johnston <matt@codeconstruct.com.au>

i2c: Fix packet buffer storage size

The I2C binding packet buffer size was inadvertently reduced in
a3830d259a53 which could result in overflow.

Fixes: a3830d259a53 ("Fix test-i2c leak, and mctp_pk

i2c: Fix packet buffer storage size

The I2C binding packet buffer size was inadvertently reduced in
a3830d259a53 which could result in overflow.

Fixes: a3830d259a53 ("Fix test-i2c leak, and mctp_pktbuf storage alignment")
Change-Id: I99d11de014c0182378ebcdb631753010ccb5af44
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

739d45b101-Oct-2025 Javier Sanchez Molina <javier.sanchez-molina@sipearl.com>

mctp-demux: eid option requires an argument

The -e option in mctp-demux-daemon parameters is meant to accept a
fixed local EID, but it was declared as not taking a parameter.
Passing an EID caused o

mctp-demux: eid option requires an argument

The -e option in mctp-demux-daemon parameters is meant to accept a
fixed local EID, but it was declared as not taking a parameter.
Passing an EID caused optarg to be NULL,leading to a crash when
parsing arguments.

Change-Id: I63fd5f503a93f61b1f83ffe7becd3fe0c5699128
Signed-off-by: Roger G. Coscojuela <roger.gili-coscojuela@sipearl.com>

show more ...

b04447c218-Sep-2025 Matt Johnston <matt@codeconstruct.com.au>

Specify customization with meson options

Meson options can now be used to pass custom parameters. The default
values are still used if unset for other build systems.

Previously -D arguments were no

Specify customization with meson options

Meson options can now be used to pass custom parameters. The default
values are still used if unset for other build systems.

Previously -D arguments were not being used by Meson when determining
sizeof for libmctp-sizes.h, since arguments are ignored for compiler
flags. Instead the options are now passed explicitly.

Change-Id: I04cfff40fab03b8ccbca33acdf2b5abb30723e5b
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

c243823809-Jul-2025 Patrick Williams <patrick@stwcx.xyz>

meson: use non-deprecated systemd packageconfig

Systemd's packageconfig file has both `systemdsystemunitdir` and
`systemd_system_unit_dir` defined. The non-underscore one appears
to be a deprecated

meson: use non-deprecated systemd packageconfig

Systemd's packageconfig file has both `systemdsystemunitdir` and
`systemd_system_unit_dir` defined. The non-underscore one appears
to be a deprecated alias[1]. Move to the non-deprecated /
underscore-separated variant.

[1]: https://github.com/systemd/systemd/commit/4908de44b0a0409f84a7cdc5641b114d6ce8ba03

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

show more ...

056a6ae912-Jun-2025 Patrick Williams <patrick@stwcx.xyz>

markdownlint: minor fixes

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

349a7c6a15-May-2025 Ken Wahid <kw@napatech.com>

Fix bug in the mctp-demux-daemon client management logic

When there were multiple clients running at the same time,
and disconnecting at random times, it could happen that the
MCTP clients socket ar

Fix bug in the mctp-demux-daemon client management logic

When there were multiple clients running at the same time,
and disconnecting at random times, it could happen that the
MCTP clients socket array got misaligned, causing still
active clients to get their socket removed prematurely.

While the MCTP demux daemon already had logic in place to
ensure the socket array got realigned whenever a client was
either added or removed, there was one corner case it didn't
cover.

This bug was discovered when running with serial binding.
However likely an issue for all binding types.

Change-Id: Idc1a7f10806b256a0b5a3d02ef5f36c04b714b93
Signed-off-by: Ken Wahid <kw@napatech.com>

show more ...

b5f74a7c29-Oct-2020 Oliver O'Halloran <oohall@gmail.com>

astlpc: Drop err.h include

err.h was needed some time ago when astlpc.c just called warnx() and
errx() directly. It uses a logging wrapper now so this isn't needed
and since it's a BSD header it may

astlpc: Drop err.h include

err.h was needed some time ago when astlpc.c just called warnx() and
errx() directly. It uses a logging wrapper now so this isn't needed
and since it's a BSD header it may not be available.

Change-Id: I4b43eb141e3086a84922fdd7dbebf0ffa5af5b31
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>

show more ...

fa3bc56a24-Feb-2025 Jeremy Kerr <jk@codeconstruct.com.au>

README: add 'Target usage' section

I get a few queries from people who are attempting to use libmctp as
their MCTP communication interface, and trying to get it to talk to an
AF_MCTP socket.

libmct

README: add 'Target usage' section

I get a few queries from people who are attempting to use libmctp as
their MCTP communication interface, and trying to get it to talk to an
AF_MCTP socket.

libmctp is unnecessary in this scenario, so add a usage note.

Change-Id: I4d46905f19054af3c0e4e3fde2815befc7f4752a
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>

show more ...

2da0a8f403-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

meson: reformat with meson formatter

Apply the `meson format` results.

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

5cc2093201-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

meson: reformat with meson formatter

Apply the `meson format` results.

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

060c71ed08-Jan-2025 Matt Johnston <matt@codeconstruct.com.au>

fuzz: Add fuzzing for core and i2c

Add fuzzing infrastructure and a fuzz target handling mctp-i2c packets.
After running for a few days with honggfuzz this achieves close to
complete line coverage o

fuzz: Add fuzzing for core and i2c

Add fuzzing infrastructure and a fuzz target handling mctp-i2c packets.
After running for a few days with honggfuzz this achieves close to
complete line coverage of core.c

Change-Id: I6cd7361e6f600831a319f06fb7c7c0d2186fd7de
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

d8f0c68b08-Jan-2025 Matt Johnston <matt@codeconstruct.com.au>

i2c: Add string argument to static_assert()

Some compilers require a string argument.

Change-Id: I241ab3954aaac430804524a5557eab4047a213b4
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

0a4957c907-Jan-2025 Matt Johnston <matt@codeconstruct.com.au>

container_of: Avoid ubsan null pointer

Instead use offsetof() to determine the container pointer, otherwise
ubsan fails with "member access within null pointer".

Change-Id: I5472a1a7052fc0d6f02f2df

container_of: Avoid ubsan null pointer

Instead use offsetof() to determine the container pointer, otherwise
ubsan fails with "member access within null pointer".

Change-Id: I5472a1a7052fc0d6f02f2df5283eddb3be653d06
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

a3830d2513-Jan-2025 Matt Johnston <matt@codeconstruct.com.au>

Fix test-i2c leak, and mctp_pktbuf storage alignment

- Ensure mctp_pktbuf storage is correctly aligned
- Deallocate mctp and i2c instances to avoid failure with asan.

These previously succeeded in

Fix test-i2c leak, and mctp_pktbuf storage alignment

- Ensure mctp_pktbuf storage is correctly aligned
- Deallocate mctp and i2c instances to avoid failure with asan.

These previously succeeded in CI so are both fixed in this commit.

Fixes: e5b941d9d764 ("i2c: Add binding for MCTP over I2C transport")
Fixes: 4a09e1dc4883 ("core: Reuse buffers for tx, allow message pools")
Change-Id: I747bfff6faf3a5b0a982ae266bcef02ecbc4ee8a
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

18b9a37b22-Nov-2024 Matt Johnston <matt@codeconstruct.com.au>

core: Drop packets with broadcast source EID

That has no valid use case, so should be disallowed to avoid unforeseen
problems.

Change-Id: I514e5d910fb3b92606aae86aee282a97e6166a15
Signed-off-by: Ma

core: Drop packets with broadcast source EID

That has no valid use case, so should be disallowed to avoid unforeseen
problems.

Change-Id: I514e5d910fb3b92606aae86aee282a97e6166a15
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

4058b2cb07-Nov-2024 Matt Johnston <matt@codeconstruct.com.au>

control: Add basic MCTP Control Protocol handler

This will respond to the 4 mandatory MCTP Control Protocol commands.
Applications can register supported types using mctp_control_add_type().

Change

control: Add basic MCTP Control Protocol handler

This will respond to the 4 mandatory MCTP Control Protocol commands.
Applications can register supported types using mctp_control_add_type().

Change-Id: Ia904bcbe118626adf9254ffa71dd8e17fbdfc9b7
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

f7749dc306-Nov-2024 Matt Johnston <matt@codeconstruct.com.au>

core: Remove completion_code field from mctp_ctrl_msg_hdr

That field is only applicable for response messages, not request
messages.

Change-Id: I74d0cc206c78d162e5cd210a45d398334e1cdf52
Signed-off-

core: Remove completion_code field from mctp_ctrl_msg_hdr

That field is only applicable for response messages, not request
messages.

Change-Id: I74d0cc206c78d162e5cd210a45d398334e1cdf52
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

e5b941d917-Sep-2024 Matt Johnston <matt@codeconstruct.com.au>

i2c: Add binding for MCTP over I2C transport

Implements DSP0237. This has a fixed neighbor table (currently 4
entries), with neighbors learned on reception, or set with
mctp_i2c_set_neighbour().

Ch

i2c: Add binding for MCTP over I2C transport

Implements DSP0237. This has a fixed neighbor table (currently 4
entries), with neighbors learned on reception, or set with
mctp_i2c_set_neighbour().

Change-Id: I9b1e2c3673149cd0b9fee0d8113f3cac0e336bc7
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

44e64dfa05-Nov-2024 Matt Johnston <matt@codeconstruct.com.au>

core: Add allocated tag expiry, mctp_set_now_op()

Allocated tags expire after 6 seconds, requiring a time source.
The default will use clock_gettime(), though implementations can set
MCTP_DEFAULT_CL

core: Add allocated tag expiry, mctp_set_now_op()

Allocated tags expire after 6 seconds, requiring a time source.
The default will use clock_gettime(), though implementations can set
MCTP_DEFAULT_CLOCK_GETTIME=0 and use mctp_set_now_op() for custom
behavior.

Change-Id: Iaacf500bcd458c987f4b79c698bac9ae5ad5a73e
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

f9b99f1f17-Sep-2024 Matt Johnston <matt@codeconstruct.com.au>

build: Generate libmctp-sizes.h

This can be used to allocate static storage for a struct mctp used with
heapless mctp_setup().

core.c internal data structures are moved to core-internal.h so that
s

build: Generate libmctp-sizes.h

This can be used to allocate static storage for a struct mctp used with
heapless mctp_setup().

core.c internal data structures are moved to core-internal.h so that
sizeof(struct mctp) can be compiled without linking other objects.

Change-Id: I72dcd46ef11d6f4b4f5ba1c9ae6c95e40dda40f8
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

1250727f30-Sep-2024 Matt Johnston <matt@codeconstruct.com.au>

build/core: Add 'nolog' build option to omit logging entirely

This can be used to avoid dereferencing the global `log_type`
which may be inaccessible on platforms with memory protection.

Change-Id:

build/core: Add 'nolog' build option to omit logging entirely

This can be used to avoid dereferencing the global `log_type`
which may be inaccessible on platforms with memory protection.

Change-Id: Ib48468018e3afaf05978018199a9a2022cb49fdf
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

bbfcc6e117-Sep-2024 Matt Johnston <matt@codeconstruct.com.au>

build/core: Add MCTP_CUSTOM_ALLOC option

This avoids storing the allocator function pointers in mutable memory,
which is a problem when building on platforms with memory protection.
Instead the appl

build/core: Add MCTP_CUSTOM_ALLOC option

This avoids storing the allocator function pointers in mutable memory,
which is a problem when building on platforms with memory protection.
Instead the application/platform defines custom functions that are
linked with libmctp.

Change-Id: Icaf88968b50c88bbd2305d325f9530658465e21f
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

61c9599216-Sep-2024 Matt Johnston <matt@codeconstruct.com.au>

core: Add mctp_message_tx_request() function

This allocates a tag for messages sent with TO bit set.

Change-Id: Ia8403a06aa449e0218a30edf5ad69781c70d7c52
Signed-off-by: Matt Johnston <matt@codecons

core: Add mctp_message_tx_request() function

This allocates a tag for messages sent with TO bit set.

Change-Id: Ia8403a06aa449e0218a30edf5ad69781c70d7c52
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

0a96544a16-Sep-2024 Matt Johnston <matt@codeconstruct.com.au>

tests: Allow tx packets in mctp_binding_test

This requires setting src==dest for routing.

Change-Id: I098b67071b111e328cbcc8bb20656638d7baca39
Signed-off-by: Matt Johnston <matt@codeconstruct.com.a

tests: Allow tx packets in mctp_binding_test

This requires setting src==dest for routing.

Change-Id: I098b67071b111e328cbcc8bb20656638d7baca39
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

722d0db213-Sep-2024 Matt Johnston <matt@codeconstruct.com.au>

core: Allow running without heap allocations

Replace buses with a static array, and add mctp_setup/mctp_cleanup
to use an existing struct.

__mctp_alloc() and __mctp_free() no longer need to be func

core: Allow running without heap allocations

Replace buses with a static array, and add mctp_setup/mctp_cleanup
to use an existing struct.

__mctp_alloc() and __mctp_free() no longer need to be functional, though
are used as defaults if m_msg_alloc/m_msg_free are not provided.

Change-Id: Ib5826836efb59e416410b25f138cbaf5931278f3
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>

show more ...

12345678910>>...14