Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp448593rwb; Fri, 4 Aug 2023 15:53:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSbs8TJUBVcfQVbtUj6c+xIzTv0b/hUfVHmFS4NFgE8VQu/6bgxPTJXtIZ25osJCoV5jmY X-Received: by 2002:a05:6808:2124:b0:3a7:215c:e3a with SMTP id r36-20020a056808212400b003a7215c0e3amr4763294oiw.34.1691189630857; Fri, 04 Aug 2023 15:53:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691189630; cv=none; d=google.com; s=arc-20160816; b=koT9D55I7d8VlQZUFmq3Vj4sCW+7L2dojLR2MARJ4+jGj6+O4yqaOlhr+ovy9xqIIT rkdN5Z0TJtTCwXfOHbvUNXk1nneoLUpUiAQCvK5mWrmzexeXaxPbnAkr4U1q7CD7vbsK dAs7wBZD/gcwXafZErraO+ETsUeQQ63qouqRwN5luYplkQzBTA0BDEPvMcHyixdy5din zxcRQQBEI5ecoJU8uZIAymybBT0BjuLtPY/zISAV33Rox3KLwHaNVQzh4yaBY+pGzlx1 24BNPRFOOW4RAQuxWh+J6MaOK8Q1k5oNwp1hjdrH9IFYYtg1f4SvnDnrY2tvx5KAN6kI RFzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=evYrVf/iKCZzrXphWuBBZKTjd3mBH9ss4zSdxYs7MUs=; fh=+9HBsg18DVYKuKjABzzZFQJz+9VEQ27A5+Z8dPUw0mg=; b=GcXVd+ojMKOwqAGhx3I7oxTmeuQQFn00+ONpBa7Hlh2n/oTWosRsEyBW5uEsLTn5ob wfLWgJqmZ8ZtdocVAzl/96/p2wcYctw88NzMU16lXZca32cykxPjHoedkw+42RnNMOKI U087XM5JxP9RE8KPvjgEwS0Ch7CnIfgSRSXlXi4fPyOCWlmzjL6VWzabtx4z5MARi6GN n89ph5p+MuEndboZiN4CzvfG5ZOY9COQWTQdksEmP/mVSux53gdVm0r4/IQ9/embD+yd Lp+ahmIS2TEecl7sn5B/WirEaPWn8GzP7rvtTgeVW84gIUyMS48Yphx5rZ/U8Klw3fAf UK2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PDszbfKB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n7-20020a6543c7000000b00563adcaab61si2403160pgp.865.2023.08.04.15.53.37; Fri, 04 Aug 2023 15:53:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PDszbfKB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229772AbjHDWKq (ORCPT + 99 others); Fri, 4 Aug 2023 18:10:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjHDWKo (ORCPT ); Fri, 4 Aug 2023 18:10:44 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4927E6F for ; Fri, 4 Aug 2023 15:09:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691186997; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=evYrVf/iKCZzrXphWuBBZKTjd3mBH9ss4zSdxYs7MUs=; b=PDszbfKBcnagiXLInDCz6a7qLODua/mhBABPqptZHPgKdx76zaicnD1U9dQyfZdjgad93A G5cbcik+/Ywa9DwyYx4LR5xX7CyaDAggMfwjYAtO98vB3s8d2vlwVkLewiSHVr19MBlQqq 6iL3iuE3pbcpVWOicx6I8WlEU4g2Z3Y= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-675-NxiIgF3TMyyZgjfLQIXWXw-1; Fri, 04 Aug 2023 18:09:55 -0400 X-MC-Unique: NxiIgF3TMyyZgjfLQIXWXw-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5223bdb71e5so1569960a12.0 for ; Fri, 04 Aug 2023 15:09:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691186994; x=1691791794; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=evYrVf/iKCZzrXphWuBBZKTjd3mBH9ss4zSdxYs7MUs=; b=V0gehMs/afQ5pVfOw55xxy5GjVarqpcNeqMlaO72UPeQ+y+cffLzQjw5ok2v6fPd+g qLeOTWOtNO3Y4kwiqaRX8HklPu0885zkbkqa2HYvBzKF+BKehTca9uVk0nKqpRuqYH/p 3Z7uEpSBoJC3u/5MyNq0tAmRKM+lE27HfqRXW7iCwaxksOcD1a+2Q+HlTSXmLJsOzApg pr3aBdO3RZSSpCfzATgSh0GiiewEhOEfYACAY+8rTwlnTrwDuVYoheAHrgp4pqyh4PbV sbwZPHZd+z4Ap5JeJlBFvGxK/CY54NRUd8y+ZPJOmhXTj5Flx8SYWZ5ah+xgLSe+dXtF yeCA== X-Gm-Message-State: AOJu0Yy/H6W/eL8ulmO0DSZeq9iCfQtHIwStZp48KfinNZ27HG855yEj DO7a7kjOhBq1O9Ib0BjCJhw0X9W25zw5qBEdH9HpXQOrUIFQ3upRLN3KSHd9SJvpxmfWccNMAcG ZGyIBLzNJy1vvArP1VPjsdi5o5IupEnaC X-Received: by 2002:aa7:c990:0:b0:521:a99b:a233 with SMTP id c16-20020aa7c990000000b00521a99ba233mr2648711edt.10.1691186994115; Fri, 04 Aug 2023 15:09:54 -0700 (PDT) X-Received: by 2002:aa7:c990:0:b0:521:a99b:a233 with SMTP id c16-20020aa7c990000000b00521a99ba233mr2648687edt.10.1691186993726; Fri, 04 Aug 2023 15:09:53 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:63a7:c72e:ea0e:6045? ([2001:b07:6468:f312:63a7:c72e:ea0e:6045]) by smtp.googlemail.com with ESMTPSA id p12-20020aa7d30c000000b00522ce914f51sm1774622edq.67.2023.08.04.15.09.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Aug 2023 15:09:53 -0700 (PDT) Message-ID: Date: Sat, 5 Aug 2023 00:09:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] selftests/rseq: Fix build with undefined __weak Content-Language: en-US To: Mark Brown , Mathieu Desnoyers , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Shuah Khan , Sean Christopherson Cc: Aaron Lewis , stable@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20230804-kselftest-rseq-build-v1-1-015830b66aa9@kernel.org> From: Paolo Bonzini In-Reply-To: <20230804-kselftest-rseq-build-v1-1-015830b66aa9@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/4/23 21:22, Mark Brown wrote: > Commit 3bcbc20942db ("selftests/rseq: Play nice with binaries statically > linked against glibc 2.35+") which is now in Linus' tree introduced uses > of __weak but did nothing to ensure that a definition is provided for it > resulting in build failures for the rseq tests: > > rseq.c:41:1: error: unknown type name '__weak' > __weak ptrdiff_t __rseq_offset; > ^ > rseq.c:41:17: error: expected ';' after top level declarator > __weak ptrdiff_t __rseq_offset; > ^ > ; > rseq.c:42:1: error: unknown type name '__weak' > __weak unsigned int __rseq_size; > ^ > rseq.c:43:1: error: unknown type name '__weak' > __weak unsigned int __rseq_flags; > > Fix this by using the definition from tools/include compiler.h. > Queued, thanks. Sorry for the breakage. Paolo > Fixes: 3bcbc20942db ("selftests/rseq: Play nice with binaries statically linked against glibc 2.35+") > Signed-off-by: Mark Brown > --- > It'd be good if the KVM testing could include builds of the rseq > selftests, the KVM tests pull in code from rseq but not the build system > which has resulted in multiple failures like this. > --- > tools/testing/selftests/rseq/Makefile | 4 +++- > tools/testing/selftests/rseq/rseq.c | 2 ++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/rseq/Makefile b/tools/testing/selftests/rseq/Makefile > index b357ba24af06..7a957c7d459a 100644 > --- a/tools/testing/selftests/rseq/Makefile > +++ b/tools/testing/selftests/rseq/Makefile > @@ -4,8 +4,10 @@ ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) > CLANG_FLAGS += -no-integrated-as > endif > > +top_srcdir = ../../../.. > + > CFLAGS += -O2 -Wall -g -I./ $(KHDR_INCLUDES) -L$(OUTPUT) -Wl,-rpath=./ \ > - $(CLANG_FLAGS) > + $(CLANG_FLAGS) -I$(top_srcdir)/tools/include > LDLIBS += -lpthread -ldl > > # Own dependencies because we only want to build against 1st prerequisite, but > diff --git a/tools/testing/selftests/rseq/rseq.c b/tools/testing/selftests/rseq/rseq.c > index a723da253244..96e812bdf8a4 100644 > --- a/tools/testing/selftests/rseq/rseq.c > +++ b/tools/testing/selftests/rseq/rseq.c > @@ -31,6 +31,8 @@ > #include > #include > > +#include > + > #include "../kselftest.h" > #include "rseq.h" > > > --- > base-commit: 5d0c230f1de8c7515b6567d9afba1f196fb4e2f4 > change-id: 20230804-kselftest-rseq-build-9d537942b1de > > Best regards,