Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13417014pxu; Sun, 3 Jan 2021 14:10:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfVi7hn7b1q+/1FLFrBDKMQEY15geztu3Cfcz42N5CmBXrTKbfJFsuk/ybHO9uqLjinepj X-Received: by 2002:a17:906:3999:: with SMTP id h25mr65408009eje.146.1609711802374; Sun, 03 Jan 2021 14:10:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609711802; cv=none; d=google.com; s=arc-20160816; b=KUuH704eocIFZXdUo7yHC1gb9yiKMwC3x6Q5Ix1bEIUmasGQBhM7uzXjtkehBkPbmA eca2gW2lwXRZ7Gf5PCeZqsRdvHZqfg2xfBjWoW6dzxz5/HTP5TFIggrJ57bRHt3J7nUU LrSqynz6aSdIxt3fWWrKSMPk6zNa4+hlREP18Usa3+JYFQeTfRrsTZBcSnQbCB1IBDCn GZcbOJrSi/6JsW7GkgOtbXKipfATohJVhrdAxrfLAUz2oDiGYUE5Iw10Nc5EbviTuZZh GiNJ/hNgaG3o0VAw/Nhdw/e1U2Azzg9GtV72IFRoHiNiv9LC23Auw10jKW8QNtE3Up20 SXcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IPkgGX+SKWseAA881v8oRHr85WnU1YqvzzzJRMs/71c=; b=R+ZcB1NTLBM5JTBBlmhl73zf11dCyZQs4GVTyOupuwChO9mm6ryb/cW0B180IkL3Uc /9oTJXRWuToXxcLhf0bvbQENtqQQJRLBWRXGyfFOIG1qwHGq45nooiviXQAfVznYnUeS 6BsIgFNF2hISIORFJQYlUgGjznn8exxKVnfg2hfboV5w+jma+D9xGep09p47QjU9H1Ac /5jtElyeaqhSQFqm0M59+VmGrPaTLOSiojf0KNr/c+U02cxJOYB9nU9cHpmYtnfO/fhg 8YEiV0BmGzD85ToaXLBEiY4ZMZ3nbDVRVTnaBeHmY9Vo9f3si0HKZd8kznWnKbFbO6ke XCEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=BdIKsHNT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si30392358ejx.183.2021.01.03.14.09.38; Sun, 03 Jan 2021 14:10:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=BdIKsHNT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726744AbhACWGd (ORCPT + 99 others); Sun, 3 Jan 2021 17:06:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbhACWGd (ORCPT ); Sun, 3 Jan 2021 17:06:33 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3842FC061573; Sun, 3 Jan 2021 14:05:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=IPkgGX+SKWseAA881v8oRHr85WnU1YqvzzzJRMs/71c=; b=BdIKsHNTHDDRsSDH1FUIo5CixW fHX/00nq5Thq2nVnXzL0YbgDHkdY/qDUQrsPMorvAXhHt5f1BNttlCATeR6jkTV0FQt9Ad0tTyx81 iaVc1Rav9ITLT5mVkawRsEsFACWkTUbVDvimQn3bx9NuKS9lGDdN2ZBIx7H0CMQaEigliabbWS3us MKtaOat9jms2jhHciwkXUhmGybyhT5rwm8RZqZLCE3lP0T13hvvW3rGT+R84cDbKfF16v4UPY22bV F7/McCtkUNeatMVFJXU/p1VsxkWYmcYc8j5afI+Gup+JbRXBxgjTv3BRlZDWwfpRW02m2hWNJ09S9 yYFmplGw==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1kwBUS-000Ogt-2m; Sun, 03 Jan 2021 22:05:04 +0000 Date: Sun, 3 Jan 2021 22:04:44 +0000 From: Matthew Wilcox To: Kari Argillander Cc: Konstantin Komarov , linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, pali@kernel.org, dsterba@suse.cz, aaptel@suse.com, rdunlap@infradead.org, joe@perches.com, mark@harmstone.com, nborisov@suse.com, linux-ntfs-dev@lists.sourceforge.net, anton@tuxera.com, dan.carpenter@oracle.com, hch@lst.de, ebiggers@kernel.org, andy.lavr@gmail.com Subject: Re: [PATCH v17 04/10] fs/ntfs3: Add file operations and implementation Message-ID: <20210103220444.GA28414@casper.infradead.org> References: <20201231152401.3162425-1-almaz.alexandrovich@paragon-software.com> <20201231152401.3162425-5-almaz.alexandrovich@paragon-software.com> <20210103215732.vbgcrf42xnao6gw2@kari-VirtualBox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210103215732.vbgcrf42xnao6gw2@kari-VirtualBox> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 03, 2021 at 11:57:32PM +0200, Kari Argillander wrote: > > + /* > > + * mirror of len, but signed, because run_packed_size() > > + * works with signed int only > > + */ > > + len64 = len; > > + > > + /* how much bytes is packed len64 */ > > + size_size = run_packed_size(&len64); > > Does (s64 *)&len work just fine? No. run_packed_size() is going to load/store eight bytes to/from that pointer. You can't just cast a pointer to a different size and expect it to work (it might happen to work, particularly on little-endian, but big-endian is going to get completely the wrong value).