Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2289174rdh; Tue, 26 Sep 2023 20:10:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcLRq9OA0r4HOkfqtEj4eK5s9T+mv2tHw+HpgHOD7CqQ5t3QRf3mtzahyiIRG5cKCoTJBt X-Received: by 2002:a17:902:ea01:b0:1c1:fc5c:b31b with SMTP id s1-20020a170902ea0100b001c1fc5cb31bmr1415469plg.9.1695784255741; Tue, 26 Sep 2023 20:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695784255; cv=none; d=google.com; s=arc-20160816; b=I6LOPf5nQuNn1cDOVFqrdY7BNm5yBCkUZMT/qDundQcDZuXWBv3ueHIzNz+uIAFY6N MWUMRi5CLmgXaygXlGy16Uc7rQ57e9Xwb1sILQoRfVWAkO/QgGy3Ipk20c0lrnpj9cYO wHRumMT4CHZkpA0oWbSZ0pC01w+U0UgmTe2/TaqXquKWwqhblwBshebMKBVsq8oiAUqf 1FbIAXrtkrx7E0z6vlcJtYxWGNPyou1+RCv1tou0O3nRqUpAGIprIvgD3QlUzvqXS6q0 UehG2HSsfwnBJHIuV3pjqpM0HJZqog3dTyuIHrcoF+6K0VXAtIPWO5NVuZoJFaUbqOyx ySEg== 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=4itLyJE7Z8JfcB/+4kI9MY4phkDcuyoRTUlwxY85lCs=; fh=/AK24Uzwym5CSw0E2KV+dW67gaSdJYyF+w1F4irfr1o=; b=YlHMRKVOwHT9dYXS+kLEpslnJ5or4V8eIcEi2dq9ztLDRUurubpdvSpi/qApnGyu2A 4/G7Y7FdWzuKwDLeUC2BzAwYxs2fnGCq14ujllMJ9dgjCt6ZASYYzhPTEfphJEtS3sZy tQe/Vmvy2vEEaOoe02q/cOKDUZk823GJnE/tQ0PImEMm2PdqoFvCYcjSsbWH8ruI7GwP pb1EEtUExB/rEQy8QdSdp3QbmCGjpOuD/u1bhWAOfCCjndpFEqc6wkJdlmyCMRyrkJT1 5rbiMO5qrg0gEjD5KzDanVezkA+ijJ1adY+LQOGtmbgNamcZ03OyjDQ7vv/t4zYwwsbC uQCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="O3/vlNOO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a7-20020a170902ecc700b001c62cfff795si4019197plh.429.2023.09.26.20.10.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 20:10:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="O3/vlNOO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3B0D78028A60; Tue, 26 Sep 2023 13:39:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235860AbjIZUjh (ORCPT + 99 others); Tue, 26 Sep 2023 16:39:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235740AbjIZUjg (ORCPT ); Tue, 26 Sep 2023 16:39:36 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A111DE4 for ; Tue, 26 Sep 2023 13:39:29 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id ca18e2360f4ac-760dff4b701so92351239f.0 for ; Tue, 26 Sep 2023 13:39:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1695760769; x=1696365569; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4itLyJE7Z8JfcB/+4kI9MY4phkDcuyoRTUlwxY85lCs=; b=O3/vlNOOI4kd2O/aG+G/S83J0WrYa0ppfpDsCrxlj8nAhMHTaUsKl10uVmA336CFwW vPnvQOyvyH6F6Nw2qCOoXy6ZdIL351uX0WQsIdq1QxuJcQzPxP1FzMaxc4LEqLiVD/Cp OY/XqdblLQ18uSAfdUU+EJlAruNwS0bUV1ZNY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695760769; x=1696365569; 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=4itLyJE7Z8JfcB/+4kI9MY4phkDcuyoRTUlwxY85lCs=; b=IhD9q9SdkFVLj7fU4pvJT81mXkZ7aiFBcjifDOaAJXkuvjhyzuhiOAM/WmKhjU4HXK D++acYTQZSCfk+UkF88RUPjBbRiJbWGMU6i+YDLIAMGd4hp+qaktMoQO+HPmYyIxRufk kqixznGh3qxSk/fWzHC7/EPLMeJZjOPXVZNl5VxIhd1ovm1mw1w+Xt9pN/LXpz/Pbu/R fSGy7wKwHv0eCXS2o9j5/sdD26cV/z7Eb47fevchvFQMaXPj2zwd4TYUd9dOd4URBj4A 6K6easGYX629092rJTylY1cyVIPTwQjzDhkqbyrRzzak3mgLSHuI0NvfFEZzWag0/g8G rr7g== X-Gm-Message-State: AOJu0Yz3O2ceflucNigUe6qK4Pk6Re3TxtNeQj2OAyna/GgFSrhUNFPA Q5H4LzWEPSwG4mlp5coQqqww/g== X-Received: by 2002:a6b:5d1d:0:b0:790:958e:a667 with SMTP id r29-20020a6b5d1d000000b00790958ea667mr10265245iob.2.1695760768958; Tue, 26 Sep 2023 13:39:28 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id g17-20020a0566380bd100b00437a3c128dfsm3671118jad.108.2023.09.26.13.39.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Sep 2023 13:39:28 -0700 (PDT) Message-ID: <63dd7222-99dc-8e11-3a51-b132e4115ac5@linuxfoundation.org> Date: Tue, 26 Sep 2023 14:39:27 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] selftests/rseq: fix kselftest Clang build warnings Content-Language: en-US To: Mathieu Desnoyers , Justin Stitt , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Shuah Khan , Nathan Chancellor , Nick Desaulniers , Tom Rix Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, llvm@lists.linux.dev, Shuah Khan References: <20230912-kselftest-param_test-c-v1-1-80a6cffc7374@google.com> From: Shuah Khan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.6 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_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 26 Sep 2023 13:39:33 -0700 (PDT) On 9/26/23 13:02, Mathieu Desnoyers wrote: > On 9/26/23 08:20, Justin Stitt wrote: >> Ping. >> >> Looking to get this patch and [1] slated for 6.7 which fixes some >> kselftest builds on older kernels. >> >> On Wed, Sep 13, 2023 at 6:03 AM Justin Stitt wrote: >>> >>> When building with Clang, I am getting many warnings from the selftests/rseq tree. >>> >>> Here's one such example from rseq tree: >>> |  param_test.c:1234:10: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid) >>> |   1234 |         while (!atomic_load(&args->percpu_list_ptr)) {} >>> |        |                 ^           ~~~~~~~~~~~~~~~~~~~~~~ >>> |  /usr/local/google/home/justinstitt/repos/tc-build/build/llvm/final/lib/clang/18/include/stdatomic.h:140:29: note: expanded from macro 'atomic_load' >>> |    140 | #define atomic_load(object) __c11_atomic_load(object, __ATOMIC_SEQ_CST) >>> |        |                             ^                 ~~~~~~ >>> >>> Use compiler builtins `__atomic_load_n()` and `__atomic_store_n()` with >>> accompanying __ATOMIC_ACQUIRE and __ATOMIC_RELEASE, respectively. This >>> will fix the warnings because the compiler builtins do not expect their >>> arguments to have _Atomic type. This should also make TSAN happier. >>> >>> Link: https://github.com/ClangBuiltLinux/linux/issues/1698 >>> Link: https://github.com/ClangBuiltLinux/continuous-integration2/issues/61 >>> Suggested-by: Mathieu Desnoyers >>> Signed-off-by: Justin Stitt > > Reviewed-by: Mathieu Desnoyers > > Peter, should this go through tip ? > > Shuah, should to go through selftests ? > I can take this through selftests and apply it - hoping there are no conflicts with what's in Peter's tree. thanks, -- Shuah