Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp14302325ybl; Mon, 30 Dec 2019 07:39:25 -0800 (PST) X-Google-Smtp-Source: APXvYqzJoTo9ZQX25TvGGDlBh43rWuopjWgFTsJjZ7T/PA5bikB/ZIe1oeO73/IUvY3nxfNlx7Ib X-Received: by 2002:a9d:369:: with SMTP id 96mr66938890otv.228.1577720365648; Mon, 30 Dec 2019 07:39:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577720365; cv=none; d=google.com; s=arc-20160816; b=MBCJXfpfC2sdATSKakrSNBBXCY6TuCK/MSfkM+p1IoMqnM7IxucVzh1p4x1NU6FZMb mqBqEHYrfsHXgJ8+15ztaOA+EzUz78iHraVXx2b8FI8dcXcVW8Rp5vDjT/vYLPmTobUT LKBItVCfwSPQf51j5MzQlIFsRRaJP0BJMECaiLljS1WZMNIKgARPAIsITKHxJ4E1zMAV B1MMQ7xuaapmBn00gyHIvcM2ck4TSDZoKUB3fr8vZCHrPDQaiVvjZWi5+aZTUfqRyoUN FMHX+CW+TNTRuPv5SLWv8x4TF5f8URsiG4rjiITLoXxhSJkiT0XN4y5rCipLR+bmkxw+ NpAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=96kOgeS/odDpP3NuZOL+yFJEML49lnpInys5NvPD25E=; b=FoeySYMb3X0/HCNyIBTqgu3acVM++GEZj6TNO8XYb0RFnG2OsbL2Kd+y24AUmHLtVP i3BvEO3nubQXaUx3baZULGHWxjCeVekSkazWGBVBzz3eSFSOlQCpKgGzgpC/3NriKMjI tKbDGaIFo76MDTo20nkh34ElOhYLio9tY3cqI3zoxFE5YVM2hJldhv1JgxV64BiF1Y5F lyg20C4Q263PvpVeyNc+NOKm/HdqZMmCJFBQlm+PGxRJQgV7Mv/jsS3R9+M4ME59Kvq8 Jh92bqpxq+wsiCtxfShQS5CyccqI7sefe8EmcjhwAggarUWTIjh0ncSQSRF/iUgJyDwZ FIzA== 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 m24si22630190otn.67.2019.12.30.07.39.14; Mon, 30 Dec 2019 07:39:25 -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; 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 S1727665AbfL3Phh (ORCPT + 99 others); Mon, 30 Dec 2019 10:37:37 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:46661 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727580AbfL3Phg (ORCPT ); Mon, 30 Dec 2019 10:37:36 -0500 Received: from mail-qk1-f174.google.com ([209.85.222.174]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1Mwwhv-1jer4f2qL5-00yOtG; Mon, 30 Dec 2019 16:37:34 +0100 Received: by mail-qk1-f174.google.com with SMTP id 21so26520112qky.4; Mon, 30 Dec 2019 07:37:34 -0800 (PST) X-Gm-Message-State: APjAAAVaIaHEIrUNGyN0Y4kEeCou8WO/8gfCFMrcLIQWfy9AqGwgLGEU i+jnzqkH0sAWA/6tN96OmqW+TvqAl1XuWgLLiHI= X-Received: by 2002:a37:84a:: with SMTP id 71mr53785544qki.138.1577720253491; Mon, 30 Dec 2019 07:37:33 -0800 (PST) MIME-Version: 1.0 References: <20191223130834.GA102399@zx2c4.com> <20191224135404.389039-1-Jason@zx2c4.com> In-Reply-To: From: Arnd Bergmann Date: Mon, 30 Dec 2019 16:37:17 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mips: vdso: conditionalize 32-bit time functions on COMPAT_32BIT_TIME To: "Jason A. Donenfeld" Cc: "linux-kernel@vger.kernel.org" , "open list:BROADCOM NVRAM DRIVER" , Paul Burton , Vincenzo Frascino , Christian Brauner Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:3VuDkPZFYgFaHU0oIkjMNwrhLMIaLqWAJIXGdTeGYKQqRxF/ows 4XeV52aq1yGuXIgtVfKMJRLeH7yOSawlHRKO/svup13oRcDTSvy7MIfkxyq7IZ4f+iD4lPd /4hgbcFqt0MbTH7LIzsAbyRIMKAhTkF5PUbEv1UCfhUJ8Tx3FJXi3JsBAHQWU986x8nGqHR QvfVrFlMVgEI6gn8KapBA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Uj1AguZpGKE=:NYlnUlsFB/NY4NAYNNlxQ9 4VHG1dVqJ3f/WdDfiY8lCQ+iTJEXfLrv8FKuOZMttBpag2pqd6KUhakinmtX4TaH+OoXtAT48 ynQehu4mScHDVdpr/u/IY8Chk2pSAT1Y5MVf1j0C0FQGKRV6PMSSyKf3GScL7qrJT5rUc0AEQ 2p0ppsTvCPIoaqOvyqv7PUIvtCuoQqWMpwpbDQCuD2szRHPp/fgWcJj3oeQJRrvlWJ16bCkOR SO6jp/sBt5snyGbL4W/oTDIyxLUNk3V75JuFntOoUU235ZAOWQSdl+6jCtDNkuNCZDebqPMW9 +fg/ADRpNp9OH81cSEtR8AfYGjdnzAJrn/8cNS4p+JB+zl3QTE4Z87163oSBE/6EYrnsH9KAs 8c0dYm6e7OVLIsx0FnZHiZ8ej0m8o1X/O0Rl/a7EOayGzeCYNElGNAW5e9R8AOK0tnsvZHF/a nXueLfsUdoOV0PKOKxSLJL5xIDH7dCAegXiNxfObeSJL57ozVgbKXtPt0I3hPPe8VP3FmwUqb UJX4HZ4v+3loBivKnqOgiLTQ4Kb6EP5RK1+UyqtXIXU0mD59/cWV0ujQbdDIxjPI4yaykJXwc pg2NqrkiGpXhtZnm7cIksdxPQ0DnqlE9GFS2oMHDy3Ye4MtCNJzkWlW5ztbqEY/4w99kKXCcz eK3PosLYgIdu2x1BjLd1Lkvyr3hrAwxKCpd2tZcWt1c15l5UYFAR/Q/QIKWzxFh+hpNm82M6T MdWk7GELhVpYF020jrO8rj+wzBtMMoqB5zC5NRJqHhmsWGY8AcoqW++7zYS3P8Q0fglHE9cPG QBlUxONzfa746VAUzIY+81Gbdeq2Cqw1Js/pFN88A5f731tak85cWN+7yKLBJ6gUf4WRPN1vq TZzHBi2XUerA9IOJ2GQw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 30, 2019 at 3:37 PM Jason A. Donenfeld wrote: > > On Mon, Dec 30, 2019 at 1:34 PM Arnd Bergmann wrote: > > > > - Why does it crash in the first place rather than returning -ENOSYS? > > There's a bit of speculation about this in the original thread that > prompted this patch (you're CC'd). > > > > > - How does it actually work if you run an application built against > > an old musl version on a kernel that tries to make this not work? > > Do you just get a random time (uninitialized user space stack) and > > work with that without checking the error code? > > Actually, your patch fails here. The ts struct remains as it was > before, filled with garbage. No good. My original patch in this > thread, though, does result in the correct value being written to ts. Ok, that is the intended behavior then, clock_gettime() needs to fail with -EINVAL or -ENOSYS here (depending on the libc implementation), and of course the data is not updated. Returning success from clock_gettime() on a kernel with only time64 support and a libc with only time32 support (or vice versa) would be a bug. Arnd