Skip to content
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

Inconsistency between behavior and documentation: fault_livespan = 0 #48

Open
RobertBuhren opened this issue May 9, 2022 · 2 comments

Comments

@RobertBuhren
Copy link

According to https://github.com/Fraunhofer-AISEC/archie/blob/master/fault-readme.md#fault_lifespan , "fault_lifespan" + "trigger_address" must be larger than, or equal to "0" if "trigger_address" is negative, otherwise ARCHIE will issue a warning and remove the fault:

If the trigger_address is set to a negative number, trigger_address + fault_lifespan must be larger or equal to 0. Otherwise ARCHIE will remove the fault configuration with a warning. In addition, the fault_lifespan is automatically reduced if the trigger address is calculated to be before the start point.

However, with this fault.json I don't see any warning although "trigger_address" is negative and "trigger_address" + "fault_lifespan" < 0:

{
  "max_instruction_count" : 1000,
	"start" : {
		"address" : 0xffff0000,
		"counter" : 0
	},
	"end" : {
    "address" : 0xffff06b0,
		"counter" : 0
	},
	"faults" :[	
			[
				{
					"fault_address"		: [0xffff47C8, 0xffff4888, 4],
					"fault_type"		: "instruction",
					"fault_model"		: "overwrite",
					"fault_lifespan"	: [0],
          // fault_mask = bytes to insert: ARMv7 NOP
					"fault_mask"		: [0xE320F000], 
					"trigger_address"	: [-1],
					"trigger_counter"	: [0],
					"num_bytes"		: [4]
				}
			]
		],
}

Also, it seems both "fault_lifespan" and "fault_livespan" are used throughout the code/documentation and examples. This is rather confusing.

Regards,

Robert

@tibersam
Copy link
Collaborator

Hello Robert,
fault_livespan and fault_lifespan are the same thing. It is a typo which we patch out. Where did you encounter this typo? I thought i had corrected all occurrences.
In regards of the behaviour of trigger_lifespan:
If fault_lifespan is set to 0, it is a permanent fault, therefore fault_lifespan calculations are not performed. From the documentation this is stated ambiguous. Would changing the documentation to "If the trigger_address is set to a negative number and fault_lifespan non zero," make it clearer for you?

@RobertBuhren
Copy link
Author

The "fault.json" and the "analysis/fault-aes.json" file are using "fault_livespan".

As for the documentation: Could you post the entire section you intend to change?

Thanks!

Regards,

Robert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants