Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp642763rwb; Thu, 1 Dec 2022 06:44:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf7REqkYpWMZR2/jpN6F9sju+vH9NERb/T41+xaFskDlFW9bceVc2JlJhOzUkM7wI98eB03m X-Received: by 2002:a17:907:c081:b0:78b:5182:7ffa with SMTP id st1-20020a170907c08100b0078b51827ffamr45684556ejc.244.1669905865760; Thu, 01 Dec 2022 06:44:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669905865; cv=none; d=google.com; s=arc-20160816; b=JDnaqYwbw2zKa0ZyfdvlXOFaRgQlIvzduO0OM4DPGUI/oUYLkwWv+zu8MkY4uTbl9H 8y7V3IxUwoG0Qav8k6YPOPje5IPcbN5wggWPzsqT2Kj8kRwddztBLsr1JzIJ0zzfGlUl xGvggmtbBw1yV4QP+suEGLbQMG+X9nqcqiQvuBIWiXoOSgfcQr2+X/3UwgkOk27gsYC5 4P0ojC3k/FYcWEHcCzuTy+OrV6j6ZJQOtjlVkD1glZgHWyWJujUQzZU249nWlrPRHsZM PmjSa5Z9MRiGFuay4af/PzDWQaZUz1kGCvUsOJ9Yd1K/W2wDQ0EW0YHtJO4kwABTjISa jSfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=JE0fhHfH7VWLK3JbBcGwJPNOe7/dfPlHGpiWVNcwUNU=; b=NucFjcg2KDkTaMZmkXqu3rbxerBfUcJ0kixk1mQ9RGxbkdZLshJ+XnffA/0ms+WL+t hCT0I6x6aAi80jXI/DuUbksP3tboYhTyTgraEoioeAp5jVWHDSjOu4+5zkWvoQw0Syo4 FXJ3z+4EFqCeEvd77Xgsr0yQcsygPXbZSwCCdNjasl0JaAkDKrnf0cfa2odlUpnsDtPq cDzuO0C6+XL0e9k3BvhwsIFf4vHLmo0J5ZcHh7F9Vubb1w/KF9y1vUXTiSXRW1PqZtP6 +h3XrQnqLSyVkjr/Vp6ESjcml0HEcwEwrj0uXcuu5r+R2UxEf0JprJBQJvP2StxzM6li VDAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qgFQOJUy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=zeCHvasj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt7-20020a1709072d8700b0076f0940cb28si4685509ejc.175.2022.12.01.06.44.01; Thu, 01 Dec 2022 06:44:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qgFQOJUy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=zeCHvasj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231631AbiLANr6 (ORCPT + 82 others); Thu, 1 Dec 2022 08:47:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231634AbiLANrx (ORCPT ); Thu, 1 Dec 2022 08:47:53 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D4C425E9F for ; Thu, 1 Dec 2022 05:47:50 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669902467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JE0fhHfH7VWLK3JbBcGwJPNOe7/dfPlHGpiWVNcwUNU=; b=qgFQOJUyPhr6v/eff/0V5ZPaFfPpGAXzyCfMMlCRFZhHoq8CfyitjTxfXiNummCaCMHMGs oYUvZPfDKTHbb6ptzkAyz8Kt+R9S07mNr2N5fiCJmKNy/3NznQL/g7wB5gyLpY0/UadOx5 GoB8oGTQNdHpHcTu6k3NDX/bnHMLSQ9+vbQfV4BA8s/PsUeShpiowDM2gVbbuy1kIJxic7 dUROpAlVt/PiSNUJ+KzrHFPvMjrKLWWy60EcVIqjs0YRh6uDmTUR4aqtxGoGmgVHpk/yoY ovW4gAMWxydq9Wc6JascjbiWYHOAcyXoDkorGQ2v62cEK7XT5w0J58BN9Kl7RA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669902467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JE0fhHfH7VWLK3JbBcGwJPNOe7/dfPlHGpiWVNcwUNU=; b=zeCHvasjzIxIzlHs7BeB3QWlSpv1LlC8GXs5M83XfEMJp7d4bt3IaU+So/MdS3ZbD1y60P MLJ4nEnpXUCKilAw== To: Jacob Macneal , linux-kernel@vger.kernel.org Cc: jake.macneal@gmail.com, John Stultz , Stephen Boyd Subject: Re: [PATCH] time: copy tai value (International Atomic Time, in seconds) to output __user struct in get_old_timex32(). In-Reply-To: <20221121055345.111567-1-jake.macneal@gmail.com> References: <20221121055345.111567-1-jake.macneal@gmail.com> Date: Thu, 01 Dec 2022 14:47:46 +0100 Message-ID: <877czbs0al.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jacob! On Mon, Nov 21 2022 at 00:53, Jacob Macneal wrote: > Previously, this value was not copied into the output struct. Previously has no meaning here. > This is despite all other fields of the corresponding __kernel_timex > struct being copied to the old_timex32 __user struct in this function. This is completely backwards. get_old_timex32() copies from the user supplied old_timex32 struct to the __kernel_timex struct, no? > Additionally, the matching function put_old_timex32() expects a tai > value to be supplied, and copies it appropriately. It would appear to > be a mistake that this value was never copied over in > get_old_timex32(). Sure, but the important point is that txc->tai is never used as input from userspace. It's only ever used as output to userspace, which explains why this never caused any functional issue. I'm not against this change per se, but the justification for it really boils down to: Make it consistent with the regular syscall Thanks, tglx