-
Notifications
You must be signed in to change notification settings - Fork 208
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
Modify code that reads or writes memory addresses in external messages to use wapper #49
Comments
Imported from trac issue 18. Created by jphickey on 2015-01-06T13:04:43, last modified: 2019-03-05T14:57:55 |
Trac comment by jphickey on 2015-01-15 17:19:40: Pushed branch "trac-18-mem_address_wrapper" as a first step toward the goal of safe memory addresses. This change simply replaces the direct get/set of memory addresses in a message with a macro to get/set the value. The initial implementation of the macro is a straight copy so it does not change functionality at all. The macro provides a hook so that a more complete fix can be done when the rest of the prerequisites are in place. All existing code should be changed to use the macro so it can take advantage of the fix when it becomes available in a future update. |
Trac comment by glimes on 2015-02-11 11:54:52: See [changeset:fdc5514] |
Trac comment by jphickey on 2015-04-06 11:37:01: This is ready for review/merge |
Trac comment by sstrege on 2015-04-06 14:27:34: Concur with changes/merge |
Trac comment by jwilmot on 2015-04-07 08:50:51: Concur. |
Trac comment by acudmore on 2015-04-07 09:14:49: Concur but I'm not sure we will want to migrate away from having the absolute addresses in some of the telemetry messages. ( I can see how we might want to move away from using an address as a memory pool handle ) Our flight ops/maintenance teams are used to micro-managing the memory map for the CPU. In the past they have patched code, data and even manipulated stacks. Having said that.. I think the macro could have some benefit in the future because we never know what the address or memory maps will look like on future systems. I'm pretty sure the addresses that ES reports are meaningless in Linux for example, since the addresses are virtual and not absolute. |
Trac comment by glimes on 2015-04-07 12:58:01: Tested changeset [changeset:fdc55145] as part of the ic-2015-03-10 merge. Side note: reporting out virtual addresses is correct in the Linux case as long as the commands used to manipulate the memory content also use virtual addresses. |
Trac comment by glimes on 2015-04-13 15:31:04: Part of integration candidate 2015-03-10, |
Trac comment by glimes on 2016-02-25 10:17:32: these will be fixed in CFE 6.5 |
Trac comment by jhageman on 2019-03-05 14:57:55: Milestone renamed |
In the current version, some external interface (command/telemetry) messages contain direct CPU memory addresses.
This can be very bad for several reasons:
Ultimately the use of direct memory addresses in messages should be avoided.
As a first step to this, this ticket will modify those locations that a memory address is read or written from an external message to use a wrapper function.
This ticket won't change any functionality in itself, but it will provide a path going forward such that the wrapper function can be modified to convert the address to/from a safe, verifiable, architecture independent value rather than using the address directly.
The text was updated successfully, but these errors were encountered: