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: 13657831 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EEF7C10F1A for ; Tue, 7 May 2024 21:45:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D28756B0095; Tue, 7 May 2024 17:45:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CD9606B0096; Tue, 7 May 2024 17:45:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B534F6B0098; Tue, 7 May 2024 17:45:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 963EA6B0095 for ; Tue, 7 May 2024 17:45:39 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 24A5C120BBD for ; Tue, 7 May 2024 21:45:39 +0000 (UTC) X-FDA: 82092931998.15.51DBEDD Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf13.hostedemail.com (Postfix) with ESMTP id 5AA3D2000B for ; Tue, 7 May 2024 21:45:37 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=02evQxOO; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf13.hostedemail.com: domain of 3AKE6ZgYKCGUHGOLDZJRRJOH.FRPOLQXa-PPNYDFN.RUJ@flex--edliaw.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3AKE6ZgYKCGUHGOLDZJRRJOH.FRPOLQXa-PPNYDFN.RUJ@flex--edliaw.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1715118337; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=PxqkolGdAHnL6PdsZ65UERLJRMYbiNDsN8K6maFf6SM=; b=bPJUPGu3F+/fKf4ZMfhDs4WhdRakhbKLYp/Z6CWfB3bU9y7u9m7wGX5skh7c77NozDbOku dAEwI5K8evftPvPLwJGNfkpYdZN0t/yu3vEyQLZmIs2vHxv8WKtairZfM2Y8JPStqIH2Rg XdgIjakNvB7NYRjajC8WsLI6RqSv/bU= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1715118337; a=rsa-sha256; cv=none; b=5AlhYYt0IZl6yPW9txQ7q9moCZ82i59RSg0X1rujhr6y6/AT1sIkVhr/b7jYMo9lIUb2Jv uy4kSgDk//yaPKkKI3h96IxOlivRF2QzH+w96QAdvHFSjJEdIw/k6BgwKywOKz+0GTox8R ZNJiWhn8ZZU0Ci8cfoqK4xzDDjmd3sg= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=02evQxOO; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf13.hostedemail.com: domain of 3AKE6ZgYKCGUHGOLDZJRRJOH.FRPOLQXa-PPNYDFN.RUJ@flex--edliaw.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3AKE6ZgYKCGUHGOLDZJRRJOH.FRPOLQXa-PPNYDFN.RUJ@flex--edliaw.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-de60321ce6cso6875807276.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=kvack.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=02evQxOOT36fZrjozrTkcFpcIYNuPADtu6G+/yJ+E8H4hCt8MrzIKTX18XmmB5Rrk3 zqTr62j45i/zTtR0u2kWPbieTnOcxBf4oem1o8V5qjD++wpQdLarNNgbBnGk20avLv9k +IxpFM/eZTQu7xjOAGsqXAKDAweT96VLDi5OyWNEhFZ/2zGWUlklUB44kFUX5uzGiLre Xdif2/ctrfgFJAtetlyo72lCveZpY5GBVrxazDcuZn6B/1lIO+wxq909fE4uKrlYx4iN +e39TuBUuEXSHtaf1oxJYO1qrsVuChNCEEQd6bvrvbwwDbt0cBfowwi4LDZgHxup0uNx tiMw== 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=lNfrzAFSwYkO7Oizuf4y6rUjdP+bw2fW62c4Ltnmb00YS1FZgYTiFvW+XJ6GVUAiNI MFigDNymSuRNWdquoPFJqO3iiQSfhYoZo8g68pcjMRwzYkcVYdLvxSa7lK5t33TwPQ8q 2xnH69j22Xhy1ndmqtdfylWNvzNPgcN7IkpuzkKP30RSDesOrgH3chm918cRO0r1z0MB 1PihgGtF9Ne+B2EP0ZJV1eaMOXcCLwjy3WmuoceEkSAUvg5K8SYZqPekjechJLS0Nnu2 i6Jr3lTbhB8O23GYvtE2a17mMSUUcd/kGFYsVwlwvYTlbQ1FgalVvFluPefqRpj9UEaK N8tA== X-Forwarded-Encrypted: i=1; AJvYcCXFZmMRtGBLjAOJuFSlFQM8+Q8G1DxcC49VZtL6hvIstpgZZZ8t7eGVeMKaNx5OD31BvIlcNtWjxHB1z2+wVwORl2o= X-Gm-Message-State: AOJu0YxSARisPIof3Q9Vm1NY6qVJNFtlss7IWJWeHlN7yWUmPsxQUuTq aYbXHUM+z3n1zDu0f98O0mAGjljt8IYH6zeyc7XJgaesbB3PmEyOck3NeXZgjnaikWjK3347Zw6 zcg== 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> 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 X-Rspamd-Queue-Id: 5AA3D2000B X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: u7gxnm1p7133co6z5o1odxx99prraehq X-HE-Tag: 1715118337-197825 X-HE-Meta: U2FsdGVkX19wrvwIyggi/FZHIMp9jR2Q9+MqVi31NPVG+KuFIkiTQetDOaWw3QQ/tcrO1XEeS15NmZycYX7bpWKBL7WaUIYyTS/fJqIN0nfanA799Ay0MGmc7QWAzmi6YbQ/3nQFcgZcFYTMWBAGWKRjlrgwx3vRyQhO/ZVYEYuhRioLGl+dBpjNtosbbkveQoR1pxjuGICluP6KGBzf0Ex8fCNiXLjLCFET8fIV58RSNYwrGaPZ4A5/ERiOhBXQlZ1bO1M4axHd1pJAjQMaW7Q5HcNzozg+RKyQBDAHVDfWn4qwTjWO8t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0INLS9PI/ZMAaHvBVPaMKjRaQvcVZHtfRRt/1ogd9mtbhsDh3VbEzi/2W2Q8NnXEAQ58kLAHp10cedoWUBZqWVJD3vVbZZPDm5iBZrkISA873iYOw7JPGjGoMOry86Y6afs0J4B/bTl3KiU/8ihOI492VNgLGN9JKtudE2OlKGXtJ/EKgl3g+6FsG1CiulHky8GbuHO0emilgOf8wZCDeLuBtkDFuZPEIMnbYjqInJdSX5zkLWY71m4eDOMWcjh8M5JYVQ42gPCPs9pTLGLuBPCE9zB3mzfHMD/9mu/wLkc7efsDUNEgkSnj8QfLqf0LfDhVPMRp1pnggNZ0jZKWeffi7R39w2y6fxrdSmgqdGXfOY2Hwis2pf3AlSqz0ljY4ibKp8vQy3bwyWB6wP3PqpZ0xJSRbjseyXe1w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 Acked-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Reviewed-by: John Hubbard --- 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