Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp30977rwb; Wed, 21 Sep 2022 16:56:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Jef9rE/Uh+e/VVKQ6yPtYC3qOSeq0pzB4tY8yMB740e+/P/sdZjEb/lG1Y8Ci856YW80R X-Received: by 2002:a17:90b:3843:b0:202:df54:4c10 with SMTP id nl3-20020a17090b384300b00202df544c10mr677035pjb.100.1663804567108; Wed, 21 Sep 2022 16:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663804567; cv=none; d=google.com; s=arc-20160816; b=hTxQY5u0IaBAHsMFNrMId/zVi5H+TnnWNOO+8G/HnCmRjpkDske2bSKG6DkL/OQTGg aXUD44P+YIgfM3vkg04pp/6y2LxLPXO1KRFxnIGZDhT5nLVPaJPO8nprEc8U44QPL0el y8RiJrkMU2oL8xNklWOXDucf2lXaaH8E1S2MwdD7BGoJBqZDSuFlgeu8JANlrjgpERbQ 0ANUKdnUtK8wmhH1qJJxb+KlYAgd5Z5iwkphlxdQ7Mz8EMLjXPo6HNtFl+48O8ZWdbDh 7y9xSU5s4nGi5KaYkMH8jMxZtsR4fJ4aLxQ/rMam/87AW3WyGSvw8qCIDh6IJH/ETwOW jMcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=UjiEh0d7e1MycsC8HruOfW5g/90n8MVOkif6MIdUj1Y=; b=Ro9jvOFz4maqF2Pfqm95hDYm7N9yti6uLCKrQx/MdG6MVLKnvYw7oqi1/IR6+crlDK EClNOdIQLWQ2h1fw6noa82QsTCCQ2feGkKcM5wRGIa6ra8CIJM0+Kf7feqqLK7HxjdL7 03lWaJFTRTmgFxXQnFRkekuGX0UU/cuo/bnG20fv5T7jveHWQLZa/9Ys3b2/ZgxaW2Pe kRN9gRE9e7eYTa9FzDgaB4DyqwvfGd4+TkW8EoeGIOoTvN0w010ao6R99G0JobvwBFsn OFJwJnL22zauwsnRbRVXsVvtX0qX/xTJT47s6fyDGheRwI+6odS+hlLDpZxvIwPcOnpg HdbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=eYa4JlqG; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j70-20020a638049000000b0042a560b1cd2si4618741pgd.248.2022.09.21.16.54.58; Wed, 21 Sep 2022 16:56:07 -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=@google.com header.s=20210112 header.b=eYa4JlqG; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229771AbiIUXaN (ORCPT + 99 others); Wed, 21 Sep 2022 19:30:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229657AbiIUXaL (ORCPT ); Wed, 21 Sep 2022 19:30:11 -0400 Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8C2C5A142 for ; Wed, 21 Sep 2022 16:30:09 -0700 (PDT) Received: by mail-qv1-xf2a.google.com with SMTP id s13so5633111qvq.10 for ; Wed, 21 Sep 2022 16:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=UjiEh0d7e1MycsC8HruOfW5g/90n8MVOkif6MIdUj1Y=; b=eYa4JlqGWtQtNLvg7owy6IMmJ/3kOrjOhM3OysMQPAtUP7r9CONrKiCsR7PATmzfI+ vREAKkLo2j2sKA9nZ1DqvCvHeTmVGo886+qX9mnQOLrocwV4VR9pu6SrQcunZlmzSbkR TCVyh/4fiUkRJpkF6xp3neOPSFj1CVCMl0d8v+Nv630TGdynL4DRTfVWdSjeRlVuAcdT Iz3wZZUNo+7LiTbLEK7eG0IFY5YkcXMz/hfPjZ6G4FaAfmoVFjk49CGXUeG5oSs1EOx0 dqJRCDpvHjmKxa7nGayd2Ha3X9YF2N/CBk6Y9KScUkfufv27896P27kzUWUMgnHCN2LZ mx6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=UjiEh0d7e1MycsC8HruOfW5g/90n8MVOkif6MIdUj1Y=; b=at8QSJwFuJI4Kh2IX4aChP5X0Ro8Kra1Nn6F/BMvN0RQFOoivPI51j0WG7pBj+pc8U spZww1rt/OLW3kpMxfwCoNjjrnMlK3sOM4aYU+Yuwxvc3/7MJKRLSggAYOFVKYO28XhV Y7jizlwDjiMGPzt/uV+lxaMDCTRYu1IDqgOe8kUzYDNeKFiFrqCrBxboq/66Ekpg64WA lZ4EcNxHA9/sExJ5Nxrh1n+QUGXkEwPWaroTCCciyBfjlh6Lshoku1GnGrVM8GC5lPeR 1809N1pkSjWc/HKGM9DgUCieFM5jFblF+TIkI5SFzdMVnjJutfOHstR+dSiurzyBtHR4 xxUg== X-Gm-Message-State: ACrzQf2CNdSGMYBmL8XQjKTNZpsYaVryeYicC2RoHrTQmgKJBdwKqc/l +o4DYqJY7wFix2xFv/yhi45cJr/oCj20lwf2YhMNfg== X-Received: by 2002:ad4:5be2:0:b0:4ad:791c:8724 with SMTP id k2-20020ad45be2000000b004ad791c8724mr432356qvc.56.1663803008708; Wed, 21 Sep 2022 16:30:08 -0700 (PDT) MIME-Version: 1.0 References: <20220802071240.84626-1-cloudliang@tencent.com> <08cd7add-b2a5-da3f-1d2c-efa0e7c80511@gmail.com> In-Reply-To: <08cd7add-b2a5-da3f-1d2c-efa0e7c80511@gmail.com> From: David Matlack Date: Wed, 21 Sep 2022 16:29:42 -0700 Message-ID: Subject: Re: [PATCH] selftests: kvm: Fix a compile error in selftests/kvm/rseq_test.c To: JinrongLiang Cc: Paolo Bonzini , Sean Christopherson , Liam Merwick , Wanpeng Li , Jim Mattson , Vitaly Kuznetsov , Joerg Roedel , Jinrong Liang , kvm list , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Fri, Sep 16, 2022 at 3:03 AM JinrongLiang wrote: > > > > On 2022/9/8 00:54, Liam Merwick wrote: > > On 07/09/2022 17:01, Sean Christopherson wrote: > >> On Tue, Aug 02, 2022, Jinrong Liang wrote: > >>> From: Jinrong Liang > >>> > >>> The following warning appears when executing: > >>> make -C tools/testing/selftests/kvm > >>> > >>> rseq_test.c: In function =E2=80=98main=E2=80=99: > >>> rseq_test.c:237:33: warning: implicit declaration of function > >>> =E2=80=98gettid=E2=80=99; did you mean =E2=80=98getgid=E2=80=99? [-Wi= mplicit-function-declaration] > >>> (void *)(unsigned long)gettid()); > >>> ^~~~~~ > >>> getgid > >>> /usr/bin/ld: /tmp/ccr5mMko.o: in function `main': > >>> ../kvm/tools/testing/selftests/kvm/rseq_test.c:237: undefined > >>> reference to `gettid' > >>> collect2: error: ld returned 1 exit status > >>> make: *** [../lib.mk:173: > >>> ../kvm/tools/testing/selftests/kvm/rseq_test] Error 1 > >>> > >>> Use the more compatible syscall(SYS_gettid) instead of gettid() to > >>> fix it. > >>> More subsequent reuse may cause it to be wrapped in a lib file. > >>> > >>> Signed-off-by: Jinrong Liang > >>> --- > >> > >> Reviewed-by: Sean Christopherson > >> > > > > Can a 'Cc: stable@vger.kernel.org' be added also as e923b0537d28 got > > backported to v5.15.58 > > > > Reviewed-by: Liam Merwick > > > > > >> > >> Paolo, do you want to grab this for 6.0? It doesn't look like we're > >> going to have > >> a more elegant solution anytime soon... > > > Ping? +1, please grab this. Every new branch I create (for new development and to review upstream code) I have to remember to cherry-pick this patch in because I use Clang.