From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70694C433EF for ; Fri, 10 Sep 2021 19:10:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49314611CE for ; Fri, 10 Sep 2021 19:10:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232430AbhIJTLs (ORCPT ); Fri, 10 Sep 2021 15:11:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbhIJTLr (ORCPT ); Fri, 10 Sep 2021 15:11:47 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC8BAC061574 for ; Fri, 10 Sep 2021 12:10:35 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id t19so6007484lfe.13 for ; Fri, 10 Sep 2021 12:10:35 -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=O+kk743scj4vQ3QtINkHDre6/4jEJJ4749GFq5mUTx4=; b=eKLWgpcpn9OANXNGYiqnFDT13PZcMsJeDEn9Rs2myjv61X5TE9VAPYJ84lduvNrUtK AHqewLaLF8mTpfd2orazz1Y+fJBfxtZfondH5rrQjdsZyqV0w/4TdJrDX8LjxW0q44t/ ofLwcwjgnhW3kMy+wdI98byWSe/3UPzwO74AU= 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=O+kk743scj4vQ3QtINkHDre6/4jEJJ4749GFq5mUTx4=; b=I09bkvJMDztKe3qqRU5pCTrCvToqGSPsfzKS6nCVLPnZyrSdYLqixF704d8l1Pz+Sf 11NQwQ/4sOSmveA3IxQIFrH14kXEXhigB5AiCtYxyKWZyUfaqqz2m+uXBWkVahPC7P7L D268ddRWFOWZ0ru/GOyrh68ACX410Uf3fvIkyM2ZuN0uDewxOB/LGuI9OardgpAFz/gg QvZYopD0NHFHzZq863m1snDMWpZX7Q8eRclXLMaBVYEyRAAOz7DaXuFpLx9rvc+JMj0U kj5L91MoHUU56js/4hqWcXVG3DFPb2ypavVN1XRIYK1vUDN146+1koXeMWht158DwPOv OR6g== X-Gm-Message-State: AOAM531GLwn16mGuXKSLfuU92aYIMcg62XL5mt1JFEmGorwvzMhDC7Hd KfSS5PHiZQUl0HjHzBYYk5PbtKOOB4yXehBW3og= X-Google-Smtp-Source: ABdhPJwTeZD/9jaQhacEbQuZmoFp+2CAGhGdQOh+5BkCEzi7jUum1JkSBRW4XEtuHvNOS7gjxff6Uw== X-Received: by 2002:ac2:4103:: with SMTP id b3mr5054633lfi.685.1631301033830; Fri, 10 Sep 2021 12:10:33 -0700 (PDT) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id g2sm634917lfu.139.2021.09.10.12.10.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Sep 2021 12:10:33 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id a4so6041125lfg.8 for ; Fri, 10 Sep 2021 12:10:32 -0700 (PDT) X-Received: by 2002:a05:6512:2611:: with SMTP id bt17mr5149905lfb.141.1631301032359; Fri, 10 Sep 2021 12:10:32 -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:10:16 -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-fsdevel@vger.kernel.org On Fri, Sep 10, 2021 at 12:04 PM Linus Torvalds wrote: > > So only 'struct iovec' and 'struct kvec' actually have the same format > and can be used interchangeably. That was very badly and confusingly phrased. They obviously don't actually have the same format, and cannot be used interchangeably in general. But the pointer arithmetic works the same for those two union members, so for that very specific case (and _only_ that) you can treat them as equivalent and use them interchangeably. Al clearly understood that, but I just wanted to clarify my phrasing for anybody else reading this thread. Please don't use the iov/kvec members interchangeably in general. Linus