From patchwork Tue May 7 21:38:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edward Liaw X-Patchwork-Id: 795607 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5222478C6D for ; Tue, 7 May 2024 21:45:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715118339; cv=none; b=uhOMBSHFiLJccS/aQX3JKtwR2XxgzNWZ57L08bJmnkykBj+P57N8sD4Z2CffDhrotFeaf9JPVZhlKOwu7foEY9TZr9AE3ov9qoirbc+yc0cr/Rsz31wxzKePSI1E3yqgR7+buvgxpOfGTDMqwKTn0dhvDdFgkGir2GA+PCAhwGE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715118339; c=relaxed/simple; bh=u1WhBmcckAt2rdhPGlHMEW1L6rz0lHqek1WxWKv+Lpk=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=qRHQhLmFsgId3RZjMXlZz122JC5AVZ/BuN+XlCJAoqr9yzI86kRwENgrM1JE+GC3UbME3jLQKNq7LWvh3D8En8lZiWhe8HfGU+hGv4nSI27GAC9VL+WNl/6fMkKLV5L87d1P9oOR5i4wEkte6Pvj8pZg4ADmc+0esSVxuwSYDjI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--edliaw.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=EAOb0VTr; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--edliaw.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="EAOb0VTr" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-de60321ce6cso6875801276.1 for ; Tue, 07 May 2024 14:45:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715118336; x=1715723136; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=PxqkolGdAHnL6PdsZ65UERLJRMYbiNDsN8K6maFf6SM=; b=EAOb0VTrPa0tgInHil+vnvBckQGZucDqfwvtGJfDLsKxwUt6aDMz9FzfrLNEiKUiWx A82FDY5UaQ3tDdNFRZxcjHUsG41rlv92k4eKKpZYWkYoWQsOO/xh7oRNXBkIT7COUfwN Wqiu85thMq9c2nhmYYFmQ7jwvh0zx8Vn1B+Vxb88WGBqDtCl5BDXOnxGVrZlODe0VFnh HnjqSQ3H5IkMdC+93OwNMVM52Pfid1yMsQyVoJjGrPgHTZgsDcH9TN39O1Xst2WX10ZQ c15OvAuaaV6COMyBPjRJyQ1xTAusna1000y7vafImuBeX/te9uk9Q0HIehMo19kbpOTI y5rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715118336; x=1715723136; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PxqkolGdAHnL6PdsZ65UERLJRMYbiNDsN8K6maFf6SM=; b=KzCkq6vcqxxLb9yETALXUkohOdjEgecOhg2Ll8KTcu2ek1mrn17x0qenJLdqhRgxvL c8c2FcbJQ0LqdFmk4wkZjJAI5b+ZlCxO2qdsip4CZAApUZ16ShfZ4o7xQOfAo2iM38UH a41UB/y15YKJK9wRpDN1+tOcjBEKawXV1ZWEmfi1nC4xzR505F74Ed2SqHpzD+8VPwBg oQO8O0uBlP+7wOR+CZBz+rFpunw4e7dNNWPh1/WBH0yJR+P1+J15HdrTvoMfUIllSJvS l1Z9M3qTR2QlSAw0KIHAJrTIZNuvnuBNhiyH3IFh7IWx6jHs/rZN2GUn0B4LHGmLQ8bz WEmQ== X-Forwarded-Encrypted: i=1; AJvYcCVDWWs6gB46uUJdcFKKgcMwUcpX3k6HJVSMzdYtscV1bpo9RMeOwHfF48gkyxEz9W4DS+hFGgcnz2t6jN8kqDog09nPsXSIKVHdGxY= X-Gm-Message-State: AOJu0YxOJBY5OGc8jTEPVOLZ1koYj+EzIgUbFPuE5S1YCiifUi0t9s/K 6JslVyr6L+JD3cHuVDjiOtSwD0d+AtdLUeoeicNqoGtMdC3gYKf0jGxKtOCwkqkrbGFudb7vU2q lNA== X-Google-Smtp-Source: AGHT+IGJgoOMG1JaBSE0UtHVyyig8KidzCIEzcvbINCcSvOASMpuIMj9uEKB71a44HvjahOWnOHiagC8tKE= X-Received: from edliaw.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:305d]) (user=edliaw job=sendgmr) by 2002:a05:6902:1007:b0:deb:8bc5:eb5b with SMTP id 3f1490d57ef6-debb9d87cd3mr271839276.5.1715118336096; Tue, 07 May 2024 14:45:36 -0700 (PDT) Date: Tue, 7 May 2024 21:38:27 +0000 In-Reply-To: <20240507214254.2787305-1-edliaw@google.com> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240507214254.2787305-1-edliaw@google.com> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog Message-ID: <20240507214254.2787305-3-edliaw@google.com> Subject: [PATCH v2 2/5] selftests/sgx: Include KHDR_INCLUDES in Makefile From: Edward Liaw To: shuah@kernel.org, Mark Brown , Jaroslav Kysela , Takashi Iwai , Catalin Marinas , Will Deacon , Nhat Pham , Johannes Weiner , Christian Brauner , Eric Biederman , Kees Cook , OGAWA Hirofumi , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , " =?utf-8?q?Andr=C3=A9_Almeida?= " , Jiri Kosina , Benjamin Tissoires , Jason Gunthorpe , Kevin Tian , Andy Lutomirski , Will Drewry , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Paolo Bonzini , Sean Christopherson , Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , David Hildenbrand , " =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= " , Paul Moore , James Morris , "Serge E. Hallyn" , Andrew Morton , Seth Forshee , Bongsu Jeon , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Steffen Klassert , Herbert Xu , " =?utf-8?q?Andreas_F=C3=A4rber?= " , Manivannan Sadhasivam , Matthieu Baerts , Mat Martineau , Geliang Tang , Willem de Bruijn , Fenghua Yu , Reinette Chatre , Mathieu Desnoyers , "Paul E. McKenney" , Boqun Feng , Alexandre Belloni , Jarkko Sakkinen , Dave Hansen , Muhammad Usama Anjum , Edward Liaw Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-input@vger.kernel.org, iommu@lists.linux.dev, kvmarm@lists.linux.dev, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-actions@lists.infradead.org, mptcp@lists.linux.dev, linux-rtc@vger.kernel.org, linux-sgx@vger.kernel.org, bpf@vger.kernel.org, kernel test robot Add KHDR_INCLUDES to the CFLAGS to pull in the kselftest harness dependencies (-D_GNU_SOURCE). Also, remove redefinitions of _GNU_SOURCE in the source code. Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202404301040.3bea5782-oliver.sang@intel.com Signed-off-by: Edward Liaw Reviewed-by: Muhammad Usama Anjum Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen --- tools/testing/selftests/sgx/Makefile | 2 +- tools/testing/selftests/sgx/sigstruct.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests/sgx/Makefile index 867f88ce2570..26ea30fae23c 100644 --- a/tools/testing/selftests/sgx/Makefile +++ b/tools/testing/selftests/sgx/Makefile @@ -12,7 +12,7 @@ OBJCOPY := $(CROSS_COMPILE)objcopy endif INCLUDES := -I$(top_srcdir)/tools/include -HOST_CFLAGS := -Wall -Werror -g $(INCLUDES) -fPIC +HOST_CFLAGS := -Wall -Werror $(KHDR_INCLUDES) -g $(INCLUDES) -fPIC HOST_LDFLAGS := -z noexecstack -lcrypto ENCL_CFLAGS += -Wall -Werror -static-pie -nostdlib -ffreestanding -fPIE \ -fno-stack-protector -mrdrnd $(INCLUDES) diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c index d73b29becf5b..200034a0fee5 100644 --- a/tools/testing/selftests/sgx/sigstruct.c +++ b/tools/testing/selftests/sgx/sigstruct.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2016-20 Intel Corporation. */ -#define _GNU_SOURCE #include #include #include