From patchwork Fri Sep 8 12:42:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai.Sathujoda@toshiba-tsip.com X-Patchwork-Id: 13377438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C39BBEE7FEB for ; Fri, 8 Sep 2023 12:42:46 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.135]) by mx.groups.io with SMTP id smtpd.web10.37803.1694176963300200050 for ; Fri, 08 Sep 2023 05:42:44 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.135, mailfrom: sai.sathujoda@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1801) id 388CgeeG2977150; Fri, 8 Sep 2023 21:42:41 +0900 X-Iguazu-Qid: 2yAaEO0URXvSYDiD0S X-Iguazu-QSIG: v=2; s=0; t=1694176959; q=2yAaEO0URXvSYDiD0S; m=h93LUNx7ZZeC1/FOk9kxwL+dkXFQ9IkmPkgpdSfZ/rQ= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1802) id 388Cgdh93215802 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 8 Sep 2023 21:42:39 +0900 From: Sai.Sathujoda@toshiba-tsip.com To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: Sai Sathujoda , dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core 1/3][v2] Kconfig: Opt additional IEC 62443-4-2 features when security option is selected Date: Fri, 8 Sep 2023 18:12:35 +0530 X-TSB-HOP2: ON Message-Id: <20230908124237.508469-2-Sai.Sathujoda@toshiba-tsip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230908124237.508469-1-Sai.Sathujoda@toshiba-tsip.com> References: <20230908124237.508469-1-Sai.Sathujoda@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 08 Sep 2023 12:42:38.0095 (UTC) FILETIME=[F2FBB1F0:01D9E251] List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 08 Sep 2023 12:42:46 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/13009 From: Sai Sathujoda Data encryption, Secureboot and Swupdate options will be automatically selected when security extensions is selected. Signed-off-by: Sai Sathujoda --- Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Kconfig b/Kconfig index ec49631..dca137d 100644 --- a/Kconfig +++ b/Kconfig @@ -170,6 +170,9 @@ config KAS_INCLUDE_IMAGE_FORMAT config IMAGE_SECURITY bool "Security extensions" + select IMAGE_DATA_ENCRYPTION + help + This enables security, encryption, secureboot and swupdate for IEC 62443-4-2. config KAS_INCLUDE_SECURITY string From patchwork Fri Sep 8 12:42:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai.Sathujoda@toshiba-tsip.com X-Patchwork-Id: 13377439 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA723EE7FEB for ; Fri, 8 Sep 2023 12:42:56 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.131]) by mx.groups.io with SMTP id smtpd.web11.38006.1694176966429744861 for ; Fri, 08 Sep 2023 05:42:47 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.131, mailfrom: sai.sathujoda@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1120) id 388Cggca2121131; Fri, 8 Sep 2023 21:42:43 +0900 X-Iguazu-Qid: 2rWgyA9ool9xfV7xTt X-Iguazu-QSIG: v=2; s=0; t=1694176961; q=2rWgyA9ool9xfV7xTt; m=nrN1Sl7jy1HERNtKIGZkperA6augSJ7OrEofxn4gbmk= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1121) id 388Cgemt227502 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 8 Sep 2023 21:42:41 +0900 From: Sai.Sathujoda@toshiba-tsip.com To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: Sai Sathujoda , dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core 2/3][v2] deploy-cip-core.sh: Deploy only the .wic image if it is present Date: Fri, 8 Sep 2023 18:12:36 +0530 X-TSB-HOP2: ON Message-Id: <20230908124237.508469-3-Sai.Sathujoda@toshiba-tsip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230908124237.508469-1-Sai.Sathujoda@toshiba-tsip.com> References: <20230908124237.508469-1-Sai.Sathujoda@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 08 Sep 2023 12:42:38.0110 (UTC) FILETIME=[F2FDFBE0:01D9E251] List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 08 Sep 2023 12:42:56 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/13010 From: Sai Sathujoda Deploy seperate artifacts like tar.gz, kernel and initrd image only if .wic image is not present. Signed-off-by: Sai Sathujoda --- scripts/deploy-cip-core.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/deploy-cip-core.sh b/scripts/deploy-cip-core.sh index eaa8974..5855acb 100755 --- a/scripts/deploy-cip-core.sh +++ b/scripts/deploy-cip-core.sh @@ -34,22 +34,22 @@ if [ -f "${BASE_PATH}.wic" ]; then echo "Uploading artifacts..." aws s3 cp --no-progress --acl public-read "${BASE_PATH}.wic.xz" "${S3_TARGET}" -fi - -if [ -f "${BASE_PATH}.tar.gz" ]; then - echo "Uploading artifacts..." - aws s3 cp --no-progress --acl public-read "${BASE_PATH}.tar.gz" "${S3_TARGET}" -fi +else + if [ -f "${BASE_PATH}.tar.gz" ]; then + echo "Uploading artifacts..." + aws s3 cp --no-progress --acl public-read "${BASE_PATH}.tar.gz" "${S3_TARGET}" + fi -KERNEL_IMAGE="$BASE_PATH-vmlinu[xz]" -# iwg20m workaround -if [ -f "build/tmp/deploy/images/$TARGET/zImage" ]; then - KERNEL_IMAGE=build/tmp/deploy/images/$TARGET/zImage -fi -# shellcheck disable=SC2086 -aws s3 cp --no-progress --acl public-read $KERNEL_IMAGE "${S3_TARGET}" -aws s3 cp --no-progress --acl public-read "${BASE_PATH}-initrd.img" "${S3_TARGET}" + KERNEL_IMAGE="$BASE_PATH-vmlinu[xz]" + # iwg20m workaround + if [ -f "build/tmp/deploy/images/$TARGET/zImage" ]; then + KERNEL_IMAGE=build/tmp/deploy/images/$TARGET/zImage + fi + # shellcheck disable=SC2086 + aws s3 cp --no-progress --acl public-read $KERNEL_IMAGE "${S3_TARGET}" + aws s3 cp --no-progress --acl public-read "${BASE_PATH}-initrd.img" "${S3_TARGET}" -if [ "$DTB" != "none" ]; then - aws s3 cp --no-progress --acl public-read build/tmp/deploy/images/*/"$DTB" "${S3_TARGET}" + if [ "$DTB" != "none" ]; then + aws s3 cp --no-progress --acl public-read build/tmp/deploy/images/*/"$DTB" "${S3_TARGET}" + fi fi From patchwork Fri Sep 8 12:42:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sai.Sathujoda@toshiba-tsip.com X-Patchwork-Id: 13377437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE856EE7FED for ; Fri, 8 Sep 2023 12:42:46 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.135]) by mx.groups.io with SMTP id smtpd.web10.37804.1694176963669132065 for ; Fri, 08 Sep 2023 05:42:44 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.135, mailfrom: sai.sathujoda@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1801) id 388CgfaG2977164; Fri, 8 Sep 2023 21:42:42 +0900 X-Iguazu-Qid: 2yAasULiHY2XxK5kcS X-Iguazu-QSIG: v=2; s=0; t=1694176961; q=2yAasULiHY2XxK5kcS; m=PY/ZIdJ2egFfcoaVbHqxLfvzPBhWBC+CuXoN09Eme/I= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1803) id 388Cge0L3160857 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 8 Sep 2023 21:42:40 +0900 From: Sai.Sathujoda@toshiba-tsip.com To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: Sai Sathujoda , dinesh.kumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core 3/3][v2] security.yml: Add additional features to security image Date: Fri, 8 Sep 2023 18:12:37 +0530 X-TSB-HOP2: ON Message-Id: <20230908124237.508469-4-Sai.Sathujoda@toshiba-tsip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230908124237.508469-1-Sai.Sathujoda@toshiba-tsip.com> References: <20230908124237.508469-1-Sai.Sathujoda@toshiba-tsip.com> MIME-Version: 1.0 X-OriginalArrivalTime: 08 Sep 2023 12:42:38.0251 (UTC) FILETIME=[F3137FB0:01D9E251] List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 08 Sep 2023 12:42:46 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/13008 From: Sai Sathujoda From IEC certification perspective, a security image is needed which has the below features along with security customizations. 1. Data encryption (CR 4.1) 2. Secure boot (EDR 3.14) 3. Swupdate (NDR 3.10) Signed-off-by: Sai Sathujoda --- kas/opt/security.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kas/opt/security.yml b/kas/opt/security.yml index 1f3745b..67bf4ff 100644 --- a/kas/opt/security.yml +++ b/kas/opt/security.yml @@ -10,6 +10,9 @@ # header: version: 12 + includes: + - kas/opt/encrypt-partitions.yml + - kas/opt/ebg-secure-boot-snakeoil.yml target: cip-core-image-security