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: 13650074 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (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 13EBF1C6602 for ; Tue, 30 Apr 2024 23:51:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714521081; cv=none; b=AOq2a3yxDrULzXLH6U/RpJHgk/ojY6lfifeorZMpBXAXL5te1mpQeZO0BXT49ckv5OCCWAi/4GGC8HYzn6+GBQADSXtTNgu3W7mazaQs72szVxdeAzdGTe76cHAgsxF0d15yxFoKekaM4Cu/wRxwMVNhWV+wcSaRr26WDnxrLq4= 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.202 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-f202.google.com with SMTP id 3f1490d57ef6-de59d580f61so9910416276.3 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=bhgUNr0Uem+yUUw51gpOTa3HaxuDLpEhI4/1f97bboOX5LH7eSJ8o6Byvs95SJCA+A HQ+bIdJ5Beal/gL35I59PGkwkw8Qx5UA5PR0beCyhf3jFk2ZQWCcNph3z4UchFNl63DR kFyOq6s4AWiB+vf4VGWAldFZF8Gt/7trrDmC1NGhbHa3MI8jvzu71XzP0g7HAc8VJ/nb lB6wZctsPk8VRcz+/eF9WyIUkyh7gM5j8KY7z/h8/5iJClkII4lHtTNY+3EwEOngdJ2v VR+sDJGaQptKjaSF55mkZZcrzYh+dtorC9/RToqlttQA0BOd5a+WYJu5h6Pb0R6BpmGn ShMg== X-Forwarded-Encrypted: i=1; AJvYcCWEJVer9nog97ZzGi9/G3bFog1CwepydjWmV18cy3sVJbpEYi1AyChixTOHc+Ada3nrqQOsiYSD8BZR930moGhq4Ar9 X-Gm-Message-State: AOJu0YyxJvVcQYX67V/8N+g7dRuAiHNHiQLbowGsOi/wtB7KaNmR18T5 I4MaNl+sOzhgHGY1t1Fqavc6btFBN/NrMn605kDAXlELIu281Ce/PozrT7vSqBA35BMzFqFy6o+ /0w== 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: kvm@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 Reviewed-by: Jarkko Sakkinen --- 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