From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B54CE18CC02; Thu, 29 Aug 2024 12:01:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724932908; cv=none; b=UiGwoT0fC0j/KMUH3WtzPVHMzQU6kkLOpgq0pEwBEQs/EzkJkurlWEGwZ/CKv/q+Vyaytr2yKdmhbIARG96V7AfWLNE5MjOa+/aj1p2f5wIs4INa4kSPVKDNrNKnj0P1upFvF89Eu8kj0VaaQNJS0Xko7CmjQ+dKSaanFMVzfMg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724932908; c=relaxed/simple; bh=4mJjWETIZmbDstqAvIMhzLQse09kCQvTp1m1O7h/UN0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WQf8oHjmE8va2H8WfHUEdfzVXP6KlnT1TeQIy7VaUwAiYaRL1Ne4xKOZy+QJm4neKTpUZEka5AUavxTTB0TTJ2PJpe9jytouxrS2izFir/h2BKUj6Zg9XfCc+zVYF0ksryNYYV+0y1AKI6QNio9TsvT7nvA3rM3CkIynizUkXG0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 822E2DA7; Thu, 29 Aug 2024 05:02:05 -0700 (PDT) Received: from [10.1.196.72] (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 604163F762; Thu, 29 Aug 2024 05:01:37 -0700 (PDT) Message-ID: Date: Thu, 29 Aug 2024 13:01:35 +0100 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] random: vDSO: Redefine PAGE_SIZE and PAGE_MASK To: Christophe Leroy , Arnd Bergmann , "Jason A . Donenfeld" Cc: Theodore Ts'o , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Linux-Arch References: <0f9255f1-5860-408c-8eaa-ccb4dd3747fa@csgroup.eu> <17437f43-9d1f-4263-888e-573a355cb0b5@arm.com> <272cb38a-c0e3-4e6e-89ce-b503c75c2c33@csgroup.eu> Content-Language: en-US From: Vincenzo Frascino In-Reply-To: <272cb38a-c0e3-4e6e-89ce-b503c75c2c33@csgroup.eu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Christophe, On 27/08/2024 18:14, Christophe Leroy wrote: > > > Le 27/08/2024 à 18:05, Vincenzo Frascino a écrit : >> Hi Christophe, >> >> On 27/08/2024 11:49, Christophe Leroy wrote: >> >> ... ... >> >> Could you please clarify where minmax is needed? I tried to build Jason's master >> tree for x86, commenting the header and it seems building fine. I might be >> missing something. > > Without it: > >   VDSO32C arch/powerpc/kernel/vdso/vgetrandom-32.o > In file included from /home/chleroy/linux-powerpc/lib/vdso/getrandom.c:11, >                  from : ... > > >> >>> Same for ARRAY_SIZE(->reserved) by the way, easy to do opencode, we also have it >>> only once >>> >> >> I have a similar issue to figure out why linux/array_size.h and >> uapi/linux/random.h are needed. It seems that I can build the object without >> them. Could you please explain? > > Without linux/array_size.h: > >   VDSO32C arch/powerpc/kernel/vdso/vgetrandom-32.o > In file included from : > /home/chleroy/linux-powerpc/lib/vdso/getrandom.c: In function > '__cvdso_getrandom_data': > /home/chleroy/linux-powerpc/lib/vdso/getrandom.c:89:40: error: implicit If this is the case, those headers should be defined for the powerpc implementation only. The generic implementation should be interpreted as the minimum common denominator in between all the architectures for what concerns the headers. -- Regards, Vincenzo