From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mx.groups.io with SMTP id smtpd.web10.407.1676655100512249217 for ; Fri, 17 Feb 2023 09:31:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HSgn2dWq; spf=pass (domain: gmail.com, ip: 209.85.214.174, mailfrom: pedro.falcato@gmail.com) Received: by mail-pl1-f174.google.com with SMTP id 19so2309291plo.7 for ; Fri, 17 Feb 2023 09:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=XogDS2ye1xrFniMLDQStQ81iTFfYdM3qNAwgp22neW0=; b=HSgn2dWq9PiWGNRw8QGs4UcRrhueSLWaOMqgTP7eeKrtmmzDUZl0YqAnSSJPgiTl4/ OlcF4RyyDWEwSEaGUv11rfEHhKLr3QHRI4VAzCfX/kQuko6ruChZWjaUkEpX/Xp+NZFr YbwT8h7D9zenCWhGc3aWk93uWBFcio4U2Ah0CMYCh3f2D6AhhZQdgipGRYxSoStC9Ucm LTKG7GOpnTP2up8bBUj/3QaVHzQteVipTXgH//cyhZdWiOB3cuUh1wziRUPQyra0DqoN +WaaUeUMm2XoRwRae3lQlKJYKTnysey7Ujz7UYfNtcRmgOLTNmj8gDUDE6BP12c12NfO 1bRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XogDS2ye1xrFniMLDQStQ81iTFfYdM3qNAwgp22neW0=; b=E/4U8sM6fNagRqbizJu/IPOnmDUQi2im1vysYPdJ69H2p9unwNM+i0EJWWvZXYaygU jGlNjRx7+x9q9INmcu7ZbANA4Ax9PO7vvM58xrn+b4ZW02q309434T+P4y60mkUtR1bx UvWVkAZjfgF/H1D+t6OA3gzpcIGnTCkZ4f9jloXPs55arb4KgBGGCrgpQvlrXRkDoJLb oo6+zD+qsgP9GWuzGvepxxBfQJxqpO6jmwyzg/RIChKQnSkEtlHglRSCbx1h7vTm/q8g mRowrjYm6mBwgFkH2ISxcCOixjoHQYBmw9acusMMVjQAPMhLb5xTDz4LlLdnwU8u9Fnn yRLw== X-Gm-Message-State: AO0yUKWFi1JkDKwHyMFN194zQoZaCyKCQuC4FUujQ2NtfQXXsNu0PS9V xNy3Y3tfe3VTKl4CT6aZqC0h4yzML2My8qp1aF8= X-Google-Smtp-Source: AK7set915n2LdasRbnUhBImMxMQ1nzX3zEMfy8uA5aDUPGPIMj1PM2wxFGtTuD3nMgHURIlfWd39dgIIEJAy8AMZXfk= X-Received: by 2002:a17:903:25d1:b0:19b:20a5:c18a with SMTP id jc17-20020a17090325d100b0019b20a5c18amr353339plb.12.1676655099928; Fri, 17 Feb 2023 09:31:39 -0800 (PST) MIME-Version: 1.0 References: <2DE5E6BC-4AAE-4E31-91E2-B47B2F93DA43@posteo.de> <95DFC869-4A0A-4536-99F6-B8CDA151D433@posteo.de> In-Reply-To: <95DFC869-4A0A-4536-99F6-B8CDA151D433@posteo.de> From: "Pedro Falcato" Date: Fri, 17 Feb 2023 17:31:28 +0000 Message-ID: Subject: Re: [edk2-devel] [PATCH edk2-platforms 1/4] Ext4Pkg: Use depex for unicode collation protocols To: =?UTF-8?Q?Marvin_H=C3=A4user?= Cc: Ard Biesheuvel , edk2-devel-groups-io Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Feb 17, 2023 at 3:38 PM Marvin H=C3=A4user wro= te: > > > > On 17. Feb 2023, at 16:17, Ard Biesheuvel wrote: > > > > So the FAT driver will happily load, but then fail in an obscure > > manner when being started on a controller handle, in a way that is > > indistinguishable (afict) from a partition that has not FAT file > > system in the first place. > > > > So it doesn't look fine to me at all, tbh. If the collation protocols > > are required, we should check for them in supported(), and make a lot > > of noise in a DEBUG build if the failure condition is an unexpected > > one, i.e., some additional protocol we dependent on (even though we > > pretend to be a UEFI driver) does not exist. Hi Ard, Marvin, First of all, thank you for raising this issue and sending a patch. I had been quietly following the thread while trying to get my ideas straight. > > Right, I meant the approach to rely on the UEFI Driver Binding handling t= o defer locating UC, not the exact implementation. Sounds good. > > @Pedro What do you think? > I think deferring the Unicode collation init to Start()/Supported() is a good idea. I believe there's good value in keeping Ext4Dxe a UEFI_DRIVER. I was trying to come up with reasons why this would not work (in a general UEFI-spec sense, not only in Tiano, but for instance if you would ever want to plug this into i.e u-boot's EFI implementation). As far as I can tell, there doesn't seem to be any? At least from a PI PoV things should only get Start()'d in BDS right? And since other PI-unaware implementations don't know what DXE or DXE_DRIVERs are, it's not like that would fix those use cases. > > > > Alternatively, we might defer installation of the driver binding > > protocol implementation to a callback on the collation protocol > > installation, but that seems like more work for the same result. > > Agreed. +1 --=20 Pedro