Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1718018pxb; Fri, 10 Sep 2021 12:08:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxd/jIIQ5huLso819/zKJQyLLddt8MEXzzG2ngRFFR/t1OllBuHYJJPlT80RUuVH515i8Hh X-Received: by 2002:a17:906:a01:: with SMTP id w1mr11229023ejf.117.1631300906485; Fri, 10 Sep 2021 12:08:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631300906; cv=none; d=google.com; s=arc-20160816; b=wnTeuvO9mQC6k2Yu2/rpfyy4R/IPBfmhtFAHPp2UqX4/ZyCyRaWqlCzwSxEViSSC2+ tbtYjUYrnzpImzkh5+KVRWYwtpgjM+SAPXTBaxRKlXEB+FOkQOkiJZGVZ5AkERMyaXLz Xk574OgC6n9IxjcOhOG3ZgNUb21S5GtBUXOZ9rhvLZxTSwmh/kijG4nUlM8Ey08EufS+ MryHwUDbKKGQtDh+ifrf0D9A+uZflw0Se4LrN64fuIv7LKF8M48+2P6S4wQ/1iJduC2v 6P5zGeYrw0JvC6dmgaEg2Hx771dEU2XeiIOslR8Wg88E5icXXwqTFocWFbk0m7cl6eQa seYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=4O05uObnyBd8PH14AaeRzOvwDNwVkRfGJ3V9bY0KSj4=; b=DJ31NKe0uV2PJX3UBcqCv68i92OhwDz4pyUrA5OxBIZZ632RG0c0UxTLwgrvtWgZdH iNe5xKPEcfxeOIcw1YbExTKwFEFXKeEJPs9R5BCfgbnYKXFVB/PfkTk8g3X/x/frc4jz xYKDALiXwz7kGeKtzs4TcisRLGVf4q/CjlqptBSqKqpvg98qB0erbHPBK9qEphh30Dnm tHFskRyolcwgeGbZC2n8MH6CFr5yfc8dg5vySkuCXjc3PxH5q86XedKx8CjoIIwKNFE2 /V/dlUl4eXexSecJMsdhzTS62VCg13snu+DL5jpQwzvGd1u6d2UQ4pZattqA8Mh8OoTu YadA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=dyot85lo; 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 4si6018489ejj.133.2021.09.10.12.08.02; Fri, 10 Sep 2021 12:08:26 -0700 (PDT) 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=@linux-foundation.org header.s=google header.b=dyot85lo; 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 S232649AbhIJTGA (ORCPT + 99 others); Fri, 10 Sep 2021 15:06:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbhIJTF7 (ORCPT ); Fri, 10 Sep 2021 15:05:59 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01E20C061574 for ; Fri, 10 Sep 2021 12:04:48 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id y6so4811417lje.2 for ; Fri, 10 Sep 2021 12:04:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4O05uObnyBd8PH14AaeRzOvwDNwVkRfGJ3V9bY0KSj4=; b=dyot85loehJbv+eVFq+4pRTmOI6g66axvC+prdc/KMvKaC+OmGvGJzdh3SbOZFYJ9B ezVjDR53MEUi5CkQqphuyQMH2kKjGWc8Dfqp624haoOJ8APcGryxYOZN3e5ec0SUTIw3 krnhSjrwdiL++OkN28kLN4UNuosylP3I3vyCc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4O05uObnyBd8PH14AaeRzOvwDNwVkRfGJ3V9bY0KSj4=; b=OySM9ylyLoDJHyXBI5ljf+SZrbUrXUTuttepv9Iwacbmw+TQ/pzosyVhjzyHy5YjRd L95ZQFjIT6Icphud2kjAmFhI7bRyqoNWn87SJ0SUzszweJpwZySpa8JySC3+3EdxaFKC RynxJ+lXJfJsxXR+Gd0A5rqMH5JYeXozsso3Oz09j3yE7F6gbkIEvUfvF8ltbM8xcsUN n1D3NihUvYIM4D9mkEEbld/DypoFNceTtl2f0DfR65xyoVXV3XWAqnp5FvyeqJD41zAL cFmiV498ihEMdhwVWP0FNjE1fjEdRYeyz8s1PxIDWFpdVOPytz7KmwCEYflLDPMEpkX4 ew0Q== X-Gm-Message-State: AOAM533B9/SACqeU+kJ5Tl/jjGAbArRJ6Aove/WPeKoAjjUBA9w6o4Fg 7Fpe98IYnTp3aar45CTBH56/qKrfTaz/7k0byPk= X-Received: by 2002:a05:651c:90b:: with SMTP id e11mr5368757ljq.172.1631300685987; Fri, 10 Sep 2021 12:04:45 -0700 (PDT) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id 3sm661229ljq.136.2021.09.10.12.04.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Sep 2021 12:04:45 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id h1so4761692ljl.9 for ; Fri, 10 Sep 2021 12:04:45 -0700 (PDT) X-Received: by 2002:a2e:b53a:: with SMTP id z26mr5064397ljm.95.1631300684824; Fri, 10 Sep 2021 12:04:44 -0700 (PDT) MIME-Version: 1.0 References: <9855f69b-e67e-f7d9-88b8-8941666ab02f@kernel.dk> <4b26d8cd-c3fa-8536-a295-850ecf052ecd@kernel.dk> <1a61c333-680d-71a0-3849-5bfef555a49f@kernel.dk> In-Reply-To: From: Linus Torvalds Date: Fri, 10 Sep 2021 12:04:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [git pull] iov_iter fixes To: Al Viro Cc: Jens Axboe , Pavel Begunkov , Linux Kernel Mailing List , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 10, 2021 at 11:50 AM Al Viro wrote: > > I think that sizeof(struct bio_vec) != sizeof(struct iovec): Ooh, very good catch. That would cause some *very* odd and subtle errors, since it just happens to work on 64-bit, and then causes very confusing pointer arithmetic errors on 32-bit. So yeah, that i->iov -= state->nr_segs - i->nr_segs; doesn't work after all, comment or not. So only 'struct iovec' and 'struct kvec' actually have the same format and can be used interchangeably. Linus