From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (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 8BD90311C2F for ; Wed, 15 Apr 2026 17:00:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776272416; cv=none; b=OHd91EaNBHBDVUIBlAb639XcozCn/iMzdp7LTGq8gEVjZSMihAVDSNCn0v1wG539Pq8/oHGuvnY+qJZqLWjLYAKif2xxq99h6P52sE37edurRpKGAk0s9NZ5FkTCFJuwAVKHDF2h6WN8b0K7XwTfmx8nUUB0rN5IwFPpiJ7+48s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776272416; c=relaxed/simple; bh=nzi1HHtfDV71bRX29+3AcoStwfZQheAuZopLgC+I7Cg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=W314ktbM1RAXHNFjuSWPy3CPig0CYz9VsFxT7HgqwbZG3oVADBDgSyoibFeGg+Cr21FpnmoR8yEKdkGSkKL7RIdC50yLZ7dcEKX20qsGqnJ//t8J9XHOc2JBqXCcLzBx4CC28uzsPe/MUqbCKVtMP6Jf4B14Demwdmydh/Nm0nI= 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=IvGpZFvo; arc=none smtp.client-ip=209.85.210.50 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="IvGpZFvo" Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-7dbec19732eso6224031a34.3 for ; Wed, 15 Apr 2026 10:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1776272413; x=1776877213; 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=i5d77tt5TvkIGtexHkqxR7t38NyTl4iqb3jFSGv4dj4=; b=IvGpZFvo5Rn0+gjz5ZV85Un8HRpzRMpIfmdmtznpSNyuIt6r5YH85bFf6LBJWwqveC GY5llSq88iud4sOGZ0f9y3BwluKLed8brWTcKWDhwycTlqAAGtq80wqPI117tsGHQRSM W+XbPwg+hYQvwg1RMg+zb98mZyTWtllyq7muo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776272413; x=1776877213; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=i5d77tt5TvkIGtexHkqxR7t38NyTl4iqb3jFSGv4dj4=; b=Pw1cM8jnzlF9iNDf8SCcfo6eACR/YyEJBSdeex5Rw+6MOgZmtAcn/eJP707MqBgH1x 0ypgl4zpqD98H6yrolCrFa4+ypNzV9LQz/jh1VyPotffP7dp8yMw52YLogLZsic6hQQd M8inz+llt7Dmsvq5p9fkaaP6jI6riu2EoFpwqF9uAearbuf8kOOLf1tUQyUVRaanf4A4 7U24q288LNvGmRSiKQ8BfM9Y8My5+6qVQG2b+Jj6+3Vh+DSTLvvUWUSWI2vbCVkBgykm pRtLWlD3Dzndv4u56EAd3vYbIiE8sOAXmofeXfFDkGdqL7H029MOdCkJX3Xy6yApiUgT JWUQ== X-Forwarded-Encrypted: i=1; AFNElJ/DhODEUTCoaRgPxgdjL9xEAUjonEJlEuBWD+XtJMhXDJb7cFwsYViC4ey6OfzA5oIuCUbEy4ul7UUXE98=@vger.kernel.org X-Gm-Message-State: AOJu0Yzje9WK8u8kcA1V2JWmhfZ6QaKBHTbnX5Tu3Y8rQgCNes/Jul+y hM1inu9+ABGzNeWKOuVpWZZ7t9K3z4VlsI/QpJ1rcqWY7J9wNeeXxxi8VnkTEV9Fx88= X-Gm-Gg: AeBDieuQAS2gBb9hdByeMKxowRVToGc8HPwVddRfvXg6eghoGlxkL5AwCg9taXv0zY0 wUM/9fhGAONjQjl1laHKEk4MQ9kB8t1bqZQxAyjUFLetJSob7XBFrW2BOSnQG0d2aJCUTju1WJ/ q/JuV56b+YdNV7brymkIICyiF6d/AB3wiUOz50TuZ6HSCVpJZL8eOgtmq886h/h8mfToQAiwZaj LheAu87SqJt4GET3UvD+fni4KaqB5NYsMitR7RY5pjsondPXpe28dwt4UtNYtqTbsISpaT+JR5r LDOXmR8YQOZzdmG7CyfQTzNDgU2xtRn3MM0wwZVhhckhlmHCH1/pHhSpMX0rXA2PheDL09U0Thg gh2NTp6y9nnlxx4Ues0pW5etY1+xqJVJgek/w5W14AgV/Hhz+E8PRtM9mLiKXT3KihWk4wnFUgp xxzzEK+YoxZrlQdEHT/JQXAeiPwzOJzqM= X-Received: by 2002:a05:6820:780f:b0:67e:2fcc:fa99 with SMTP id 006d021491bc7-68be88ef16bmr7464647eaf.55.1776272413372; Wed, 15 Apr 2026 10:00:13 -0700 (PDT) Received: from [192.168.1.14] ([38.15.57.99]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-6932e59dcc1sm1148123eaf.12.2026.04.15.10.00.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Apr 2026 10:00:12 -0700 (PDT) Message-ID: <52ced596-baee-451d-8696-3ae0e8054e19@linuxfoundation.org> Date: Wed, 15 Apr 2026 11:00:11 -0600 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: Duplicate headers in tools/testing/shared directory diverged - rcupdate.h To: Lorenzo Stoakes Cc: Andrew Morton , pfalcato@suse.de, vbabka@kernel.org, Marco Elver , Brendan Jackman , Suren Baghdasaryan , linux-kernel@vger.kernel.org, Shuah Khan References: Content-Language: en-US From: Shuah Khan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/15/26 10:50, Lorenzo Stoakes wrote: > On Wed, Apr 15, 2026 at 10:39:05AM -0600, Shuah Khan wrote: >> All, >> >> I am sending this email to you all because you touched tools/testing/shared >> and its sub directories and show up in > > We need to add these to somewhere in MAINTAINERS... > >> >> get_maintainer.pl -f tools/testing/shared/ output >> >> rbtree compile failed as it couldn't find urcu.h > > Presumably liburcu is not installed. > >> >> cc -I../shared -I. -I../../include -I../../arch/x86/include -I../../../lib -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined -c -o rbtree_test.o rbtree_test.c >> In file included from ../shared/shared.h:11, >> from rbtree_test.c:9: >> ../shared/linux/rcupdate.h:5:10: fatal error: urcu.h: No such file or directory >> 5 | #include >> | ^~~~~~~~ >> compilation terminated. >> >> This sent me down the path to look at the duplicate headers in tools/testing/shared >> especially rcupdate.h which is under tools/testing/shared/linux >> >> It appears this file is an exact copy of include/linux/rcupdate.h and now it > > $ wc -l tools/testing/shared/linux/rcupdate.h > 12 tools/testing/shared/linux/rcupdate.h > $ wc -l include/linux/rcupdate.h > 1196 include/linux/rcupdate.h > > Umm, no? My bad - I looked at diff wrong. You can ignore the duplicate headers stuff. > >> diverged. Why do we have these duplicate headers here in this shared >> directory - it appears they are out of date and lead to maintenance problems. > > Because they're not duplicates of one another? One is a wrapper around urcu, > your problem is you don't have that library installed. It would have been nice to find a different name for this header and also have some information about its purpose? It says nothing. /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _RCUPDATE_H #define _RCUPDATE_H #include #define rcu_dereference_raw(p) rcu_dereference(p) #define rcu_dereference_protected(p, cond) rcu_dereference(p) #define rcu_dereference_check(p, cond) rcu_dereference(p) #define RCU_INIT_POINTER(p, v) do { (p) = (v); } while (0) #endif That solved one problem - still seeing others: cc -I../shared -I. -I../../include -I../../arch/x86/include -I../../../lib -g -Og -Wall -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined -c -o rbtree_test.o rbtree_test.c In file included from rbtree_test.c:11: ../../../lib/rbtree_test.c: In function ‘rbtree_test_init’: ../../../lib/rbtree_test.c:402:17: error: implicit declaration of function ‘kmalloc_objs’; did you mean ‘kzalloc_obj’? [-Wimplicit-function-declaration] 402 | nodes = kmalloc_objs(*nodes, nnodes); | ^~~~~~~~~~~~ | kzalloc_obj ../../../lib/rbtree_test.c:402:15: error: assignment to ‘struct test_node *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 402 | nodes = kmalloc_objs(*nodes, nnodes); | ^ thanks, -- Shuah