<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/firmware/google, branch linux-5.11.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.11.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.11.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-11-09T17:48:06+00:00</updated>
<entry>
<title>firmware: gsmi: Drop the use of dma_pool_* API functions</title>
<updated>2020-11-09T17:48:06+00:00</updated>
<author>
<name>Furquan Shaikh</name>
<email>furquan@google.com</email>
</author>
<published>2020-10-22T07:15:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=17adb469bf1ef3c62e9356ab84449df6cad28ed5'/>
<id>urn:sha1:17adb469bf1ef3c62e9356ab84449df6cad28ed5</id>
<content type='text'>
GSMI driver uses dma_pool_* API functions for buffer allocation
because it requires that the SMI buffers are allocated within 32-bit
physical address space. However, this does not work well with IOMMU
since there is no real device and hence no domain associated with the
device.

Since this is not a real device, it does not require any device
address(IOVA) for the buffer allocations. The only requirement is to
ensure that the physical address allocated to the buffer is within
32-bit physical address space. This is because the buffers have
nothing to do with DMA at all. It is required for communication with
firmware executing in SMI mode which has access only to the bottom
4GiB of memory. Hence, this change switches to using a SLAB cache
created with SLAB_CACHE_DMA32 that guarantees that the allocation
happens from the DMA32 memory zone. All calls to dma_pool_* are
replaced with kmem_cache_*.

In addition to that, all the code for managing the dma_pool for GSMI
platform device is dropped.

Signed-off-by: Furquan Shaikh &lt;furquan@google.com&gt;
Reviewed-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
Link: https://lore.kernel.org/r/20201022071550.1192947-1-furquan@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>efi: gsmi: fix false dependency on CONFIG_EFI_VARS</title>
<updated>2020-09-29T17:40:57+00:00</updated>
<author>
<name>Ard Biesheuvel</name>
<email>ardb@kernel.org</email>
</author>
<published>2020-09-23T08:18:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9846d86031eeca2fb2867fe4ac9d92803a97e8e4'/>
<id>urn:sha1:9846d86031eeca2fb2867fe4ac9d92803a97e8e4</id>
<content type='text'>
The gsmi code does not actually rely on CONFIG_EFI_VARS, since it only
uses the efivars abstraction that is included unconditionally when
CONFIG_EFI is defined. CONFIG_EFI_VARS controls the inclusion of the
code that exposes the sysfs entries, and which has been deprecated for
some time.

Signed-off-by: Ard Biesheuvel &lt;ardb@kernel.org&gt;
</content>
</entry>
<entry>
<title>firmware: google: vpd: Replace zero-length array with flexible-array member</title>
<updated>2020-06-16T04:08:21+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-02-21T15:32:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aa125f313d8e7d04bf001175dadeabaf8723c00b'/>
<id>urn:sha1:aa125f313d8e7d04bf001175dadeabaf8723c00b</id>
<content type='text'>
There is a regular need in the kernel to provide a way to declare having a
dynamically sized set of trailing elements in a structure. Kernel code should
always use “flexible array members”[1] for these cases. The older style of
one-element or zero-length arrays should no longer be used[2].

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://github.com/KSPP/linux/issues/21

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
</content>
</entry>
<entry>
<title>firmware: google: memconsole: Replace zero-length array with flexible-array member</title>
<updated>2020-06-16T04:08:16+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-02-21T15:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea9ee9976750b3d047141ebeb12ba92b634dfbef'/>
<id>urn:sha1:ea9ee9976750b3d047141ebeb12ba92b634dfbef</id>
<content type='text'>
There is a regular need in the kernel to provide a way to declare having a
dynamically sized set of trailing elements in a structure. Kernel code should
always use “flexible array members”[1] for these cases. The older style of
one-element or zero-length arrays should no longer be used[2].

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://github.com/KSPP/linux/issues/21

Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
</content>
</entry>
<entry>
<title>firmware: google: Probe for a GSMI handler in firmware</title>
<updated>2020-01-14T20:46:48+00:00</updated>
<author>
<name>Arthur Heymans</name>
<email>arthur@aheymans.xyz</email>
</author>
<published>2019-11-18T10:19:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e4924ee263b015cc2e397ca871d870925e2673b4'/>
<id>urn:sha1:e4924ee263b015cc2e397ca871d870925e2673b4</id>
<content type='text'>
Currently this driver is loaded if the DMI string matches coreboot
and has a proper smi_command in the ACPI FADT table, but a GSMI handler in
SMM is an optional feature in coreboot.

So probe for a SMM GSMI handler before initializing the driver.
If the smihandler leaves the calling argument in %eax in the SMM save state
untouched that generally means the is no handler for GSMI.

Signed-off-by: Arthur Heymans &lt;arthur@aheymans.xyz&gt;
Signed-off-by: Patrick Rudolph &lt;patrick.rudolph@9elements.com&gt;
Link: https://lore.kernel.org/r/20191118101934.22526-4-patrick.rudolph@9elements.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: google: Unregister driver_info on failure and exit in gsmi</title>
<updated>2020-01-14T20:46:48+00:00</updated>
<author>
<name>Arthur Heymans</name>
<email>arthur@aheymans.xyz</email>
</author>
<published>2019-11-18T10:19:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c6e7af0515daca800d84b9cfa1bf19e53c4f5bc3'/>
<id>urn:sha1:c6e7af0515daca800d84b9cfa1bf19e53c4f5bc3</id>
<content type='text'>
Fix a bug where the kernel module couldn't be loaded after unloading,
as the platform driver wasn't released on exit.

Signed-off-by: Arthur Heymans &lt;arthur@aheymans.xyz&gt;
Signed-off-by: Patrick Rudolph &lt;patrick.rudolph@9elements.com&gt;
Link: https://lore.kernel.org/r/20191118101934.22526-3-patrick.rudolph@9elements.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: google: Release devices before unregistering the bus</title>
<updated>2020-01-14T20:46:48+00:00</updated>
<author>
<name>Patrick Rudolph</name>
<email>patrick.rudolph@9elements.com</email>
</author>
<published>2019-11-18T10:19:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cae0970ee9c4527f189aac378c50e2f0ed020418'/>
<id>urn:sha1:cae0970ee9c4527f189aac378c50e2f0ed020418</id>
<content type='text'>
Fix a bug where the kernel module can't be loaded after it has been
unloaded as the devices are still present and conflicting with the
to be created coreboot devices.

Signed-off-by: Patrick Rudolph &lt;patrick.rudolph@9elements.com&gt;
Link: https://lore.kernel.org/r/20191118101934.22526-2-patrick.rudolph@9elements.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: google: increment VPD key_len properly</title>
<updated>2019-10-11T06:41:34+00:00</updated>
<author>
<name>Brian Norris</name>
<email>briannorris@chromium.org</email>
</author>
<published>2019-09-30T21:45:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=442f1e746e8187b9deb1590176f6b0ff19686b11'/>
<id>urn:sha1:442f1e746e8187b9deb1590176f6b0ff19686b11</id>
<content type='text'>
Commit 4b708b7b1a2c ("firmware: google: check if size is valid when
decoding VPD data") adds length checks, but the new vpd_decode_entry()
function botched the logic -- it adds the key length twice, instead of
adding the key and value lengths separately.

On my local system, this means vpd.c's vpd_section_create_attribs() hits
an error case after the first attribute it parses, since it's no longer
looking at the correct offset. With this patch, I'm back to seeing all
the correct attributes in /sys/firmware/vpd/...

Fixes: 4b708b7b1a2c ("firmware: google: check if size is valid when decoding VPD data")
Cc: &lt;stable@vger.kernel.org&gt;
Cc: Hung-Te Lin &lt;hungte@chromium.org&gt;
Signed-off-by: Brian Norris &lt;briannorris@chromium.org&gt;
Reviewed-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Link: https://lore.kernel.org/r/20190930214522.240680-1-briannorris@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>firmware: google: check if size is valid when decoding VPD data</title>
<updated>2019-09-04T11:31:28+00:00</updated>
<author>
<name>Hung-Te Lin</name>
<email>hungte@chromium.org</email>
</author>
<published>2019-08-30T02:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4b708b7b1a2c09fbdfff6b942ebe3a160213aacd'/>
<id>urn:sha1:4b708b7b1a2c09fbdfff6b942ebe3a160213aacd</id>
<content type='text'>
The VPD implementation from Chromium Vital Product Data project used to
parse data from untrusted input without checking if the meta data is
invalid or corrupted. For example, the size from decoded content may
be negative value, or larger than whole input buffer. Such invalid data
may cause buffer overflow.

To fix that, the size parameters passed to vpd_decode functions should
be changed to unsigned integer (u32) type, and the parsing of entry
header should be refactored so every size field is correctly verified
before starting to decode.

Fixes: ad2ac9d5c5e0 ("firmware: Google VPD: import lib_vpd source files")
Signed-off-by: Hung-Te Lin &lt;hungte@chromium.org&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Link: https://lore.kernel.org/r/20190830022402.214442-1-hungte@chromium.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 5.2-rc4 into char-misc-next</title>
<updated>2019-06-09T07:11:21+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-06-09T07:11:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0154ec71d597692a0d0682b19eac4b3adfb7f3dc'/>
<id>urn:sha1:0154ec71d597692a0d0682b19eac4b3adfb7f3dc</id>
<content type='text'>
We want the char/misc driver fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
