Searched hist:"76712 f69" (Results 1 – 2 of 2) sorted by relevance
/openbmc/libpldm/abi/x86_64/ |
H A D | gcc.dump | 76712f69 Wed May 22 00:49:00 CDT 2024 Andrew Jeffery <andrew@codeconstruct.com.au> msgbuf: Always inline all functions
The intent of the msgbuf APIs is that they are glorified wrappers around singular load/store sequences. Given this, mark all of them as `__attribute__((always_inline))`.
Note that this apparently impacts the library ABI of the following functions:
- `decode_get_state_sensor_readings_resp` - `decode_platform_event_message_req` - `decode_pldm_pdr_repository_change_record_data` - `decode_pldm_pdr_repository_chg_event_data` - `decode_sensor_op_data` - `decode_set_event_receiver_resp` - `decode_state_sensor_data`
On x86_64 the argument register selection is rearranged, for example:
```diff 'Reg' => { - '2' => 'rbx' + '0' => 'rdi', + '1' => 'rsi', + '2' => 'rdx' }, 'Return' => '100', 'ShortName' => 'decode_set_event_receiver_resp' ```
I'm yet to understand how we ended up with argument 2 being passed in `rbx`, as the psABI[1][2] v1.0 does not define `rbx` as an argument-passing register (see Figure 3.4 on page 26). Possibly because it's callee-saved it can be exploited this way. The previously recorded registers of other functions appear to have the same concern. By contrast, `rdi`, `rsi` and `rdx` are defined as the 1st, 2nd and 3rd argument-passing registers respectively, which with respect to the function at hand seems reasonable.
[1]: https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build [2]: https://gitlab.com/x86-psABIs/x86-64-ABI
Change-Id: I38c2d36d254bbd54012848b2b5c5ab52c0f04003 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
|
/openbmc/libpldm/src/ |
H A D | msgbuf.h | 76712f69 Wed May 22 00:49:00 CDT 2024 Andrew Jeffery <andrew@codeconstruct.com.au> msgbuf: Always inline all functions
The intent of the msgbuf APIs is that they are glorified wrappers around singular load/store sequences. Given this, mark all of them as `__attribute__((always_inline))`.
Note that this apparently impacts the library ABI of the following functions:
- `decode_get_state_sensor_readings_resp` - `decode_platform_event_message_req` - `decode_pldm_pdr_repository_change_record_data` - `decode_pldm_pdr_repository_chg_event_data` - `decode_sensor_op_data` - `decode_set_event_receiver_resp` - `decode_state_sensor_data`
On x86_64 the argument register selection is rearranged, for example:
```diff 'Reg' => { - '2' => 'rbx' + '0' => 'rdi', + '1' => 'rsi', + '2' => 'rdx' }, 'Return' => '100', 'ShortName' => 'decode_set_event_receiver_resp' ```
I'm yet to understand how we ended up with argument 2 being passed in `rbx`, as the psABI[1][2] v1.0 does not define `rbx` as an argument-passing register (see Figure 3.4 on page 26). Possibly because it's callee-saved it can be exploited this way. The previously recorded registers of other functions appear to have the same concern. By contrast, `rdi`, `rsi` and `rdx` are defined as the 1st, 2nd and 3rd argument-passing registers respectively, which with respect to the function at hand seems reasonable.
[1]: https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build [2]: https://gitlab.com/x86-psABIs/x86-64-ABI
Change-Id: I38c2d36d254bbd54012848b2b5c5ab52c0f04003 Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
|