Received: by 2002:a05:6359:322:b0:b3:69d0:12d8 with SMTP id ef34csp115972rwb; Wed, 10 Aug 2022 05:51:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR5gEkgnR3lK5AQLjV/3GcBGwiaoCarhTQoU9MhlTLGs+IA1VtCIsZO3ZoGiP10NLzk61Yiu X-Received: by 2002:a05:6a00:188e:b0:52e:2606:a805 with SMTP id x14-20020a056a00188e00b0052e2606a805mr26910992pfh.49.1660135901568; Wed, 10 Aug 2022 05:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660135901; cv=none; d=google.com; s=arc-20160816; b=rk8Ua2B3ReDb9obqMl+3vSKwr4wTkH7A7BiG77GVlr3JuAndPgrJbB0Hn3DdX018Cb jxkBb2t0epvPi5liPuGm1OcIJ+ufxioeNJ7fXz1Ejo3WsQIYeD/d1Ifon0cM/ieie9YC pcbnuyXn36gQ5f+UdVngxqPAqPj406TGTF7YcdMZuivqxPsQFJAf02eUTzMAqEPZvf2I GLP+PpS2mwrE+o7iFaJklkT6CtVjU9YbIoxi268fnB036HDw+hCBSF/IWcm7oq1WYgkA igQigXp05ZVvnrBtGd6JPSZk8UcyXTo792WqmlfUprtXtboObez4qMPpkCGz1aWWXW0U 1gRQ== 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=0z7Zcbu+4x+/8ByQeQoUUCbO5l7ndOcAPekSmvOfATk=; b=so2shklZT5doJzsQCQERMzTAmz4jgJWpSo+mg/ZrA3ByyOr3uGog/cvYh0AjQyvQwj jwVev31CVh77jrSdMdz7rKCWja1LVHJY2iNAmpbop8M1NqQk351pMfTLi1Cg5KhZ/tuD e1s7fUpHW7aprDz1OoVFnyIweFuLcviCTFi3SPDsW7WHhfyryCiA2DkjcDUN/IWhapFu 5Cpaenvl3iy4SehY1qUohYi/HW62lL/7j8pKxuLXt/89/26rPRNgTePn0ArIg9B/bzHT yhs9BT2qGP8FOwnfQrlxxctuCmbB0GsxPKaMF/j4QkQmWe4CtWuRhMVJYK0JgDTxuWEu h6/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iataZB7t; 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 d133-20020a621d8b000000b00528c34c71a3si1126845pfd.80.2022.08.10.05.51.27; Wed, 10 Aug 2022 05:51:41 -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=iataZB7t; 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 S232240AbiHJMTV (ORCPT + 99 others); Wed, 10 Aug 2022 08:19:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231908AbiHJMTT (ORCPT ); Wed, 10 Aug 2022 08:19:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E4F286C109 for ; Wed, 10 Aug 2022 05:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660133956; 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=0z7Zcbu+4x+/8ByQeQoUUCbO5l7ndOcAPekSmvOfATk=; b=iataZB7t0KvU4TuKQ661NFatO3dECgsWpahJx2nCBcKBHoICvzYoHU/Cr7INbaotBy6dhP x7/3paPMCAs6+Zrde031uXrXBkMhrUWv1wtUAVk1s9PIpOTLjH2ZfPwRyz4UmE1PfjqMyX Uji/rhKecV3TATVeBmenrE5FGHxZTrc= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-22-glaFfCyQNKKukJuwl-hmaw-1; Wed, 10 Aug 2022 08:19:15 -0400 X-MC-Unique: glaFfCyQNKKukJuwl-hmaw-1 Received: by mail-ej1-f71.google.com with SMTP id js11-20020a17090797cb00b00730d73eac83so4128124ejc.19 for ; Wed, 10 Aug 2022 05:19:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=0z7Zcbu+4x+/8ByQeQoUUCbO5l7ndOcAPekSmvOfATk=; b=YctgNH0Ap6n8MDFgEHRPzGwnR3TwSzbShbSQu8BZ0rcMqXtnOC2FLjUB0mwhKhLSJ4 76VN51SyoW84JcQ6ajhc2XYQtyHirK1kMGZmWLYcvpjIRKyjAg5ar/jy9z8YHFrrfki4 LkSQxxZeSo5FWKHFM9sfhoai+M4RsYTH1SO2nsZjayWLkfX0BqQ2XHTVINAShXwxSZ4l Tcf/r2jFcp9SL4RUY4f5v1lfMbO5Gy751nXsCxdSG0JdiklGOGszeYfh80huco2djpyy nB/Ojz8USRlEerkjXCXALEl0SAkk8X+Lqhm6fbKCq9qvTGqVoX08PMo906MocyucOLRP JCng== X-Gm-Message-State: ACgBeo0yE1/OME5Qlm7aV0dAFSuxhombm0kSRFvvP2OS/UhIBnuAzg3B WVwP/75DzSYej8RXzZAAi6L6nxVH/crhUE8KF6iqN/LhqYWDMnyig/wSDsVtwlcmcqOA4RhN5H3 6rQWcSB+xle1xfvM+vWCa2KIG X-Received: by 2002:a17:906:5a6a:b0:730:bc8a:57dd with SMTP id my42-20020a1709065a6a00b00730bc8a57ddmr19475533ejc.301.1660133954443; Wed, 10 Aug 2022 05:19:14 -0700 (PDT) X-Received: by 2002:a17:906:5a6a:b0:730:bc8a:57dd with SMTP id my42-20020a1709065a6a00b00730bc8a57ddmr19475525ejc.301.1660133954210; Wed, 10 Aug 2022 05:19:14 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:9af8:e5f5:7516:fa89? ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.googlemail.com with ESMTPSA id fu14-20020a170907b00e00b007330ad36237sm699707ejc.151.2022.08.10.05.19.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Aug 2022 05:19:13 -0700 (PDT) Message-ID: Date: Wed, 10 Aug 2022 14:19:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 1/2] KVM: selftests: Make rseq compatible with glibc-2.35 Content-Language: en-US To: Mathieu Desnoyers Cc: Gavin Shan , Florian Weimer , kvmarm , KVM list , linux-kselftest , linux-kernel , maz , oliver upton , andrew jones , Sean Christopherson , yihyu , shan gavin References: <20220809060627.115847-1-gshan@redhat.com> <20220809060627.115847-2-gshan@redhat.com> <8735e6ncxw.fsf@oldenburg.str.redhat.com> <7844e3fa-e49e-de75-e424-e82d3a023dd6@redhat.com> <87o7wtnay6.fsf@oldenburg.str.redhat.com> <616d4de6-81f6-9d14-4e57-4a79fec45690@redhat.com> <797306043.114963.1660047714774.JavaMail.zimbra@efficios.com> <392275844.358.1660133856396.JavaMail.zimbra@efficios.com> From: Paolo Bonzini In-Reply-To: <392275844.358.1660133856396.JavaMail.zimbra@efficios.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 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,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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/10/22 14:17, Mathieu Desnoyers wrote: > Indeed, this hack seems to be a good approach to immediately fix things without > moving around all source files and headers. In the longer term, I'd prefer Sean's > proposal to move rseq.c to tools/lib/ (and to move rseq headers to tools/include/rseq/). > This can be done in a follow up phase though. I'll put a note on my todo list > for after I come back from vacation. Great, Gavin, are you going to repost using librseq? >> Yeah, rseq_test should reuse librseq code. The simplest way, >> if slightly hackish, is to do something like >> >> diff --git a/tools/testing/selftests/kvm/Makefile >> b/tools/testing/selftests/kvm/Makefile >> index 690b499c3471..6c192b0ec304 100644 >> --- a/tools/testing/selftests/kvm/Makefile >> +++ b/tools/testing/selftests/kvm/Makefile >> @@ -37,6 +37,7 @@ ifeq ($(ARCH),riscv) >> UNAME_M := riscv >> endif >> >> LIBKVM += lib/assert.c >> LIBKVM += lib/elf.c >> LIBKVM += lib/guest_modes.c >> @@ -198,7 +199,7 @@ endif >> CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \ >> -fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \ >> -I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \ >> - -I$(> + -I$(> >> no-pie-option := $(call try-run, echo 'int main() { return 0; }' | \ >> $(CC) -Werror -no-pie -x c - -o "$$TMP", -no-pie) >> >> >> and just #include "../rseq/rseq.c" in rseq_test.c. Paolo