scripts: hardenconfig: Improve deprecated and experimental detection

Gets experimental and deprecated symbols directly from Kconfig instead
of rely on hardened.csv.

This way we keep the tool consistent with Zephyr's code.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2024-08-08 13:12:07 -07:00 committed by Alberto Escolar
commit e00746f9b3
2 changed files with 6 additions and 79 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# Copyright (c) 2019 Intel Corporation # Copyright (c) 2019-2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
import csv import csv
@ -53,6 +53,11 @@ def compare_with_hardened_conf(kconf, hardened_kconf_filename):
current = None current = None
options.append(Option(name=name, current=current, options.append(Option(name=name, current=current,
recommended=recommended, symbol=symbol)) recommended=recommended, symbol=symbol))
for node in kconf.node_iter():
for select in node.selects:
if kconf.syms["EXPERIMENTAL"] in select or kconf.syms["DEPRECATED"] in select:
options.append(Option(name=node.item.name, current=node.item.str_value, recommended='n', symbol=node.item))
return options return options

View file

@ -47,84 +47,6 @@ TRACING,n
X86_MMU,y X86_MMU,y
ZTEST,n ZTEST,n
# Experimental options
BT_A2DP,n,experimental
BT_AUDIO,n,experimental
BT_AVDTP,n,experimental
BT_CLASSIC,n,experimental
BT_CTLR_ADV_DATA_CHAIN,n,experimental
BT_CTLR_DTM_HCI_DF_IQ_REPORT,n,experimental
BT_CTLR_SET_HOST_FEATURE,n,experimental
BT_DF,n,experimental
BT_EAD,n,experimental
BT_EATT,n,experimental
BT_H5,n,experimental,
BT_HFP_HF,n,experimental
BT_IAS,n,experimental
BT_IAS_CLIENT,n,experimental
BT_ISO_BROADCASTER,n,experimental
BT_ISO_PERIPHERAL,n,experimental
BT_ISO_SYNC_RECEIVER,n,experimental
BT_MESH_USES_MBEDTLS_PSA,n,experimental
BT_MESH_V1d1,n,experimental
BT_OTS,n,experimental
BT_OTS_CLIENT,n,experimental
BT_PASSKEY_KEYPRESS,n,experimental
BT_PER_ADV_RSP,n,experimental
BT_PER_ADV_SYNC_RSP,n,experimental
BT_RFCOMM,n,experimental
CAN_NET,n,experimental
CRYPTO_MBEDTLS_SHIM,n,experimental
CRYPTO_TINYCRYPT_SHIM,n,experimental
DEMAND_PAGING,n,experimental
ETH_E1000_PTP_CLOCK,n,experimental
GPIO_ENABLE_DISABLE_INTERRUPT,n,experimental
GPIO_GET_CONFIG,n,experimental
GPIO_GET_DIRECTION,n,experimental
HTTP_CLIENT,n,experimental
HTTP_SERVER,n,experimental
ICE40_FPGA,n,experimental
ISOTP,n,experimental
LOG_BACKEND_BLE,n,experimental
LORA,n,experimental
LORAWAN,n,experimental
LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT_MULTIPLE,n,experimental
LWM2M_GATEWAY_OBJ_SUPPORT,n,experimental
MEMC,n,experimental
MIPI_DSI,n,experimental
MM_DRV,n,experimental
MODEM_CONTEXT,n,experimental
MQTT_SN_LIB,n,experimental
NET_BUF_VARIABLE_DATA_SIZE,n,experimental
NET_CONNECTION_MANAGER,n,experimental
NET_GPTP,n,experimental
NET_IPV4_AUTO,n,experimental
NET_L2_IEEE802154_SECURITY,n,experimental
NET_PROMISCUOUS_MODE,n,experimental
NET_SOCKETS_CAN,n,experimental
NET_SOCKETS_ENABLE_DTLS,n,experimental
NET_SOCKETS_NET_MGMT,n,experimental
NET_SOCKETS_SOCKOPT_TLS,n,experimental
NET_TC_THREAD_PREEMPTIVE,n,experimental
OPENTHREAD_MLE_LONG_ROUTES,n,experimental
SHELL_TELNET_SUPPORT_COMMAND,n,experimental
SPI_EXTENDED_MODES,n,experimental
SPI_RTIO,n,experimental
SPI_SLAVE,n,experimental
STM32_LPTIM_TIMER,n,experimental
TFTP_LIB,n,experimental
THRIFT,n,experimental
UART_EMUL,n,experimental
UDC_DRIVER,n,experimental
UHC_DRIVER,n,experimental
USBD_CDC_ACM_CLASS,n,experimental
USBD_MSC_CLASS,n,experimental
USB_DEVICE_AUDIO,n,experimental
USB_DEVICE_STACK_NEXT,n,experimental
USB_HOST_STACK,n,experimental
WEBSOCKET_CLIENT,n,experimental
# Debug options # Debug options
ASSERT,n ASSERT,n

Can't render this file because it has a wrong number of fields in line 50.