From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.groups.io with SMTP id smtpd.web11.1115.1585723367565984871 for ; Tue, 31 Mar 2020 23:42:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=vq1AUYaN; spf=pass (domain: linaro.org, ip: 209.85.128.66, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wm1-f66.google.com with SMTP id t8so1907940wmi.2 for ; Tue, 31 Mar 2020 23:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lEizhkVd9GaexChddtefoMUqyI818JfCqsDHDgH61wU=; b=vq1AUYaNN7JcDWWCKlxX3YHXm1VK+R9IDV/w3AOJkzL6aFIOu3Aix8OLuqpkzjwAqu ES2rrbMvs+qpPxeo6XAyPP4DQ7ngF981IxyuMzQ61j8siFALMX1ZsLxGLeYmDnhBGp1u /TEAXzEqXqXLSMCVoZ1uCQEBrJ5KKTpwlcLBJx/Y96q6JQZxJHiYpv3hIzintQjjc860 df+aBDBiB0d5KL8r7U+KSSF3tdqxcWItUP6vT86GF8Niyo+lAZO8Z8R8aLKo+EO7do5c q6o+BdOXw0mtRD+mP32ntnPE6Pyqoe5e70qtPlrF2Wlj7PaC1Gv0+FdeE0Wyq/vcKWYL HXsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lEizhkVd9GaexChddtefoMUqyI818JfCqsDHDgH61wU=; b=FyWWyvbyi4hW7+nqC+wZ55SEHOV5fKGRKLw95DOrmsdQvbo8gT2u0pu/JJ2NNypE9j CcmrONV9N7vIKA0z5nWDi2I4OHXZYBWOTOMWru3LLHIIrFjjKJAvuYFgrlTzrculbKxR 0i81hhdJmxASAAgCghzLDqXhZTtEN384nZZu7ut+2xsLdBAH1Q8M18XDYoCEw+MBxoT+ l2bJf8ouzBjnkYjkvEPW8YyFgupfCxBI2S2ifcZ8kHkjJDMujYd0bfaN8Bn9I4BXUsUk 5rvpW6E+7g/u2OOqW8jAfIJvoE4LZHmnjdEY1S/PDlar9M3YU+vlKhDbz2kmnxX8pTNL A/ew== X-Gm-Message-State: AGi0PubaX/lUQ2J2GXGytJgA49ezxd3P151u9QXFMX6Osjf680o5FrfI Eb/ilTSohN9CzRb8QjsdjQVm+rr1b0TFHDbx4G815w== X-Google-Smtp-Source: APiQypKnvPHwUnnyQ5/tmbTTNQnFrXM7VWD6y+5VLn+Jf87y23e8XHASfNhBBxY60tEZ2ve6Pmtx2MjUjC4KuF9ljAs= X-Received: by 2002:a7b:c050:: with SMTP id u16mr2884326wmc.68.1585723365961; Tue, 31 Mar 2020 23:42:45 -0700 (PDT) MIME-Version: 1.0 References: <03f18a49-6bd6-e753-e1bf-7e061d13f200@redhat.com> <14537.1585603662366515487@groups.io> <276d435b-4d94-0899-9710-1584d7baeb3c@redhat.com> In-Reply-To: From: "Ard Biesheuvel" Date: Wed, 1 Apr 2020 08:42:35 +0200 Message-ID: Subject: Re: [edk2-devel] [PATCH] CryptoPkg/FltUsedLib: Add FltUsedLib for float. To: "Kinney, Michael D" Cc: "devel@edk2.groups.io" , "lersek@redhat.com" , "macarl@microsoft.com" Content-Type: text/plain; charset="UTF-8" On Tue, 31 Mar 2020 at 16:36, Kinney, Michael D wrote: > > ARM and AARCH64 have a compiler intrinsic lib that is linked against all modules. > > [LibraryClasses.ARM, LibraryClasses.AARCH64] > # > # It is not possible to prevent ARM compiler calls to generic intrinsic functions. > # This library provides the instrinsic functions generated by a given compiler. > # [LibraryClasses.ARM] and NULL mean link this library into all ARM images. > # > NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf > > Can we use this same technique for IA32/X64 VS builds? > In my opinion, having these intrinsics libraries added via NULL library class resolution was a mistake to begin with. Every component that we build incorporates some kind of startup code library that defines the _ModuleEntryPoint symbol, and it would be much better to make those libraries include an IntrinsicsLibrary dependency that can be satisfied by arch specific versions that also encapsulate the toolchain dependencies (such as this _fltused symbol, or memcpy/memset on ARM/GCC). On another note, it is still deeply disappointing that we need to jump through all of these hoops because the *only* single use of floating point in OpenSSL is the entropy estimate of an RNG, which is in the range of 0..1023 to begin with [IIRC). Remember that we also have a softfloat submodule for 32-bit ARM, for the same stupid reason. If we could stop pulling in that part of the code (or replace it with an UINT16 when building for the UEFI target), the whole floating point issue would mostly go away AFAICT.