Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2576116rdh; Wed, 27 Sep 2023 06:51:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJNb7o/GPoDO4XJqPM9kiTkXqdq94fSqsRV+UufceIX1YjXzkL8Wo1XCHYX8bdZJlxP5Hy X-Received: by 2002:a05:6a20:12ca:b0:149:700e:f50a with SMTP id v10-20020a056a2012ca00b00149700ef50amr9166258pzg.29.1695822707449; Wed, 27 Sep 2023 06:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695822707; cv=none; d=google.com; s=arc-20160816; b=WTj60VOJ7pZ9HuzAAi3+e7bFl0uWJobOXJJFbA8Qvx1e19s8f8iL1MJC+5QRBmRWup I4vpInA00SBBDHQy64rqRyGE3y6xuf9ZoQfi1jNdTMg8PSyGfy3qrvkyVXqxQ5Miy7Wg VEd9dtIT3SRIPdUpL3K2rhobTWJZbuvDoWTUsG75jZ8EjP9foGWemkcPEOxsnKcDyfYv Z5JdMWs4N2Dv7odmMSYAaWju8wfs98/nZaoesQTl+QxU0ebYibHNpHgoonv+hTyJIuCa DhS2Q2a5n5K29rFKU8tHjkIf9QhLLIObJ+oK9KReCFsZnsGh4q8ngm20TsQiTcpZ2kg0 bCcA== 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=k0LsinjnQ0psiRqDV4BJbkShjH1QSE7MgPkz+IEjFHc=; fh=/AK24Uzwym5CSw0E2KV+dW67gaSdJYyF+w1F4irfr1o=; b=nb1r6nQAUZqm5mwZ6TC+kqTdCrWh/AP66HjI34eFk3iWOG9qKnRWztTFy7oHnVfOsg bXaG8f+oMC+KxZi+NRCa8jAb9Kf8u2pACovYnngG3kD/rs9SbZBctSTIGp/4HxnjZ7RQ vMtlXjN1zXpxwBUJRU3aP+D30hqQ8BZlGaNJDX5YC/e/BJ3NGoiAGAOD6NcYKGmgdHHk wXebQX36WJt55LvToLOyYh8bq6Mcbdg2wssnQSqcHmLPTH0OK9dIMQUTi0xZMoJvwgVv fake762ZjvmgRJR5o+Yh4V5KR7eGHbl2PiznN/MlUibdyO1DJnNm+FuUgTwAiTp4NRlN GziA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=P27TWAM7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id d19-20020a637353000000b0055b43079640si16291545pgn.707.2023.09.27.06.51.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 06:51:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=P27TWAM7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 2E095811F259; Tue, 26 Sep 2023 19:54:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233957AbjI0Cy3 (ORCPT + 99 others); Tue, 26 Sep 2023 22:54:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235000AbjI0Cw1 (ORCPT ); Tue, 26 Sep 2023 22:52:27 -0400 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 276E6659A for ; Tue, 26 Sep 2023 18:26:37 -0700 (PDT) Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-79fb8f60374so45089839f.1 for ; Tue, 26 Sep 2023 18:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1695777996; x=1696382796; 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=k0LsinjnQ0psiRqDV4BJbkShjH1QSE7MgPkz+IEjFHc=; b=P27TWAM76pouKVhn9k7uJh0d2mxC3rLFsCOMyLN740kl7yA3Tk0HiOW1c5W6/vxm6o VEzCjGWMZo90auylb5OiKB0raT2ZtqhqVO/EZn2N+ePDCIqcWmQNUIar9D7kGovSbhQJ EKH+Z0Ojbn34xLHt77dNfPCjCWR+lCDllm/+w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695777996; x=1696382796; 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=k0LsinjnQ0psiRqDV4BJbkShjH1QSE7MgPkz+IEjFHc=; b=jy1zah2+mse9NU4vTR9m7oVDq3Hlmk2k7Vyx0da+4aT3c3le5KD0QjzlXDIC1LvMMC zNfCpMeeEIXUEKEovlNJ8SEXh5fSx5aZ0Mz5tfjVz6oadXFAq9isC64mkZ4oSgJHNfS6 0JBsGsCsP1Q3WlSla30eSvZ00Cs++hNRXL0l9XNMTGTgXwGPQHwaYDztvxOmA8ikNvCc tbuKVL1uJoruk2Z7vXHIdzBqbAw0sE40DYeFaaqdKDKHBzOCkqPQmI7Nj4Nk7RVno5iI MhuAzpX/+TfhPGMdoCjp4JCn0tbn174q8RkIOQ/ZyRuwNChExdP2Q1s+n3e5F5L6wQ2B 28HA== X-Gm-Message-State: AOJu0Yx51hQFhZEYHQAR1eu1/yfQ53mGnD3cmhMYfkIANWu6l1R0e9nQ tBTXasKdC3NuTW8r/sIdNo9DHA== X-Received: by 2002:a92:cac7:0:b0:351:54db:c1c9 with SMTP id m7-20020a92cac7000000b0035154dbc1c9mr594374ilq.1.1695777996416; Tue, 26 Sep 2023 18:26:36 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id y3-20020a92d203000000b0034f3220c086sm2393099ily.12.2023.09.26.18.26.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Sep 2023 18:26:35 -0700 (PDT) Message-ID: Date: Tue, 26 Sep 2023 19:26:34 -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> <63dd7222-99dc-8e11-3a51-b132e4115ac5@linuxfoundation.org> From: Shuah Khan In-Reply-To: <63dd7222-99dc-8e11-3a51-b132e4115ac5@linuxfoundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Tue, 26 Sep 2023 19:54:33 -0700 (PDT) On 9/26/23 14:39, Shuah Khan wrote: > 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. > Applied to linux-kselftest next for Linux 6.7-rc1 thanks, -- Shuah