-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #2467, message integrity API #2468
Conversation
* ---------------------------------------------------- | ||
*/ | ||
CFE_Status_t CFE_MSG_UpdateHeader(CFE_MSG_Message_t *MsgPtr, CFE_MSG_SequenceCount_t SeqCnt) | ||
CFE_Status_t CFE_MSG_ValidateChecksum(const CFE_MSG_Message_t *MsgPtr, bool *IsValid) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
@@ -401,12 +401,12 @@ | |||
* Generated stub function for CFE_SB_TransmitMsg() | |||
* ---------------------------------------------------- | |||
*/ | |||
CFE_Status_t CFE_SB_TransmitMsg(const CFE_MSG_Message_t *MsgPtr, bool UpdateHeader) | |||
CFE_Status_t CFE_SB_TransmitMsg(const CFE_MSG_Message_t *MsgPtr, bool IsOrigination) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
@@ -384,12 +384,12 @@ | |||
* Generated stub function for CFE_SB_TransmitBuffer() | |||
* ---------------------------------------------------- | |||
*/ | |||
CFE_Status_t CFE_SB_TransmitBuffer(CFE_SB_Buffer_t *BufPtr, bool UpdateHeader) | |||
CFE_Status_t CFE_SB_TransmitBuffer(CFE_SB_Buffer_t *BufPtr, bool IsOrigination) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
* Generated stub function for CFE_MSG_OriginationAction() | ||
* ---------------------------------------------------- | ||
*/ | ||
CFE_Status_t CFE_MSG_OriginationAction(CFE_MSG_Message_t *MsgPtr, size_t BufferSize, bool *IsAcceptable) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
* See description in header file for argument/return detail | ||
* | ||
*-----------------------------------------------------------------*/ | ||
CFE_Status_t CFE_MSG_OriginationAction(CFE_MSG_Message_t *MsgPtr, size_t BufferSize, bool *IsAcceptable) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
/* | ||
* Test MSG integrity origination action(s) | ||
*/ | ||
void Test_MSG_OriginationAction(void) |
Check notice
Code scanning / CodeQL
Long function without assertion Note test
/* | ||
* Test MSG integrity verification action(s) | ||
*/ | ||
void Test_MSG_VerificationAction(void) |
Check notice
Code scanning / CodeQL
Long function without assertion Note test
@@ -401,12 +401,12 @@ | |||
* Generated stub function for CFE_SB_TransmitMsg() | |||
* ---------------------------------------------------- | |||
*/ | |||
CFE_Status_t CFE_SB_TransmitMsg(const CFE_MSG_Message_t *MsgPtr, bool UpdateHeader) | |||
CFE_Status_t CFE_SB_TransmitMsg(const CFE_MSG_Message_t *MsgPtr, bool IsOrigination) |
Check notice
Code scanning / CodeQL
Function too long Note
464d965
to
a3b7477
Compare
Adds two new APIs to the MSG module related to integrity: CFE_MSG_OriginationAction CFE_MSG_VerificationAction These should perform all calculations/updates on origination and all verifcation/checks at termination of the message path, respectively. The specific set of actions depends on how the user has implemented their particular MSG module. By default, the traditional CFE encapsulation sets a checksum on commands and a timestamp on TLM, and no verification at the receiver.
a3b7477
to
4a4ada4
Compare
@@ -1287,7 +1288,7 @@ | |||
* See description in header file for argument/return detail | |||
* | |||
*-----------------------------------------------------------------*/ | |||
CFE_Status_t CFE_SB_TransmitMsg(const CFE_MSG_Message_t *MsgPtr, bool UpdateHeader) | |||
CFE_Status_t CFE_SB_TransmitMsg(const CFE_MSG_Message_t *MsgPtr, bool IsOrigination) |
Check notice
Code scanning / CodeQL
Function too long Note
@@ -1287,7 +1288,7 @@ | |||
* See description in header file for argument/return detail | |||
* | |||
*-----------------------------------------------------------------*/ | |||
CFE_Status_t CFE_SB_TransmitMsg(const CFE_MSG_Message_t *MsgPtr, bool UpdateHeader) | |||
CFE_Status_t CFE_SB_TransmitMsg(const CFE_MSG_Message_t *MsgPtr, bool IsOrigination) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
@@ -2118,7 +2123,7 @@ | |||
* See description in header file for argument/return detail | |||
* | |||
*-----------------------------------------------------------------*/ | |||
CFE_Status_t CFE_SB_TransmitBuffer(CFE_SB_Buffer_t *BufPtr, bool UpdateHeader) | |||
CFE_Status_t CFE_SB_TransmitBuffer(CFE_SB_Buffer_t *BufPtr, bool IsOrigination) |
Check notice
Code scanning / CodeQL
Long function without assertion Note
Fix #2467, message integrity API
*Combines:* to_lab v2.5.0-rc4+dev71 ci_lab v2.5.0-rc4+dev77 cFE v7.0.0-rc4+dev427 PSP v1.6.0-rc4+dev102 osal v6.0.0-rc4+dev243 **Includes:** *to_lab* - nasa/to_lab#173 *ci_lab* - nasa/ci_lab#157 - nasa/ci_lab#159 - nasa/ci_lab#161 *cFE* - nasa/cFE#2411 - nasa/cFE#2409 - nasa/cFE#2373 - nasa/cFE#2466 - nasa/cFE#2468 - nasa/cFE#2470 *PSP* - nasa/PSP#421 *osal* - nasa/osal#1413 Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com> Co-authored by: Isaac Rowe <irowebbn@users.noreply.github.com> Co-authored by: Jacob Hageman <skliper@users.noreply.github.com> Co-authored by: Frank Kühndel <frank-kue@users.noreply.github.com>
*Combines:* to_lab v2.5.0-rc4+dev71 ci_lab v2.5.0-rc4+dev77 cFE v7.0.0-rc4+dev424 PSP v1.6.0-rc4+dev102 osal v6.0.0-rc4+dev243 **Includes:** *to_lab* - nasa/to_lab#173 *ci_lab* - nasa/ci_lab#157 - nasa/ci_lab#159 - nasa/ci_lab#161 *cFE* - nasa/cFE#2409 - nasa/cFE#2373 - nasa/cFE#2466 - nasa/cFE#2468 - nasa/cFE#2470 *PSP* - nasa/PSP#421 *osal* - nasa/osal#1413 Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com> Co-authored by: Isaac Rowe <irowebbn@users.noreply.github.com> Co-authored by: Jacob Hageman <skliper@users.noreply.github.com> Co-authored by: Frank Kühndel <frank-kue@users.noreply.github.com>
*Combines:* to_lab v2.5.0-rc4+dev71 ci_lab v2.5.0-rc4+dev77 cFE v7.0.0-rc4+dev424 PSP v1.6.0-rc4+dev102 osal v6.0.0-rc4+dev243 **Includes:** *to_lab* - nasa/to_lab#173 *ci_lab* - nasa/ci_lab#157 - nasa/ci_lab#159 - nasa/ci_lab#161 *cFE* - nasa/cFE#2409 - nasa/cFE#2373 - nasa/cFE#2466 - nasa/cFE#2468 - nasa/cFE#2470 *PSP* - nasa/PSP#421 *osal* - nasa/osal#1413 Co-authored by: Joseph Hickey <jphickey@users.noreply.github.com> Co-authored by: Isaac Rowe <irowebbn@users.noreply.github.com> Co-authored by: Jacob Hageman <skliper@users.noreply.github.com> Co-authored by: Frank Kühndel <frank-kue@users.noreply.github.com>
Checklist (Please check before submitting)
Describe the contribution
Adds two new APIs to the MSG module related to integrity:
CFE_MSG_OriginationAction
CFE_MSG_VerificationAction
These should perform all calculations/updates on origination and all verifcation/checks at termination of the message path, respectively.
The specific set of actions depends on how the user has implemented their particular MSG module. By default, the traditional CFE encapsulation sets a checksum on commands and a timestamp on TLM, and no verification at the receiver.
Fixes #2467
Testing performed
Execute SB bulk message transfer performance testing.
Expected behavior changes
Consistent MSG origination and verification actions.
System(s) tested on
Debian
Additional context
Note that if apps are not changed, this means that the TLM timestamp may be set twice - once by the app itself, and once by MSG when OriginationAction() runs. This creates a very minor performance impact, about 0.7% slower message rates in the bulk test. This could be regained by fixing the apps eventually.
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.