Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2492904ybh; Mon, 16 Mar 2020 04:22:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuSNi29k2BGTA4jsN1jKA7+T8QJJ7gwLeaaLZpfhb/z/xrJv1p5DIb5N3fGmdoGIA0G1t2F X-Received: by 2002:a9d:3435:: with SMTP id v50mr20561916otb.19.1584357761138; Mon, 16 Mar 2020 04:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584357761; cv=none; d=google.com; s=arc-20160816; b=RuKnNAJOc+pmz5SYMC27EFZnnHvboVN/VlTNkbd5qpMk9qHHL1QR697ipZO1WBZMsC PSyhpBFqV5wN0cRDfkJ1Y/cODu1PP/k28o9R+f32+4x7L0H5IJv1rso7iCZvGSptFFcM xXeI/2U6L3p7OnSYYaCIQWDOQ0j7WaOHuXRbC9oQprV+d9iQdlC0DSATLF/noaTg3IGE vtivXCo82RtGcy2DmDoweciqDVg3LxQ2NpH2E9gwqRWwt0UN8FPiWcoChq6yx0b12xCy Q/pUbva25DCj+VPz+0Lc050Q5B/5dJcYkwx2/z5yfCx1u59G9FtYs3QPVLJp16IPL7z3 us4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6XTPHTzj3u7TOm4TxpxF7v13zTVlviaVH6cgochZINw=; b=sX82jC253Lb4Vw7YqWRbfijJhH0Xn3fwnmL4h34unM2RWPpbEqp/zfXAQRF5CtpsC/ UkcT6KWzIYEY7f56TFDpVhwzfCHp5ueaWKMOHn1MS0dXTrvGWXEstmciAYzgb4iH5hxY fLuf/6hv2xPRd4JhLHL3oguSY/LLnbSNRpOHl0bhL0KimqYuhz1iErJV8lLTG1ozOamD +X5k+bmrH1REb8cMgc3gsy+9T0i0UEYoR/wUoPEVkg5Mpcc+BV7EzRb9gLW1pdRkFw1/ ocg4SQ0gL7zdY9N1Ek2hyBCJKbAKNWOjkDW+3xCw+b9oL71F33UjflzsE20dS7oY4Jcf BejA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4si9770717otk.132.2020.03.16.04.22.29; Mon, 16 Mar 2020 04:22:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730786AbgCPLWN (ORCPT + 99 others); Mon, 16 Mar 2020 07:22:13 -0400 Received: from foss.arm.com ([217.140.110.172]:46470 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730734AbgCPLWM (ORCPT ); Mon, 16 Mar 2020 07:22:12 -0400 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 A8FC430E; Mon, 16 Mar 2020 04:22:11 -0700 (PDT) Received: from mbp (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8238C3F52E; Mon, 16 Mar 2020 04:22:08 -0700 (PDT) Date: Mon, 16 Mar 2020 11:22:06 +0000 From: Catalin Marinas To: Vincenzo Frascino Cc: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, clang-built-linux@googlegroups.com, x86@kernel.org, Will Deacon , Arnd Bergmann , Russell King , Paul Burton , Thomas Gleixner , Andy Lutomirski , Ingo Molnar , Borislav Petkov , Stephen Boyd , Mark Salyzyn , Kees Cook , Peter Collingbourne , Dmitry Safonov <0x7f454c46@gmail.com>, Andrei Vagin , Nick Desaulniers , Marc Zyngier , Mark Rutland , Will Deacon Subject: Re: [PATCH v3 18/26] arm64: Introduce asm/vdso/processor.h Message-ID: <20200316112205.GE3005@mbp> References: <20200313154345.56760-1-vincenzo.frascino@arm.com> <20200313154345.56760-19-vincenzo.frascino@arm.com> <20200315182950.GB32205@mbp> <20200316103437.GD3005@mbp> <77a2e91a-58f4-3ba3-9eef-42d6a8faf859@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <77a2e91a-58f4-3ba3-9eef-42d6a8faf859@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 16, 2020 at 10:55:00AM +0000, Vincenzo Frascino wrote: > On 3/16/20 10:34 AM, Catalin Marinas wrote: > >> I tried to fine grain the headers as much as I could in order to avoid > >> unneeded/unwanted inclusions: > >> * TASK_SIZE_32 is used to verify ABI consistency on vdso32 (please refer to > >> arch/arm64/kernel/vdso32/vgettimeofday.c). > > > > I see. But the test is probably useless. With 4K pages, TASK_SIZE_32 is > > 1UL << 32, so you can't have a u32 greater than this. So I'd argue that > > the ABI compatibility here doesn't matter. > > > > With 16K or 64K pages, TASK_SIZE_32 is slightly smaller but arm32 never > > supported it. > > > > What's the side-effect of dropping this check altogether? > > The main side-effect is that arm32 and arm64 compat have a different behavior, > that it is what we want to avoid. > > The vdsotest [1] I am using, verifies all the side conditions with respect to > the ABI, which we are now compatible with. Removing those checks would break > this condition. As I said above, I don't see how removing 'if ((u32)ts >= (1UL << 32))' makes any difference. This check was likely removed by the compiler already. Also, userspace doesn't have a trivial way to figure out TASK_SIZE and I can't see anything that tests this in the vdsotest (though I haven't spent that much time looking). If it's hard-coded, note that arm32 TASK_SIZE is different from TASK_SIZE_32 on arm64. Can you tell what actually is failing in vdsotest if you remove the TASK_SIZE_32 checks in the arm64 compat vdso? -- Catalin