Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6732370ybc; Thu, 28 Nov 2019 04:34:58 -0800 (PST) X-Google-Smtp-Source: APXvYqxySMvf9F1JfdncNL0FaNuMVA8Tc7a/x1dHRtXgidD2LVKJGPrxFep+/MRLNjuaRrSh17vw X-Received: by 2002:a17:906:bb03:: with SMTP id jz3mr31376452ejb.314.1574944497909; Thu, 28 Nov 2019 04:34:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574944497; cv=none; d=google.com; s=arc-20160816; b=eA9MjYMCv6F9eO8bZquTfXvJAHQin4PM2AS6Y9QL+uiXPkBE9q97A4ovp4cN3rq4Q2 JGwZ4Li+Huou0agnbkPg4scuENNATdYAWMlWB45qkRwxZe0JYGyLgtSzkhMdA+6Xkjyu o5Dx0DmF0O51kv4qycPfofct66QmmW0fd20mXptE7RRoM/b3kaEB1Pd9q2sKTbFCkQUM noDh5+9KeYZA0dwqZHKIyVpw8PzHA33Cjzi5KnCbSJISGLBZVTP4ZiIFUGFRp1Am2zdg vJtB/88qCLEVSC0OvKg9FVjyuYrvZIPdFZ8ssixHzWICYUZ0PzK//3/qoOqJPv1YmmHE 4zvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=tIp70kebePqIW6GMgmJLG0stkjm844/NZk1Ye36TnNM=; b=KO77guTsFNaKLJq62CzAIDaG4AqtLXxS0loBMk6D8D2LCeyT8X9tzeoaxNLWuB06xO BhUwBY9oKQlalGXaLLm+3lZgSBuZdNpsgcPZWQYpZ/Xm0D/eLqcrgd7ETlHqZh/IBUJI p0MBPa3WXmVqLJTw56Ci0jmvW1gZ8M18uctB6dUht3/9/M7lcnEY8TJamHntVYdfVVir Gqgy+77xd98EO49keQSzw1KaTd5dShmCGOBz4fqyi/esZqiU/L6Mn2drX+Mvjayuv/tI lxcpwMMt9t5tlSmnNwc71Ih9UlhdcJgG98vfrcWRuutZ+M/vt3MOBVJIhuzDzQKGD5sq aqrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@goldelico.com header.s=strato-dkim-0002 header.b="AwmM/gQX"; 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 n11si895666ejs.314.2019.11.28.04.34.33; Thu, 28 Nov 2019 04:34:57 -0800 (PST) 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; dkim=fail header.i=@goldelico.com header.s=strato-dkim-0002 header.b="AwmM/gQX"; 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 S1726633AbfK1MdV (ORCPT + 99 others); Thu, 28 Nov 2019 07:33:21 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.50]:30415 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726227AbfK1MdV (ORCPT ); Thu, 28 Nov 2019 07:33:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1574944399; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=tIp70kebePqIW6GMgmJLG0stkjm844/NZk1Ye36TnNM=; b=AwmM/gQXq8J/Xo21AapcPUuH4PQ05OpCPYWx/LRe/DytUPTILBez5vqV676T19A3XH ZZu/0uiHiVXha6ZETuvrKy8lJuiCwpZK4PzyeYDacWp+Ed2ITY7wrExgX5kwCIAKjqGo GX0kXmJhpfTwEqvy7pAAmnnK6Q3BVwn/bZ4xmLoHq4eCko1CuLpqT2V3wyBFPVMeomvl NKVdVoYoS2ER8rIOlf9jA4HH0Kw4dnJHRDniLyyKXFf+1nBW0dda0RF/0ZiTv20dMRoT getRWT+IdJD9e3ac7HLu2TFE3E3dgH2e2GTQw4rx+YmteLd4PmfTHiuLaBgmrSK4yHmQ Fx0A== X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj4Qpw9iZeHmAiw43upSE=" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 45.0.2 DYNA|AUTH) with ESMTPSA id y07703vASCXHJWi (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Thu, 28 Nov 2019 13:33:17 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: MIPS: bug: gettimeofday syscall broken on CI20 board From: "H. Nikolaus Schaller" In-Reply-To: <7b6275c7-ab2b-a647-6bf7-d5e1c4523c98@arm.com> Date: Thu, 28 Nov 2019 13:33:17 +0100 Cc: Ralf Baechle , Paul Burton , linux-mips@vger.kernel.org, Linux Kernel Mailing List , MIPS Creator CI20 Development , Discussions about the Letux Kernel Content-Transfer-Encoding: quoted-printable Message-Id: References: <18788C50-F29B-4BD7-89F6-B056FF490214@goldelico.com> <703DC004-96E8-463D-8870-3CC410FE1C5E@goldelico.com> <3190d1a4-96c4-1843-3ae1-bae3a97af9fb@arm.com> <8D151C34-41A1-4DFE-92D6-D1B27AEC8730@goldelico.com> <7b6275c7-ab2b-a647-6bf7-d5e1c4523c98@arm.com> To: Vincenzo Frascino X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vincenzo, > Am 28.11.2019 um 13:21 schrieb Vincenzo Frascino = : >=20 > On 28/11/2019 12:11, H. Nikolaus Schaller wrote: >>=20 >>> Am 28.11.2019 um 12:51 schrieb Vincenzo Frascino = : >>>=20 >>> Hi Nikolaus, >>>=20 >>> On 27/11/2019 13:53, H. Nikolaus Schaller wrote: >>> [...] >>>=20 >>>>> vdso_data and mips_vdso_data before are not part of the ABI hence = they are not >>>>> bind by a contract with the userspace. >>>>>=20 >>>>> This means that they can change at any point and if a userspace = software relies >>>>> on a specific layout of these data structures is doing something = wrong. >>>>=20 >>>> Maybe the libs are clever enough to find that out dynamically but I = have no >>>> idea about how gettimeofday() and user-space VDSO is implemented to = handle such >>>> changes. >>>>=20 >>> As I said userspace applications and libraries should not rely on = the layout of >>> vdso_data because this is not part of the ABI. >>>=20 >>> The only thing that userspace requires is to "know" that = gettimeofday() exists, >>> than it is gettimeofday() that internally accesses the data = structure. >>=20 >> Well, with user-space I include the lib that provides the = gettimeofday() syscall >> and reads out the memory region where the VDSO data structure is = provided by the >> kernel. And that part comes from Debian. Somehow it does differently = with 4.19 >> than 5.4. So I summarise all non-kernel code with the term = "user-space". >>=20 >=20 > The the lib that provides the gettimeofday() changes accordingly with = vdso_data. > 5.4 and 4.19 have 2 different vdso libraries as well. Yes, that is what I have assumed what happens. How do these libs go into = an existing and working root-file-system with Debian Stretch? Is it part of the linux kernel tree so that some make option can build = it and we can install it like kernel modules (sorry for these beginners questions. I = never did care about VDSO before I ran into this problem)? Is there a mechanism that Debian Stretch knows about the newer library and can automatically find out which one to install. This is what I mean with breaking user-space ABI. Or must the user know about that and do a manual install of the vdso = libs from external sources? If that is the case there should be at least a CONFIG option to provide = the older vdso_data or the option to completely disable VDSO for = gettimeofday() so that the library falls back to a traditional syscall. BR and thanks, Nikolaus