From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aUSxX-0005VJ-12 for mharc-grub-devel@gnu.org; Sat, 13 Feb 2016 00:41:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUSxU-0005Ug-QF for grub-devel@gnu.org; Sat, 13 Feb 2016 00:41:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUSxR-0005B6-K6 for grub-devel@gnu.org; Sat, 13 Feb 2016 00:41:28 -0500 Received: from mail-lf0-x22e.google.com ([2a00:1450:4010:c07::22e]:36777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUSxR-0005B2-BE for grub-devel@gnu.org; Sat, 13 Feb 2016 00:41:25 -0500 Received: by mail-lf0-x22e.google.com with SMTP id 78so63236123lfy.3 for ; Fri, 12 Feb 2016 21:41:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type; bh=jTOg/1O6dJCYbA7pr76cYaX7lsduQxgDFEsvwOurMDE=; b=wIt18IG9QDK0X5CNAIeUbx7Igy3mPes8vZtQSlNDgi+rvKxuYUwprbNKWsbmpbeibe CxkkIrLf6oNufoxEXt5dlv1bu1xhJ18X/m6J7N0tBu6QOGJTA+rbiz7vke9FwJOt94AI Zh0oZnXen+aHYZX4/ESjiVaNiP9guz8kPQrkIfXCTxWBipoVAWYWS5p9Ipn1sRjR5ywk FCFAJqRh/vqgN73GtwuGU9ghWEjZEez+tW3ZXhsBhfe9rP/EWSPtH9v7vLYGXUZrzno2 BdtSGwqbcEa2Ee8w3e+YNfsN73hqg7vFmMbtYBiiy52DD3nrcdYgK7ng77DooZM+5R9l c8Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type; bh=jTOg/1O6dJCYbA7pr76cYaX7lsduQxgDFEsvwOurMDE=; b=IzlqXw6AoV1oy7VF47rV/aqWhnmTH5/K1lQ9UIPsP/RsQ/x/tg5+U8emr08m4n6Vn4 7U6svGf0gSSJHB+fgmHHuVEzhdOlN7LceGRkA8YBTW90iqDOCDpTnv4jgBd0pXNtxEms wXj9UfKRiwKp9SdbooQbqBLEImkcFJ9s5NciU7Q7ekEdoLWaKNXM9kkqtsPRoWyOvjQ6 h3W0VyLKo8A6ZvR26DYyubCe63Nc4M/toObHh+jkPjNIA8GrzpXBOqt9Egll7AHen1S4 uXl8s6i0TRsI2WF0Jh856Jp/OauxZ49FT/tY31JOYZvDyUbm7iMFFG8IuXbPUI9FboUE uujg== X-Gm-Message-State: AG10YOQ/U7jXPNmKxFRf7XpMppVsBmpaORr8KO6pmRy6sJ6VBUHcsYX2IVgUTsMBLKyvBg== X-Received: by 10.25.23.220 with SMTP id 89mr2371036lfx.49.1455342084539; Fri, 12 Feb 2016 21:41:24 -0800 (PST) Received: from [192.168.1.41] (ppp109-252-76-159.pppoe.spdop.ru. [109.252.76.159]) by smtp.gmail.com with ESMTPSA id mj4sm2280632lbc.19.2016.02.12.21.41.23 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Feb 2016 21:41:23 -0800 (PST) Subject: Re: [PATCH] efidisk: prevent errors from diskfilter scan of removable drives To: grub-devel@gnu.org References: <1454691380-8296-1-git-send-email-arvidjaar@gmail.com> <56BDEC31.30409@gmail.com> <56BDF101.80003@gmail.com> From: Andrei Borzenkov Message-ID: <56BEC202.2010100@gmail.com> Date: Sat, 13 Feb 2016 08:41:22 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56BDF101.80003@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3j8d4NXjC5OWxvfno8nuS85TOPkxV0WCa" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22e X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 05:41:29 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3j8d4NXjC5OWxvfno8nuS85TOPkxV0WCa Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 12.02.2016 17:49, Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF=D0=B8= =D1=88=D0=B5=D1=82: > On 12.02.2016 15:38, Andrei Borzenkov wrote: >> On Fri, Feb 12, 2016 at 5:29 PM, Vladimir '=CF=86-coder/phcoder' Serbi= nenko >> wrote: >>> On 05.02.2016 17:56, Andrei Borzenkov wrote: >>>> Map EFI_NO_MEDIA to GRUB_ERR_OUT_OF_RANGE that is ignored by diskfil= ter. This >>>> actually matches pretty close (we obviously attempt to read outside = of media) >>>> and avoids adding more error codes. >>>> >>>> This affects only internally initiated scans. If read/write from rem= ovable is >>>> explicitly requested, we still return an error and text explanation = is more >>>> clear for user than generic error. >>>> >>>> Reported and tested by Andreas Loew >>>> >>> I feel like we should be fixing diskfilter. Consider another case: de= ad >>> disk dangling on cable and returning mostly I/O errors >> >> Could you explain what do you mean? Removable media detection remains >> valid case and cannot be solved without low level driver cooperation >> anyway. If you mean some ratelimiting, this probably has to go into >> core, not in diskfilter, but it looks orthogonal to this patch. >> > I mean what if we have a legitimately bad disk unrelated to any > diskfilter VGs. If diskfilter is unable to read from it, it should stil= l > be able to assemble VGs and skip failed disk There is probably misunderstanding. There is no problem assembling VGs; diskfilter prints error and continues. The purpose of this patch is to suppress error print when there is no error (media not present is not an error when we scan for diskfilter devices). This was not as cosmetic because on boot from within menu it would stop telling user to press any key if there are removable devices. --3j8d4NXjC5OWxvfno8nuS85TOPkxV0WCa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAla+wgIACgkQR6LMutpd94xX9QCgqjnjJ9H2rjbQhpkQHnLIXrp5 J0kAoKvS9pfw5/ULIHyez216tlQRyhIG =MUyd -----END PGP SIGNATURE----- --3j8d4NXjC5OWxvfno8nuS85TOPkxV0WCa--