From patchwork Tue Apr 30 23:50:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edward Liaw X-Patchwork-Id: 794263 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 1E0DA1C6605 for ; Tue, 30 Apr 2024 23:51:19 +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=1714521081; cv=none; b=EchW09G5ry4Ep8upXn/4JiM+Kefp4jUlBz1sAct9fbTwfxNQRuiT3hUkxOZQmXN39bbozFnfCcIPbgwKc+BdrTdG8avq1vFx/UoQ7HWVj6Jc3H84lWH02ecLEB1TM0myYFhW0+/bQybpPgP709M4OSeZWBPGjWb84YBhAhmpPWA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714521081; c=relaxed/simple; bh=hoKCCWVOkE0ESMxaMi+qTIS8AurEZYZfNn5Rvt++a10=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=IUrHV+uMx4XDJWwFSLpa/Xe7cUH+f/bj7BlBVSrDCGjwEe/w+pJWJzIVTkECvkP1UXlxiWJFcK1r08xIoetv5mDpPMhFBnhzCPUKHMWBsLtJCX8ozhkAtVdQHGmHjSWh5QcJlNUY6jvNJWPdpVEqPrSw6COrOLodqudW3ZlPWaM= 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=4Yx2vh98; 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="4Yx2vh98" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-dc6ceade361so15237365276.0 for ; Tue, 30 Apr 2024 16:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1714521078; x=1715125878; 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=gjaSNnvftOLawQ81uXTzdayleIIMFIclLDs0BuljtK4=; b=4Yx2vh985eAUe73b/Mn7onj2pzj/LBoS71ImaFxNWPt/0DIGzmxTlaskzv3d+Gb+Hp L2oyQ8B+7Xe0YZPUQst64aeW5xQCZJ9QXvCd83LpZL4+vT/DG5ys9nm6CxNHyB3q2+Mr j9r4MsmhFMUh7tLzhQZhsqgCwU0ukuUnqw5JUzUZxw4pwyQPvzdILp98ErP/aW3/auMy F/8HNoZtgvnD+ZwgUY7EoXvui5bBGspVCW3oSJhWFO/pKtL7j3F5MTOtOALW1shc33DW Yen84kX/hc1OH9b/W8IWVNIozK+opZC24W78s/cOLHhVbp2x5QLhClbx9YC3xI7RLrCc n65g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714521078; x=1715125878; 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=gjaSNnvftOLawQ81uXTzdayleIIMFIclLDs0BuljtK4=; b=KERaKay4g2lF2h5Lgcw602u6arfgSfRVxD8HhvKlY/3gZ9jihd4BCjl2EMbrpsXiTy v8aEipkUi+HLd658M157HVrxmgP+ZXfQWi3QxYA/cp5rxZhn9E4wRkddq+YUnh665QA3 VqA0o2KZDkB3cPkZ4R7lQVzhyXLooEOEFHRTNyQk2SblqQVG4aPxgFxPVm/w6ZpzZL/o OPPuwXe5vyDwXHiIHpq/yHDxtUPtDDoX6/J1zo8AGBhRBvqkKHLkO/GXpa/uJQeBZAqa aPsxmxNym9WnG6pWLO5uNf0tEFrnKQ+M8A4qr7Cqaj3U94InPTV4RFAYeD8eqXot31Td 0hQw== X-Forwarded-Encrypted: i=1; AJvYcCWAOohp3W5gRol0sKqZNFmxrLIf7NXBLIupQDCGhPeVfOGqatfUZVYmbb4SZTxJv76eUsC7xJyOAGIZSrh48136BfBEuxsn3cM93NU= X-Gm-Message-State: AOJu0YzW/KyRfXCYOK5fK4nXXo4BePQAqbubZgik/c3gvmEojN/QvE1y 1eeH1bJWh/uCgrhw7DLr5ggAIoBKzDMocWCuT3c3N74WQExzOq3PNXMsm92uw9YNPz9MrlX67u5 Hhw== X-Google-Smtp-Source: AGHT+IGPMJHhRXW4IxX0wuIaJEnkwrFiECPVYI3NjrGHekGnxptI0a1rv8ukdUNpyZcLuFV1IvoMatGim7A= X-Received: from edliaw.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:305d]) (user=edliaw job=sendgmr) by 2002:a05:6902:150a:b0:dc2:398d:a671 with SMTP id q10-20020a056902150a00b00dc2398da671mr352958ybu.10.1714521078081; Tue, 30 Apr 2024 16:51:18 -0700 (PDT) Date: Tue, 30 Apr 2024 23:50:10 +0000 In-Reply-To: <20240430235057.1351993-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: <20240430235057.1351993-1-edliaw@google.com> X-Mailer: git-send-email 2.45.0.rc0.197.gbae5840b3b-goog Message-ID: <20240430235057.1351993-2-edliaw@google.com> Subject: [PATCH v1 01/10] selftests/sgx: Compile with -D_GNU_SOURCE From: Edward Liaw To: shuah@kernel.org, Mark Brown , Jaroslav Kysela , Takashi Iwai , Jiri Kosina , Benjamin Tissoires , Sean Christopherson , Paolo Bonzini , Bongsu Jeon , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Belloni , Jarkko Sakkinen , Dave Hansen , Edward Liaw , Andrew Morton , Muhammad Usama Anjum Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-team@android.com, linux-sound@vger.kernel.org, linux-input@vger.kernel.org, kvm@vger.kernel.org, netdev@vger.kernel.org, linux-rtc@vger.kernel.org, linux-sgx@vger.kernel.org, kernel test robot 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. 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 --- tools/testing/selftests/sgx/Makefile | 2 +- tools/testing/selftests/sgx/sigstruct.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) -- 2.45.0.rc0.197.gbae5840b3b-goog diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests/sgx/Makefile index 867f88ce2570..272da790d9ae 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 -g $(INCLUDES) -fPIC -D_GNU_SOURCE 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..a0c2de7c5302 100644 --- a/tools/testing/selftests/sgx/sigstruct.c +++ b/tools/testing/selftests/sgx/sigstruct.c @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2016-20 Intel Corporation. */ - -#define _GNU_SOURCE #include #include #include