From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-il1-f178.google.com (mail-il1-f178.google.com [209.85.166.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4427B184F for ; Wed, 15 Jan 2025 00:14:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736900070; cv=none; b=Aa6+/8ZH5zVcK1bcoPdiY7/7GrXDBt0zimLucBu8Ppsn2fS12Gc/foghxPgPx2mMxlLJu253UmcusaiBd8ePNAbvxLdT5yUMgYCdflDBY7M6pbMu7cmDPwZCfVFr4Un5ariFoiCIqpyKHb5GJ90vMPk6CNxjqp8PXi5+6CTXqoc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736900070; c=relaxed/simple; bh=O0qTtB+zZrm/orJLyLqvBwYs4M10BzLG72XW5iJNl5Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lq3fAAOn5/+7vEht22HCkZ/bWiipaV+nfdc331q4wxVx0S5Pkpf2Fy/HgUMRf+UEfcAmu9npe9HTKqyHlZzRJiADt6U92wy3CPyK9PU0sQgypf1ttfuz3AXhZ0+BEQrBX35DMa4uxzn1+LuOA9BLSvmwZ8p2AImggv4TYVbMdFg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RI8Mfrd5; arc=none smtp.client-ip=209.85.166.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RI8Mfrd5" Received: by mail-il1-f178.google.com with SMTP id e9e14a558f8ab-3ce7a77e5a1so5550455ab.0 for ; Tue, 14 Jan 2025 16:14:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1736900067; x=1737504867; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Zi0cGbsSWcjei/FmFQ8GZN9F14dK0pBaQEx/pWI04A4=; b=RI8Mfrd5S/bzGrqS/l/e5sa4hEP9M4nsVbMGQNdBnEaKWIrvS7kqAyBNpTo6Kms7ZY Zb9jsyTz+x3oldUrri4Lc3ruKqf3wFhEK0a15kVPJp1GXrpJMcvwHAEMI+XBO2bj6wDg gfLIyKQ3GAj3vi7SlZA7IK9p5qUnehNlN726Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736900067; x=1737504867; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Zi0cGbsSWcjei/FmFQ8GZN9F14dK0pBaQEx/pWI04A4=; b=lYTQhbf0MkouCvuIiPI4lFSV8KYuYCvg/Jtx/qncu0qUzMP+W2JJRWN+3d8MHVHsx4 hWWw334ispVyK2FIjg538nELaN38k1t+Ss3VZ8tGKHR4L7dQhEyErZlqAJU56r+/RPKU TUn6IK1vr6JsRMOoVSGWYzUMhenrMOV2b9x52B3/Est+z3n9j2/vEDNFVGQSMYWNWE56 rGl9teifs1zi+VBj1Stoy0KhkEeGXk2ejC6UNqeZc7gUFi1qE5Qd4tcGmZFjM8AK2/lR VfHhZBIfHrVrxqdLfu+bE+AMysdSSg6GJ0fHtUJQ74WiGXVfmVpmynW/TrR/IITFNali Q2hA== X-Gm-Message-State: AOJu0YwOotq2SCrSQwz5eTKOu0j3jaRKshdqT6gMo8vKsddomrwp1ERs F/i+v5Q5kzpbRj6JVpHGVTeDtDsIKLSVcYJoTsHpAG4tMnyGV9tcD61DE1STGFU= X-Gm-Gg: ASbGncsdc69z7NMtnEy+OWHEQReP7jXyqEHkJpV1HufurM7beKPCbkMlQwsche9keoh sZDGrkZ4YnbKuTPSih9zD2tXqLwWAWlrQ5iyXV7Ju+x/2CZnM1fvAxkpjk3YZpOgMibvLg/1OzZ x2nfEO8dUN+PCR/R6z05dWnh601iCQ5IiENatRK8iTkA+y93b5uoWfgz3/wGLhb+nVKeOI+HgsN iVQbfNwaL9oselHMm12zrNcaUvspELXwm/bX0gmNMrOSdvVZhHqYToqYnOo6Qei86Y= X-Google-Smtp-Source: AGHT+IEdoNPbkBbn9CnzEh4euZf9jB75Vd6xeyvKGWpwgSFD4Lie6iDixMRv7ODFpjm5Wc+UzmRN6A== X-Received: by 2002:a05:6e02:1648:b0:3ce:78ab:d6be with SMTP id e9e14a558f8ab-3ce78abd778mr48881375ab.4.1736900067242; Tue, 14 Jan 2025 16:14:27 -0800 (PST) Received: from [192.168.1.14] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4ea1b5fa1efsm3741371173.26.2025.01.14.16.14.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Jan 2025 16:14:26 -0800 (PST) Message-ID: <9b7228cf-29ed-4f35-8b8a-b4f8482c434e@linuxfoundation.org> Date: Tue, 14 Jan 2025 17:14:25 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] selftests/rseq: Fix handling of glibc without rseq support To: Mathieu Desnoyers Cc: linux-kernel@vger.kernel.org, Raghavendra Rao Ananta , Peter Zijlstra , Boqun Feng , "Paul E. McKenney" , Carlos O'Donell , Florian Weimer , Michael Jeanson , linux-kselftest@vger.kernel.org, stable@vger.kernel.org, Shuah Khan References: <20250114145132.612569-1-mathieu.desnoyers@efficios.com> Content-Language: en-US From: Shuah Khan In-Reply-To: <20250114145132.612569-1-mathieu.desnoyers@efficios.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/14/25 07:51, Mathieu Desnoyers wrote: > When porting librseq commit: > > commit c7b45750fa85 ("Adapt to glibc __rseq_size feature detection") > > from librseq to the kernel selftests, the following line was missed > at the end of rseq_init(): > > rseq_size = get_rseq_kernel_feature_size(); > > which effectively leaves rseq_size initialized to -1U when glibc does not > have rseq support. glibc supports rseq from version 2.35 onwards. > > In a following librseq commit > > commit c67d198627c2 ("Only set 'rseq_size' on first thread registration") > > to mimic the libc behavior, a new approach is taken: don't set the > feature size in 'rseq_size' until at least one thread has successfully > registered. This allows using 'rseq_size' in fast-paths to test for both > registration status and available features. The caveat is that on libc > either all threads are registered or none are, while with bare librseq > it is the responsability of the user to register all threads using rseq. > > This combines the changes from the following librseq commits: > > commit c7b45750fa85 ("Adapt to glibc __rseq_size feature detection") > commit c67d198627c2 ("Only set 'rseq_size' on first thread registration") > > Fixes: 73a4f5a704a2 ("selftests/rseq: Fix mm_cid test failure") > Signed-off-by: Mathieu Desnoyers Hi Mathieu, Can you double check these commits and make sure these are right ones in the mainline rc7? I am seeing "Unknown commit id" warnings on all of these - my repo is at 6.13 rc7 Also would you like to add Reported-by for Raghavendra Rao Ananta? thanks, -- Shuah