AoU: ETAS_RTACAR_SM_GEN_031

The ETAS_RTACAR_SM_GEN_031 AoU requires that reserved AUTOSAR prefixes are not used in the definition of symbols in user application source code.

Rationale for the validation

The validation is based on the following steps:

  1. Collection of the binary object files to be analyzed

  2. Identification of symbols defined in the binary object files that have a reserved AUTOSAR prefix

  3. Reporting of the identified symbols

.. @startuml

start
    :acquire the gen
    command arguments;
        note left
            The command specifies the bin root folder to be analyzed
        end note

    :use the BuildObjectCollector service to
    list all the binary files to be analyzed;

    note left
        The service is responsible for collecting
        the binary files (*.o) to be analyzed.
    end note

    if (are binaries collected successfully?) then (yes)

        repeat :binaryFile

            if (is the binaryFile name starting with a reserved API Prefix?) then (yes)
                #white/PaleGreen:mark the binaryFile as validated
                report it on the list of the skipped files due to the prefix;
            else (no)
                if (is a ELF well formed file?) then (yes)
                    :collect from the ELF file the symbols
                    that start with a reserved API Prefix;

                    repeat :symbol
                        if (is the symbol a reference?) then (yes)
                            :skip the symbol;
                        else (no)

                            #white/red:add the instance to the list of the
                            violations;
                        endif
                    repeat while (more symbols?) is (yes)

                    if (is binary file free from violations?) then (yes)
                        #white/PaleGreen:mark the binaryFile as validated
                        report it on the list of the successfully inspected files;
                    endif
                else (no)
                    #white/SandyBrown:mark binaryFile as open
                    report it on the list of the files that need user review;
                endif
            endif
        repeat while (more binaries?) is (yes)

    else (no)
        #white/SandyBrown:generate a open result for the rule;
    endif

end

.. @enduml

Important

Supported binary format and file extension

The ETAS_RTACAR_SM_GEN_031 AoU validation supports only the ELF binary format. If the input files are not in ELF format, manual review of the source code is required. The only supported file extension is ‘.o’.

Note

Static symbols

The ETAS_RTACAR_SM_GEN_031 AoU validation does not check static symbols. Static symbols are not visible outside the compilation unit, so they should not be reported in the ELF symbol table.

Note

Skipped files

The .o files skipped from the analysis are those whose names start with a reserved AUTOSAR namespace prefix (case insensitive) or with a rba_<yyy> prefix. Precisely, given a prefix, files whose names is prefix.o, prefix_*.o or rba_<yyy>_*.o will be skipped. These files are considered valid and are not further inspected for violations.

Note

Skipped symbols

Symbols starting with the prefix Rte_ will be skipped.

The list of reserved AUTOSAR prefixes is defined in the AUTOSAR standard. The list of prefixes used in the validation is:

Module short name

Module abbreviation (API service prefix)

ADC Driver

Adc

AUTOSAR Run-Time Interface

Arti

BSW Mode Manager

BswM

BSW Scheduler Module

SchM

Bulk NvData Manager

BndM

Bus Mirroring

Mirror

CAN Driver

Can

CAN Interface

CanIf

CAN Network Management

CanNm

CAN State Manager

CanSM

CAN Transceiver Driver

CanTrcv

CAN Transport Layer

CanTp

CAN XL Driver

CanXL

CAN XL Transceiver Driver

CanXLTrcv

CellularV2X Driver

CV2x

Charging Manager

ChrgM

Chinese Vehicle-2-X Management

CnV2xM

Chinese Vehicle-2-X Message

CnV2xMsg

Chinese Vehicle-2-X Network

CnV2xNet

Chinese Vehicle-2-X Security

CnV2xSec

COM

Com

COM Based Transformer

ComXf

COM Manager

ComM

Complex Drivers

no prefix (AUTOSAR interface)

Core Test

CorTst

Crypto Driver

Crypto

Crypto Interface

CryIf

Crypto Service Manager

Csm

Data Distribution Service

Dds

Default Error Tracer

Det

Diagnostic Communication Manager

Dcm

Diagnostic Event Manager

Dem

Diagnostic Log and Trace

Dlt

Diagnostic over IP

DoIP

DIO Driver

Dio

E2E Transformer

E2EXf

ECU State Manager

EcuM

EEPROM Abstraction

Ea

EEPROM Driver

Eep

Ethernet Driver

Eth

Ethernet Interface

EthIf

Ethernet State Manager

EthSM

Ethernet Switch Driver

EthSwt

Ethernet Transceiver Driver

EthTrcv

Firewall

Fw

Flash Driver

Fls

Flash EEPROM Emulation

Fee

Flash Test

FlsTst

FlexRay AUTOSAR Transport Layer

FrArTp

FlexRay Driver

Fr

FlexRay Interface

FrIf

FlexRay ISO Transport Layer

FrTp

FlexRay Network Management

FrNm

FlexRay State Manager

FrSM

FlexRay Transceiver Driver

FrTrcv

Function Inhibition Manager

FiM

GPT Driver

Gpt

HW Test Manager

HTMSS

ICU Driver

Icu

IEEE1722 Transport Layer

IEEE1722Tp

Intrusion Detection System

IdsM

IPDU Multiplexer

IpduM

Key Manager

KeyM

Large Data COM

LdCom

LIN Driver

Lin

LIN Interface

LinIf

LIN State Manager

LinSM

LIN Transceiver Driver

LinTrcv

LSDU Router

LSduR

MACsec Key Agreement

Mka

MCU Driver

Mcu

Memory Abstraction Interface

MemIf

Memory Access

MemAcc

Memory Driver

Mem

Network Management Interface

Nm

NVRAM Manager

NvM

OCU Driver

Ocu

OS

Os (not used as API prefix)

PDU Router

PduR

Port Driver

Port

PWM Driver

Pwm

RAM Test

RamTst

RTE

Rte

SAE J1939 Diagnostic Communication Manager

J1939Dcm

SAE J1939 Network Management

J1939Nm

SAE J1939 Request Manager

J1939Rm

SAE J1939 Transport Layer

J1939Tp

Secure Onboard Communication

SecOC

Service Discovery

Sd

Socket Adaptor

SoAd

Software Cluster Connection

SwCluC

SOME/IP Transformer

SomeIpXf

SOME/IP Transport Protocol

SomeIpTp

SPI Handler Driver

Spi

Synchronized Time-Base Manager

StbM

TCP/IP Stack

TcpIp

Time Service

Tm

Time Sync Over CAN

CanTSyn

Time Sync Over Ethernet

EthTSyn

Time Sync Over FlexRay

FrTSyn

TTCAN Driver

Ttcan

TTCAN Interface

TtcanIf

UDP Network Management

UdpNm

V2X Data Manager

V2xDM

Vehicle-2-X Basic Transport

V2xBtp

Vehicle-2-X Facilities

V2xFac

Vehicle-2-X GeoNetworking

V2xGn

Vehicle-2-X Management

V2xM

Watchdog Driver

Wdg

Watchdog Interface

WdgIf

Watchdog Manager

WdgM

Wireless Ethernet Driver

WEth

Wireless Ethernet Transceiver Driver

WEthTrcv

XCP

Xcp

BFx Library

Bfx

BSWMulticore Library

Bmc

CRC Library

Crc

E2E Library

E2E

EFx Library

Efx

IFl Library

Ifl

IFx Library

Ifx

MFl Library

Mfl

MFx Library

Mfx

Communication Stack Types

Comtype

Memory Mapping

MemMap

Platform Types

Platform

Standard Types

Std

Rule Id

ETAS_RTACAR_SM_GEN_031

Title

Prefixes of the reserved AUTOSAR namespaces must not be used for software module symbols.

Description

This rule verifies that functions, function like macros, variables, types and constants defined into software module or component do not use AUTOSAR reserved prefixes.

Message Description

Id

id_000

Message

The rule cannot be evaluated due to an internal exception during the analysis execution. Please refer to the log file for more detailed information.

Kind

Open

Level

None

Description

An internal exception occurred during the execution. This can happen if there are insufficient resources available on the host machine. For more details, please consult the RTA-SQF log file.

How To Fix

Restart the command to exclude any internal exceptions. Alternatively, please contact ETAS GmbH support for assistance. When reporting the error, include a sample configuration and command line that reproduces the issue.

Id

id_001

Message

The binary file format is unsupported.

Kind

Review

Level

None

Description

The binary file is not in a well-formed ELF format.

How To Fix

The inspection of non-ELF files is not currently supported by the tool. Please manually review the artifact.

Id

id_002

Message

The object file was inspect and fullfil the AoU.

Kind

Pass

Level

None

Description

The object file has been inspected and it does not violate the AoU.

How To Fix

Everything is in order. No action is required.

Id

id_003

Message

The object file is skipped, because it is assumed to be part of RTA-CAR. Based on the file name which starts with a known AUTOSAR RTE, OS, BSW module name.

Kind

Pass

Level

None

Description

The binary file is skipped because it is assumed to be part of Autosar Basic Software Modules or libraries.

How To Fix

Everything is in order. No action is required.

Id

id_004

Message

Usage of reserved namespace: ‘{0}’. Please rename.

Kind

Fail

Level

Error

Description

The analysis of the binary file found a symbol whose the name starts with a Autosar reserved prefix.

How To Fix

Please review the code and rename the symbol.