Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp335961lqg; Thu, 11 Apr 2024 04:48:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVBZl605M8nzMCYONd/h1gbRZBidscWQaq15K4W25JNxDRwyOW8K86DYxiQBJApf/t2VZbVOYXziFEoxPsV61qQEtOH1DhzPSq7uA0xg== X-Google-Smtp-Source: AGHT+IGdy7g3+txrky2f0lNd4fa1iYoF5vAClGhNdyYjK6Nc6PxIoM8UAIeTAyZUznD07xVjb4Fp X-Received: by 2002:a05:6a20:9e48:b0:1a9:5bb1:ba27 with SMTP id mt8-20020a056a209e4800b001a95bb1ba27mr5177209pzb.9.1712836101822; Thu, 11 Apr 2024 04:48:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712836101; cv=pass; d=google.com; s=arc-20160816; b=XOEFivwsF8Xuyrvv5q2ErKTmRtci8xLp9+JwYIdAAPjNhFnkRH13uS4ZoNcw/8vZst IdfDyr26S0vviG9vW8KWlku8r5icNFinOmrIRvXFB3Fuo6E+q9qgxj95cMRNFrYDVC1x 0aQXIW2bvR0NojQURZmAGGlQSZBi8/vfLyJ6UGJSqaLJWfdUAgI9NVXnSuQP6ONoZDMD 7T1unWrWKtjdP7HmvN8JHib4zeh6AkNv8D9TKxB1Fw1E23T8geVkyRu8fH1fy3hMTzJH +TiDZLQdgkCNhuSCi+6vJ16YeQdLn6YmRJjrqzQKIduWJR+ZP8eocUDXd1M0vzzRPuTQ SJjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:cms-type:content-transfer-encoding:in-reply-to:from :content-language:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature:dkim-filter; bh=WyXEhNFJX8cCdY/1UWO0DimgSzaVgdp9nexwZeY60z8=; fh=eEeVxkl7p+3LqAAQmpImwYUlAhO+4ZSPAYGN41d7yII=; b=anyFKOy0EXc8jYBpMwyf2OHUMgfRahbBDmhR4rQLIc12rxrGFgCLCZzc9ruNPvZWk0 Z0U4oZrNXH50oJQKS0st/93M1H7f1eJVJ1BnFSWHMX7/1FPT8UClvEjq0fgKhFzYpSxq J0pmsqzeohNF6cXrVvoMPnarQMmRF63xS3Rk3RGZzR7SCq8pxMwBV/rwq58dOLd9BEy5 MarYyiFd5WNg2UyPLgdevatfhSo0lckI3tL8WxyTy0MkBjpMgwJIst15l4kTSk505LEi OXrtN6FCB8uwkq83gXP0eaz9aVnXf+1t8BahWjoL7mnmTa9IhxGImhftfJDOFSDPTT5P Jkjg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=CK63IaK8; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-140378-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140378-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id fx15-20020a056a00820f00b006ecf01a3292si1244282pfb.208.2024.04.11.04.48.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 04:48:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140378-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=CK63IaK8; arc=pass (i=1 spf=pass spfdomain=samsung.com dkim=pass dkdomain=samsung.com dmarc=pass fromdomain=samsung.com); spf=pass (google.com: domain of linux-kernel+bounces-140378-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140378-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 739BC28AEFE for ; Thu, 11 Apr 2024 11:48:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B19D14B089; Thu, 11 Apr 2024 11:46:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="CK63IaK8" Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B47214B075 for ; Thu, 11 Apr 2024 11:46:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712836001; cv=none; b=q0XrcmmHerRMyHVYeEMK66HpcHsYr7OO7TId4EgbV5fL2ebt1xJXL+QUrFQlZ/IMqtGruY/T77gwUBAY9ACZQbTWukOBZ/h9yZFlh6z+jVPhI4qE1qC8DAmh8vz0FfwefYevFTZhcUmfpPddBKkrS+InJgDLx8uE0fp9SyUgVGc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712836001; c=relaxed/simple; bh=RTHIh7oCMEfUFywroWS2xBMj4Aot2ydEwhbe3+VnCCo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=jHNTc+FQO7U5dkZ6p0NumasbVs4ODYfXFhhRsLcdTZMDcOHwtaVI2MUyFFDTSC8p/wHogremnexKSE7vAc0+MOo77tcC8Sy9oxYv9zWjP/SLYz4R69bmlhroOHowbgFaouin4ADPzYxUrSbi2KeCLE/uzY/YRxvCxoNJXk9/pYU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=CK63IaK8; arc=none smtp.client-ip=210.118.77.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240411114048euoutp01a4a53acaa3770e2fdb9c59fe324fd89a~FNvKRv5R21513815138euoutp01V for ; Thu, 11 Apr 2024 11:40:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240411114048euoutp01a4a53acaa3770e2fdb9c59fe324fd89a~FNvKRv5R21513815138euoutp01V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1712835648; bh=WyXEhNFJX8cCdY/1UWO0DimgSzaVgdp9nexwZeY60z8=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=CK63IaK8L2KIiuqJw/OyeVa5Dob6sPhFp6WdmO5JoTv2UQkw2cOzUVweidXmYydqT DReV/hDL6MFNwl7eu062BukVbiSL7TPWUW9sRV6ZQo7mOMXnEPBsmzDjLvW3jCtMi4 pFhY46eGQITwKU8ZGhzPvXj1FZAf1dSbkfVqVr9A= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20240411114048eucas1p10a33e25b48904b1931490e0e8284d2d0~FNvKJ6o8s0584505845eucas1p1f; Thu, 11 Apr 2024 11:40:48 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 1E.22.09875.04CC7166; Thu, 11 Apr 2024 12:40:48 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20240411114048eucas1p21707a2d0bfb9c5a21f3e8aa76c0d82c1~FNvJ3iOv22178121781eucas1p2P; Thu, 11 Apr 2024 11:40:48 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20240411114048eusmtrp172d4ea35b1305d947e1edafc4d77f7d3~FNvJ2-IBj2476824768eusmtrp1A; Thu, 11 Apr 2024 11:40:48 +0000 (GMT) X-AuditID: cbfec7f4-131ff70000002693-11-6617cc402ae2 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 49.13.08810.04CC7166; Thu, 11 Apr 2024 12:40:48 +0100 (BST) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240411114047eusmtip1348ce548c09d291118fe5e8ed6c1b5fa~FNvJfYrM_2299522995eusmtip1O; Thu, 11 Apr 2024 11:40:47 +0000 (GMT) Message-ID: <528e184b-9cb1-40a7-b757-db11a852dd59@samsung.com> Date: Thu, 11 Apr 2024 13:40:47 +0200 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 2/4] timerfd: convert to ->read_iter() To: Jens Axboe , linux-fsdevel@vger.kernel.org Cc: brauner@kernel.org, linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk Content-Language: en-US From: Marek Szyprowski In-Reply-To: <1a1c00fb-c83f-44e7-bc6a-cfe52d780c35@kernel.dk> Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplleLIzCtJLcpLzFFi42LZduzneV2HM+JpBnumKFisvtvPZvH68CdG iz17T7JYXN41h83i/N/jrA6sHpfPlnpsWtXJ5vF5k5zHpidvmQJYorhsUlJzMstSi/TtErgy Th3sYC+YyVlxqus2YwPjDPYuRk4OCQETiZvfDzN2MXJxCAmsYJSYdPQhC4TzBch5vowJwvnM KLFwziFmmJaWs0+hEssZJY5snscEkhAS+MgosWC9PIjNK2AnMeHzK7AdLAKqEpt+zmaFiAtK nJz5hAXEFhWQl7h/C+IOYQEriW3PHoDViAjYSyy/tZcRxGYW8Jd4cr2ZBcIWl7j1ZD7YLjYB Q4mut11sIDangK3Exvkw9fIS29/OgTp0D4fEn/N8ELaLxJYjB1ggbGGJV8e3QP0vI3F6cg/Y yxIC7UD3/77PBOFMYJRoeH6LEaLKWuLOuV9A2ziANmhKrN+lDxF2lNjVPo8dJCwhwCdx460g xA18EpO2TWeGCPNKdLQJQVSrScw6vg5u7cELl5gnMCrNQgqVWUi+nIXkm1kIexcwsqxiFE8t Lc5NTy02ykst1ytOzC0uzUvXS87P3cQITDGn/x3/soNx+auPeocYmTgYDzFKcDArifBKa4mm CfGmJFZWpRblxxeV5qQWH2KU5mBREudVTZFPFRJITyxJzU5NLUgtgskycXBKNTA5WU11fJij aT9hUuvv4+5fbW5wljyzr8s/2XytfPnOuC7HDL2fX2WnxsmWLwjXks+MCd4lc+S1lfrr5zGu 8pL1046XF07OyhfQY9DOkw/vePqGZ66v7F3TdTN+rNi6WXSS16TsGau47xVPn57w16uhvfja 4uvx648wHPukLPPVvqNj2tPumJuHzvztkitQ/7VKYI3Ilv8Ke97yccdo7dWb0/q1cIf50Q98 XDfaJ9+UnNVq1mT+XuR66N2DehfW/mo/nfjrR+D9pD9s2wPef5vyMV3FenubTqcpFzeLztcF d34yeqT6vVmhZdxgtvf603ksO3lvvclzjO3rTbque9b7qKx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20240411114048eucas1p21707a2d0bfb9c5a21f3e8aa76c0d82c1 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20240411114048eucas1p21707a2d0bfb9c5a21f3e8aa76c0d82c1 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240411114048eucas1p21707a2d0bfb9c5a21f3e8aa76c0d82c1 References: <20240409152438.77960-1-axboe@kernel.dk> <20240409152438.77960-3-axboe@kernel.dk> <1a1c00fb-c83f-44e7-bc6a-cfe52d780c35@kernel.dk> Hi, On 11.04.2024 00:27, Jens Axboe wrote: > On 4/9/24 9:22 AM, Jens Axboe wrote: >> @@ -312,8 +313,8 @@ static ssize_t timerfd_read(struct file *file, char __user *buf, size_t count, >> ctx->ticks = 0; >> } >> spin_unlock_irq(&ctx->wqh.lock); >> - if (ticks) >> - res = put_user(ticks, (u64 __user *) buf) ? -EFAULT: sizeof(ticks); >> + if (ticks && !copy_to_iter_full(&ticks, sizeof(ticks), to)) >> + res = -EFAULT; >> return res; >> } > Dumb thinko here, as that should be: > > if (ticks) { > res = copy_to_iter(&ticks, sizeof(ticks), to); > if (!res) > res = -EFAULT; > } > > I've updated my branch, just a heads-up. Odd how it passing testing, > guess I got stack lucky... The old version got its way into today's linux-next and bisecting the boot issues directed me here. There is nothing more to report, but I can confirm that the above change indeed fixes the problems observed on next-20240411. Tested-by: Marek Szyprowski I hope that tomorrow's linux-next will have the correct version of this patch. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland