From patchwork Fri Oct 2 01:54:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Richter X-Patchwork-Id: 1375520 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C2Y2n40c4z9s1t for ; Fri, 2 Oct 2020 11:54:41 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=YwZsv3fe; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4C2Y2n2DshzDqNx for ; Fri, 2 Oct 2020 11:54:41 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=erichte@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=YwZsv3fe; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4C2Y2Z6P11zDqDJ for ; Fri, 2 Oct 2020 11:54:30 +1000 (AEST) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0921WEd4054260 for ; Thu, 1 Oct 2020 21:54:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=qFyhiajIOBYsGh/BeLbt5tkKEnr2F2Ct+Y/hGYq0diA=; b=YwZsv3feBKDl5wTa8W6BL+3GVT2yJanGzqyC3G3mqWHQesIlvgCngTxRBLbWPXup06Ma LTaJx5v6wQ6VsmqS34QID5Ll96eVfjjb0eNAvLyjCH8HOkXhu+opk8GljlW2+2Y7Am8M cUgXQa1fsxJBBMl3/zX0wtCu2qF9T7iHZjJ0S++PPdxO/uJI06ewfqurX16VleurULVM ompM9+dF1Jnmlx8V5e3I08RXlFDjpscW3Zhpfrh8oja0fYIToZSerjFWiENnAsqCbG2R ubPMcyvGghN3lEGSnR+vFDYcV5uzTQ4dC8pPafJHrg/3YCkb3PMRVp94hA8FBjUkLfoR IA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 33ws16ag4r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 01 Oct 2020 21:54:26 -0400 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0921b6I5066780 for ; Thu, 1 Oct 2020 21:54:26 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 33ws16ag4c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 21:54:26 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0921sOaB015239; Fri, 2 Oct 2020 01:54:24 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 33sw986353-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 02 Oct 2020 01:54:24 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0921sMf631719822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 2 Oct 2020 01:54:22 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E3AEFA4051; Fri, 2 Oct 2020 01:54:21 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2266BA4040; Fri, 2 Oct 2020 01:54:21 +0000 (GMT) Received: from ceres.ibmuc.com (unknown [9.211.127.206]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 2 Oct 2020 01:54:20 +0000 (GMT) From: Eric Richter To: oohall@gmail.com Date: Thu, 1 Oct 2020 20:54:19 -0500 Message-Id: <20201002015419.32135-1-erichte@linux.ibm.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-01_10:2020-10-01, 2020-10-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=1 priorityscore=1501 clxscore=1015 malwarescore=0 phishscore=0 spamscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010020002 Subject: [Skiboot] [PATCH] secvar/test: use mbedtls cflags when building the test binaries X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: skiboot@lists.ozlabs.org Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" The edk2 test file includes some mbedtls files directly, make sure that those also include the correct mbedtls config file. Without this, the default config file is used, which conflicts with the version we build as part of skiboot. As host libc includes a SIZE_MAX macro, this also changes the SIZE_MAX macro defined in mbedtls_config.h (needed for some mbedtls functions) to only be defined if it isn't already. Signed-off-by: Eric Richter --- libstb/crypto/mbedtls-config.h | 2 ++ libstb/secvar/test/Makefile.check | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libstb/crypto/mbedtls-config.h b/libstb/crypto/mbedtls-config.h index 9560993b..e0c358d2 100644 --- a/libstb/crypto/mbedtls-config.h +++ b/libstb/crypto/mbedtls-config.h @@ -86,7 +86,9 @@ /* Settings to reduce/remove warnings */ #define MBEDTLS_MPI_WINDOW_SIZE 3 // (max/default is 6) Increase for speed, may introduce warnings #define MBEDTLS_MPI_MAX_SIZE 512 // (default is 1024) increase for more bits in user-MPIs +#ifndef SIZE_MAX #define SIZE_MAX 65535 // this might need to be in libc? +#endif /* Disableable to mitigate warnings */ //#define MBEDTLS_ASN1_WRITE_C // Expects SIZE_MAX diff --git a/libstb/secvar/test/Makefile.check b/libstb/secvar/test/Makefile.check index b2cafcf6..94da7dd9 100644 --- a/libstb/secvar/test/Makefile.check +++ b/libstb/secvar/test/Makefile.check @@ -42,10 +42,10 @@ HOST_MBEDTLS_CFLAGS+= -Wno-unused-function -Wno-suggest-attribute=const $(SECVAR_TEST) : core/test/stubs.o $(SECVAR_TEST) : % : %.c $(HOST_MBEDTLS_OBJS) - $(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) -O0 -g -I include -I . -I libfdt -o $@ $< $(HOST_MBEDTLS_OBJS) core/test/stubs.o, $<) + $(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) $(HOST_MBEDTLS_CFLAGS) -O0 -g -I include -I . -I libfdt -o $@ $< $(HOST_MBEDTLS_OBJS) core/test/stubs.o, $<) $(SECVAR_TEST:%=%-gcov): %-gcov : %.c % $(HOST_MBEDTLS_OBJS) - $(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) $(HOSTGCOVCFLAGS) -I include -I . -I libfdt -lgcov -o $@ $< $(HOST_MBEDTLS_OBJS) core/test/stubs.o, $<) + $(call Q, HOSTCC ,$(HOSTCC) $(HOSTCFLAGS) $(HOSTGCOVCFLAGS) $(HOST_MBEDTLS_CFLAGS) -I include -I . -I libfdt -lgcov -o $@ $< $(HOST_MBEDTLS_OBJS) core/test/stubs.o, $<) -include $(wildcard libstb/secvar/test/*.d)