History log of /openbmc/libmctp/ (Results 226 – 250 of 328)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
4663f67c10-Mar-2020 Andrew Jeffery <andrew@aj.id.au>

astlpc: Add mctp_astlpc_destroy()

Provide an abstraction to cleanup memory to avoid false-positives with
leak sanitizers.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ib73506432eed108

astlpc: Add mctp_astlpc_destroy()

Provide an abstraction to cleanup memory to avoid false-positives with
leak sanitizers.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ib73506432eed108cb992cfc12b40c479b0321463

show more ...

7c73801e10-Mar-2020 Andrew Jeffery <andrew@aj.id.au>

test_eid: Clean up after test case

Free all allocated memory to avoid false-positive leak reports.
Resolves:

==10460==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 552 byte(

test_eid: Clean up after test case

Free all allocated memory to avoid false-positive leak reports.
Resolves:

==10460==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 552 byte(s) in 1 object(s) allocated from:
#0 0x7f3e1a574ae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8)
#1 0x7f3e1a433cf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28
#2 0x7f3e1a42eedc in mctp_init /home/andrew/src/openbmc/libmctp/core.c:234
#3 0x55f705f81268 in mctp_test_stack_init tests/test-utils.c:63
#4 0x55f705f7edff in main tests/test_eid.c:51
#5 0x7f3e198df1e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)

Indirect leak of 56 byte(s) in 1 object(s) allocated from:
#0 0x7f3e1a574ae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8)
#1 0x7f3e1a433cf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28
#2 0x55f705f80c99 in mctp_binding_test_init tests/test-utils.c:27
#3 0x55f705f812e1 in mctp_test_stack_init tests/test-utils.c:66
#4 0x55f705f7edff in main tests/test_eid.c:51
#5 0x7f3e198df1e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
#0 0x7f3e1a574ae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8)
#1 0x7f3e1a433cf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28
#2 0x7f3e1a42f55f in mctp_register_bus /home/andrew/src/openbmc/libmctp/core.c:277
#3 0x55f705f8121b in mctp_binding_test_register_bus tests/test-utils.c:56
#4 0x55f705f81405 in mctp_test_stack_init tests/test-utils.c:69
#5 0x55f705f7edff in main tests/test_eid.c:51
#6 0x7f3e198df1e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I34eae31219d4a31e8388d180be746ae8b7ec5c04

show more ...

c68d96e410-Mar-2020 Andrew Jeffery <andrew@aj.id.au>

test_seq: Clean up after each test case

Free all allocated memory to avoid false-positive leak reports.
Resolves:

==11106==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 1228

test_seq: Clean up after each test case

Free all allocated memory to avoid false-positive leak reports.
Resolves:

==11106==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 12288 byte(s) in 3 object(s) allocated from:
#0 0x7f92a1347f1e in __interceptor_realloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10df1e)
#1 0x7f92a1207065 in __mctp_realloc /home/andrew/src/openbmc/libmctp/alloc.c:48
#2 0x7f92a1201979 in mctp_msg_ctx_add_pkt /home/andrew/src/openbmc/libmctp/core.c:213
#3 0x7f92a1204a09 in mctp_bus_rx /home/andrew/src/openbmc/libmctp/core.c:383
#4 0x55ff747e1655 in mctp_binding_test_rx_raw tests/test-utils.c:50
#5 0x55ff747df302 in run_one_test tests/test_seq.c:122
#6 0x55ff747df6d6 in main tests/test_seq.c:141
#7 0x7f92a06b21e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)

Indirect leak of 2208 byte(s) in 4 object(s) allocated from:
#0 0x7f92a1347ae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8)
#1 0x7f92a1206cf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28
#2 0x7f92a1201edc in mctp_init /home/andrew/src/openbmc/libmctp/core.c:234
#3 0x55ff747e1738 in mctp_test_stack_init tests/test-utils.c:63
#4 0x55ff747def62 in run_one_test tests/test_seq.c:111
#5 0x55ff747df6d6 in main tests/test_seq.c:141
#6 0x7f92a06b21e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)

Indirect leak of 224 byte(s) in 4 object(s) allocated from:
#0 0x7f92a1347ae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8)
#1 0x7f92a1206cf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28
#2 0x55ff747e1169 in mctp_binding_test_init tests/test-utils.c:27
#3 0x55ff747e17b1 in mctp_test_stack_init tests/test-utils.c:66
#4 0x55ff747def62 in run_one_test tests/test_seq.c:111
#5 0x55ff747df6d6 in main tests/test_seq.c:141
#6 0x7f92a06b21e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)

Indirect leak of 160 byte(s) in 4 object(s) allocated from:
#0 0x7f92a1347ae8 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8)
#1 0x7f92a1206cf0 in __mctp_alloc /home/andrew/src/openbmc/libmctp/alloc.c:28
#2 0x7f92a120255f in mctp_register_bus /home/andrew/src/openbmc/libmctp/core.c:277
#3 0x55ff747e16eb in mctp_binding_test_register_bus tests/test-utils.c:56
#4 0x55ff747e18d5 in mctp_test_stack_init tests/test-utils.c:69
#5 0x55ff747def62 in run_one_test tests/test_seq.c:111
#6 0x55ff747df6d6 in main tests/test_seq.c:141
#7 0x7f92a06b21e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I7fbc729740357eb89b679dd51bbf03d6735a75dc

show more ...

5c5673b510-Mar-2020 Andrew Jeffery <andrew@aj.id.au>

test-utils: Add mctp_binding_test_destroy()

Provide an abstraction to clean up memory to avoid false-positives with
leak sanitizers.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Id62f

test-utils: Add mctp_binding_test_destroy()

Provide an abstraction to clean up memory to avoid false-positives with
leak sanitizers.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Id62f0552f40cb2215be4b5fe9e87eb4048832ef0

show more ...

fa56ca5f10-Mar-2020 Andrew Jeffery <andrew@aj.id.au>

libmctp: Add mctp_destroy()

Provide an abstraction to clean up memory to avoid false-positives with
leak sanitizers.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Id0f03ec61fcaf6eb0ed2

libmctp: Add mctp_destroy()

Provide an abstraction to clean up memory to avoid false-positives with
leak sanitizers.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Id0f03ec61fcaf6eb0ed27e8f735720f1ea7e5e8e

show more ...

00ecc6c910-Mar-2020 Andrew Jeffery <andrew@aj.id.au>

core: Fix realloc() memory leak in packet reassembly

If realloc() returns NULL then the provided memory is not freed and we
then leak it by overwriting the pointer that would allow us to free it.

S

core: Fix realloc() memory leak in packet reassembly

If realloc() returns NULL then the provided memory is not freed and we
then leak it by overwriting the pointer that would allow us to free it.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Idd093e007c264ae1bd6d40110eb4bd205336c224

show more ...

225c46dc10-Mar-2020 Andrew Jeffery <andrew@aj.id.au>

test-utils: Avoid undefined behaviour on indirect call

The start method pointer value of the test binding object wasn't well
defined due to the missing memset(). Later conditionals concluded that
th

test-utils: Avoid undefined behaviour on indirect call

The start method pointer value of the test binding object wasn't well
defined due to the missing memset(). Later conditionals concluded that
the pointer was valid and tried to call through it leading to a crash of
the test binary.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I0e60d1108267f8823f653ae935003a027a13affd

show more ...

a501a58010-Mar-2020 Andrew Jeffery <andrew@aj.id.au>

test-utils: Resolve control reaching the end of a non-void function

Resolves:

tests/test-utils.c: In function ‘mctp_binding_test_tx’:
tests/test-utils.c:20:1: error: no return statement in

test-utils: Resolve control reaching the end of a non-void function

Resolves:

tests/test-utils.c: In function ‘mctp_binding_test_tx’:
tests/test-utils.c:20:1: error: no return statement in function returning non-void [-Werror=return-type]
20 | }
| ^
cc1: all warnings being treated as errors

Functions terminating in an assert() won't always have the assert()
present to terminate them.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ieb4338c994675e50b020962d22cff338e598e43a

show more ...

cdfafd9107-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

test_bridge: Resolve control reaching the end of a non-void function

mctp_binding_bridge_rx() was missing a return:

tests/test_bridge.c: In function ‘mctp_binding_bridge_rx’:
tests/test_bri

test_bridge: Resolve control reaching the end of a non-void function

mctp_binding_bridge_rx() was missing a return:

tests/test_bridge.c: In function ‘mctp_binding_bridge_rx’:
tests/test_bridge.c:60:1: error: no return statement in function returning non-void [-Werror=return-type]
60 | }
| ^
cc1: all warnings being treated as errors

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I2a52e872c4d4a0923e0fb14caf555c78dc57eabc

show more ...

5e56cd8a10-Mar-2020 Andrew Jeffery <andrew@aj.id.au>

alloc: Resolve control reaching the end of a non-void function

Resolves:

alloc.c: In function ‘__mctp_alloc’:
alloc.c:32:1: error: control reaches end of non-void function [-Werror=return-t

alloc: Resolve control reaching the end of a non-void function

Resolves:

alloc.c: In function ‘__mctp_alloc’:
alloc.c:32:1: error: control reaches end of non-void function [-Werror=return-type]
32 | }
| ^
alloc.c: In function ‘__mctp_realloc’:
alloc.c:49:1: error: control reaches end of non-void function [-Werror=return-type]
49 | }
| ^
cc1: all warnings being treated as errors

Functions terminating in an assert() won't always have the assert()
present to terminate them.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: If720f43561585ea6b2dcdae59ac70b997b79469f

show more ...

02d7097510-Mar-2020 Sumanth Bhat <sumanth.bhat@linux.intel.com>

Add Sumanth and Richard to reviewers

Signed-off-by: Sumanth Bhat <sumanth.bhat@linux.intel.com>
Change-Id: Ic567878ab5b755847ca5c090104678d1b546a48d

89a2b8e007-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

test_serial: Resolve control reaching end of non-void function

mctp-binding_serial_pipe_tx() was missing a return:

tests/test_serial.c: In function ‘mctp_binding_serial_pipe_tx’:
tests/test

test_serial: Resolve control reaching end of non-void function

mctp-binding_serial_pipe_tx() was missing a return:

tests/test_serial.c: In function ‘mctp_binding_serial_pipe_tx’:
tests/test_serial.c:34:1: error: control reaches end of non-void function [-Werror=return-type]
34 | }
| ^
cc1: all warnings being treated as errors

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ia15a13fe4e283b76bfb4a856ea188a46ac5cf12c

show more ...

13a4041f07-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

mctp-demux-daemon: Resolve uninitialised variable warning

Multiple error paths in client_process_recv() failed to set rc before returning
it from the out_close label:

utils/mctp-demux-daemon.c:

mctp-demux-daemon: Resolve uninitialised variable warning

Multiple error paths in client_process_recv() failed to set rc before returning
it from the out_close label:

utils/mctp-demux-daemon.c: In function ‘main’:
utils/mctp-demux-daemon.c:457:7: error: ‘rc’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
457 | if (rc)
| ^
utils/mctp-demux-daemon.c:307:6: note: ‘rc’ was declared here
307 | int rc;
| ^~
cc1: all warnings being treated as errors

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I4196a2b5f7b242c53921040fead102525c92a286

show more ...

2cda40fa27-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

cmake: Add new tests to test suite

Bring functionality of the cmake build system up to autotools.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I2231b51cfd52460fb525b5af6893b0474508859b

56c6ff1227-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

cmake: Register test executables with the build system

Previously the test binaries wouldn't be run by `make test`.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ic4c5b40a1c1e36c2934cd

cmake: Register test executables with the build system

Previously the test binaries wouldn't be run by `make test`.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ic4c5b40a1c1e36c2934cd0bffe084aa6954aa343

show more ...

8e436af827-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

cmake: Avoid artifacts called liblibmctp*

Drop the 'lib' prefix from the mctp library name, this is added based on
the target platform (e.g. Linux).

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

cmake: Avoid artifacts called liblibmctp*

Drop the 'lib' prefix from the mctp library name, this is added based on
the target platform (e.g. Linux).

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I7e09296bb9ba430d4dc75e55e6deac804d9a413c

show more ...

b6516a0825-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

mctp-demux.service: Set a default binding to be overridden

This way the service at least won't fail out of the box.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ia1d33aa59bea53ea1338c

mctp-demux.service: Set a default binding to be overridden

This way the service at least won't fail out of the box.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ia1d33aa59bea53ea1338c70d9d7942b54de12f37

show more ...

b633b3f524-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

test_serial: Fix assert triggered in core.c

$ ./tests/test_serial
test_serial: core.c:252: mctp_register_bus: Assertion `mctp->n_busses == 0' failed.
Aborted (core dumped)

I'm not sure

test_serial: Fix assert triggered in core.c

$ ./tests/test_serial
test_serial: core.c:252: mctp_register_bus: Assertion `mctp->n_busses == 0' failed.
Aborted (core dumped)

I'm not sure how this slipped through the cracks, and CI didn't catch it
either. However, the scenario wasn't correctly modelled, so do the proper
thing and instantiate two mctp contexts and assign a binding instance to each,
connected by the pipes.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ib5382a45cd0042c840fdb01b2038e9a531bf2384

show more ...

1e496c8b16-Jan-2020 Xiaochao Ma <maxiaochao@inspur.com>

Add MCTP service file

Previous service file for this repo are contained
in the corresponding meta layer.
Now move it into the repository that owns them.

Signed-off-by: Xiaochao Ma <maxiaochao@inspu

Add MCTP service file

Previous service file for this repo are contained
in the corresponding meta layer.
Now move it into the repository that owns them.

Signed-off-by: Xiaochao Ma <maxiaochao@inspur.com>
Change-Id: I15d85815483da19b08869225eb50866b49fe5575

show more ...

c84fd56d30-Jan-2020 Andrew Jeffery <andrew@aj.id.au>

astlpc: Fix dummy byte IRQ trigger ordering

The BT interface implementation may require pushing a dummy byte to
trigger an IRQ for a status update. Ensure we trigger the IRQ with the
dummy byte afte

astlpc: Fix dummy byte IRQ trigger ordering

The BT interface implementation may require pushing a dummy byte to
trigger an IRQ for a status update. Ensure we trigger the IRQ with the
dummy byte after we've updated the status.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I8d354bae206741829bc73baa8a0c09cb5a98ce0e

show more ...

edfe383f05-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

astlpc: Add packet transmission debugging statements

Useful to track and debug the buffer handover interactions between the
endpoints.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I82

astlpc: Add packet transmission debugging statements

Useful to track and debug the buffer handover interactions between the
endpoints.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I82354782bb88adbb5797c1173f266a271855b3d7

show more ...

298865fc05-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

core: Add packetisation debug statements

Useful to understand how the message is split with respect to the
binding configuration.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I4313b78

core: Add packetisation debug statements

Useful to understand how the message is split with respect to the
binding configuration.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I4313b783439dad7fd4252990c5fc77a306fc4b99

show more ...

25de093405-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

tests: Add test_serial

Uses pipes to connect two instances (A and B) of the serial binding and
passes a message exceeding the BTU from A to B.

Increases test converage for libmctp as a whole from ~

tests: Add test_serial

Uses pipes to connect two instances (A and B) of the serial binding and
passes a message exceeding the BTU from A to B.

Increases test converage for libmctp as a whole from ~60% (lines and
functions) to ~75% (lines and functions).

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Iaad6f265528799148c23db9365ebf9fa748e50ee

show more ...

0247c73305-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

tests: Add test_astlpc

Exercise message passing and packetisation over a dummy LPC interface
injected via the ops struct. The main() plays the role of the host.

Test suite code coverage for libmctp

tests: Add test_astlpc

Exercise message passing and packetisation over a dummy LPC interface
injected via the ops struct. The main() plays the role of the host.

Test suite code coverage for libmctp as a whole is lifted from ~34%
(lines and functions) to ~53% (lines and functions).

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ied17b7fcf9b996c08ea7bea554ef4112ef0005c0

show more ...

a045249505-Feb-2020 Andrew Jeffery <andrew@aj.id.au>

astlpc: mctp_astlpc_init_ops: constify ops struct

No need for the passed ops struct to be mutable. Lets try to enforce
const where we can.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id:

astlpc: mctp_astlpc_init_ops: constify ops struct

No need for the passed ops struct to be mutable. Lets try to enforce
const where we can.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I3d24efc6cc858e09bb6ab00f202b875bc695b29f

show more ...

12345678910>>...14