Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5069932pxv; Wed, 28 Jul 2021 02:17:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuWarYGoP+RMfP8gQzKgsfc4R25FAZuUAklRsBETeycvUCMW9JtjFPUpvCcZ7rG6ZlwLM3 X-Received: by 2002:a17:906:cb95:: with SMTP id mf21mr3535343ejb.484.1627463854647; Wed, 28 Jul 2021 02:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627463854; cv=none; d=google.com; s=arc-20160816; b=Ljtnh4yc3oo0iErBVXNKrF0QjEgXvqlGIA026DYhqFy04L5Avu/TOa2MrfTxKTK4Lb 7vPZfpJXxgPIxtYk3Lp81AQ/PfcOABHapUeb1OoIW6Z+lYEhkZ337gRPyrBvwfArNafi xR461vE4NTLaAAYDmsS+9LuBP2vAdj+nwQd/eyuW4J0ohIp09qcDm+lyDalwaUn/Wony wr+TaOBjfbvzX0K+UnSc5MuZJ5Tt08rxJxmnekieKczvb2g5E6Plje+TkA99fV1PNSBJ pipcAUjwFh/zmk7GPqHTi3Fblyx4sEqxIk9JXdopc2Xs0YbW9oDuHZzl8h+2Gtx9ap2K 6PYA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qM2pY3QQZ75N8NGvyWod3aePv3OhL3iSnbWaTNcX1vQ=; b=gXUL41TSKu2snwNKVMTgw7EU3kbPGWFKdldCsLrI/pFMP1smecNMSgePwqUTCmnJD0 3c9/nJVjBG1A8Jb6rZbBlrx9rxN/uODKYrLgDJT9+fzRBXZQQhySl69q0R6uO2CfnA3L +R4ezx9LyKEP2aV4I5w56Gs3/iMtTEzY4OZ0qnoO7QOm8XL4/p6mJYrUJqvLj8rcczJ9 2HkfYgvHFiz1Nlo0oH272tgfkueTidsu4QT8M7FjXe9TMOgzLDHZmwhwvjzEEyHlb9JT 83B2dwRaR8zqrbwZW+OyvEcTyxad/HOaXhTbOjovDcKXgm1kr1Qd/UKTDVk31Os6D8hf eQVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DvwMicki; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si5745880edv.472.2021.07.28.02.17.11; Wed, 28 Jul 2021 02:17:34 -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=@redhat.com header.s=mimecast20190719 header.b=DvwMicki; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235384AbhG1JOT (ORCPT + 99 others); Wed, 28 Jul 2021 05:14:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:20040 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235573AbhG1JOQ (ORCPT ); Wed, 28 Jul 2021 05:14:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627463654; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qM2pY3QQZ75N8NGvyWod3aePv3OhL3iSnbWaTNcX1vQ=; b=DvwMickiA2ljD/yAxLTpPEQFbyDhJH4qkeCvrg/lu824PiaRdJsHHKCtal+MJGjkAeWUWm Ua5mcy2JpSfvnlH+tUgZl6bqMFK3horKcBlTETksZhiWIdX8s99J6AMUteFOgCgEOPbNI+ pYTy+uTCL9YIaUb5zYp6mWYgHQ00StI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-24-koeJ_VBtMm6s37DXcy3xsA-1; Wed, 28 Jul 2021 05:14:10 -0400 X-MC-Unique: koeJ_VBtMm6s37DXcy3xsA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 442978010F4; Wed, 28 Jul 2021 09:14:09 +0000 (UTC) Received: from ws.net.home (ovpn-113-182.ams2.redhat.com [10.36.113.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EFF5C60854; Wed, 28 Jul 2021 09:14:07 +0000 (UTC) Date: Wed, 28 Jul 2021 11:14:05 +0200 From: Karel Zak To: Krzysztof =?utf-8?Q?Ol=C4=99dzki?= Cc: Jens Axboe , Sinan Kaya , util-linux@vger.kernel.org, linux-block@vger.kernel.org, Linux Kernel Mailing List Subject: Re: Commit d5fd456c88aba4fcf77d35fe38024a8d5c814686 - "loopdev: use LOOP_CONFIG ioctl" broke loop on x86-64 w/ 32 bit userspace Message-ID: <20210728091405.cqvkgv6c2vvsmacb@ws.net.home> References: <7de1bd0b-b8ea-daf0-b677-f92db1c1cdff@ans.pl> <72947cba-6a12-d54f-c9c8-588729631306@ans.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <72947cba-6a12-d54f-c9c8-588729631306@ans.pl> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 27, 2021 at 10:46:06PM -0700, Krzysztof Olędzki wrote: > So, to confirm - checking for both EINVAL and ENOTTY after LOOP_CONFIGURE is > the proper way of taking care this? > > https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/lib/loopdev.c?id=d4423cce9b9001c9de7ebc6f64f6cc2bb854944c#n1362 We need both to make losetup/mount robust for already released kernels. Fixed: https://github.com/karelzak/util-linux/commit/583990d25b5d65a9a9771a39d112de0ee16a1f3a Thanks for your report! Karel -- Karel Zak http://karelzak.blogspot.com