Re: [PATCH] efi: Free malloc regions on exit

2016-05-19 Thread Michael Chang
On Fri, May 20, 2016 at 06:56:21AM +0300, Andrei Borzenkov wrote: > 19.05.2016 16:37, Alexander Graf пишет: > > When we exit grub, we don't free all the memory that we allocated earlier > > for our heap region. This can cause problems with setups where you try > > to descend the boot order using

Re: btrfs subvolumes [was Re: Bugs and tasks for 2.02[~rc1] ]

2016-04-17 Thread Michael Chang
On Mon, Apr 18, 2016 at 06:22:10AM +0200, Vladimir 'phcoder' Serbinenko wrote: > On Wednesday, April 13, 2016, Olaf Hering wrote: > > > On Fri, Mar 11, Vladimir 'phcoder' Serbinenko wrote: > > > > > On Wednesday, March 9, 2016, Olaf Hering > > >

Patches to support UEFI HTTP Boot IPv4 and IPv6

2016-08-03 Thread Michael Chang
This patch set enables UEFI HTTP Boot suppot for IPv4 and IPv6. It has been tested on OVMF virtual machine and several physical servers to work. We would like to contribute the current work to upstream to get better vision and support in the future through a much larger community. The first two

[PATCH 6/8] bootp: Add processing DHCPACK packet from HTTP Boot

2016-08-03 Thread Michael Chang
dor class identifier in DHCPACK packet by treating it as HTTP format, not as the PXE format. Signed-off-by: Michael Chang <mch...@suse.com> Signed-off-by: Ken Lin <ken@hpe.com> --- grub-core/net/bootp.c | 67 +-- include/grub/net.

[PATCH 2/8] net: read bracketed ipv6 addrs and port numbers

2016-08-03 Thread Michael Chang
From: Aaron Miller Allow specifying port numbers for http and tftp paths, and allow ipv6 addresses to be recognized with brackets around them, which is required to specify a port number --- grub-core/net/http.c | 21 ++--- grub-core/net/net.c | 86

[PATCH 1/8] misc: fix invalid character recongition in strto*l

2016-08-03 Thread Michael Chang
From: Aaron Miller Would previously allow digits larger than the base and didn't check that subtracting the difference from 0-9 to lowercase letters for characters larger than 9 didn't result in a value lower than 9, which allowed the parses: ` = 9, _ = 8, ^ = 7, ] = 6, \ =

[PATCH 3/8] bootp: New net_bootp6 command

2016-08-03 Thread Michael Chang
Implement new net_bootp6 command for IPv6 network auto configuration via the DHCPv6 protocol (RFC3315). Signed-off-by: Michael Chang <mch...@suse.com> Signed-off-by: Ken Lin <ken@hpe.com> --- grub-core/net/bootp.c | 908 +- grub-c

[PATCH 4/8] efinet: UEFI IPv6 PXE support

2016-08-03 Thread Michael Chang
When grub2 image is booted from UEFI IPv6 PXE, the DHCPv6 Reply packet is cached in firmware buffer which can be obtained by PXE Base Code protocol. The network interface can be setup through the parameters in that obtained packet. Signed-off-by: Michael Chang <mch...@suse.com> Signed-off-b

[PATCH 5/8] grub.texi: Add net_bootp6 doument

2016-08-03 Thread Michael Chang
Update grub documentation for net_bootp6 command. Signed-off-by: Michael Chang <mch...@suse.com> Signed-off-by: Ken Lin <ken@hpe.com> --- docs/grub.texi | 17 + 1 file changed, 17 insertions(+) diff --git a/docs/grub.texi b/docs/grub.texi index 82f6fa4..60

[PATCH 7/8] efinet: Setting network from UEFI device path

2016-08-03 Thread Michael Chang
the device path where the image booted from. The DHCPACK packet is recoverd from the information in device patch and feed into the same DHCP packet processing functions to ensure the network interface is setting up the same way it used to be. Signed-off-by: Michael Chang <mch...@suse.com> Sign

[PATCH 8/8] efinet: Setting DNS server from UEFI protocol

2016-08-03 Thread Michael Chang
the network interface is setting up the same way it used to be. Signed-off-by: Michael Chang <mch...@suse.com> Signed-off-by: Ken Lin <ken@hpe.com> --- grub-core/net/drivers/efi/efinet.c | 163 + include/grub/efi/api.h | 76 ++

Re: [PATCH] dns: fix heap corruption

2016-07-11 Thread Michael Chang
On Fri, Jul 08, 2016 at 10:54:37PM +0300, Andrei Borzenkov wrote: > 07.07.2016 12:18, Michael Chang пишет: > > Since commit f9d1b4422efb2c06e5472fb2c304712e2029796b I occasionally bumped > > into heap corruption problem during dns lookup. > > > > After tracing th

Re: [PATCH 4/4] Allow protocol to be separated from host with a semicolon

2017-01-24 Thread Michael Chang
On Tue, Jan 24, 2017 at 12:50:37PM -0800, Matthew Garrett wrote: > On Mon, Jan 23, 2017 at 8:02 PM, Andrei Borzenkov wrote: > > 24.01.2017 03:36, Matthew Garrett пишет: > >> Some DHCP servers (such as dnsmasq) tokenise parameters with commas, making > >> it impossible to pass

Re: [PATCH 4/4] Allow protocol to be separated from host with a semicolon

2017-01-25 Thread Michael Chang
On Tue, Jan 24, 2017 at 10:21:22PM -0800, Matthew Garrett wrote: > On Tue, Jan 24, 2017 at 10:18 PM, Michael Chang <mch...@suse.com> wrote: > > On Tue, Jan 24, 2017 at 12:50:37PM -0800, Matthew Garrett wrote: > >> The DHCP server will return a string in the boot_file

Re: [RFC 0/2] UEFI-based HTTP Boot

2017-01-25 Thread Michael Chang
On Fri, Jan 20, 2017 at 05:50:56PM +0300, Andrei Borzenkov wrote: > On Fri, Jan 20, 2017 at 4:13 AM, Ken Lin wrote: > > This RFC patchset is stacked on the previous HTTP boot patchset: > > https://lists.gnu.org/archive/html/grub-devel/2016-12/msg00088.html > > It re-uses some

Re: [RFC 0/2] UEFI-based HTTP Boot

2017-01-25 Thread Michael Chang
On Wed, Jan 25, 2017 at 11:19:19AM +0300, Andrei Borzenkov wrote: > On Wed, Jan 25, 2017 at 11:09 AM, Michael Chang <mch...@suse.com> wrote: > > On Fri, Jan 20, 2017 at 05:50:56PM +0300, Andrei Borzenkov wrote: > >> On Fri, Jan 20, 2017 at 4:13 AM, Ken Lin <ken@hpe.

Re: Trouble booting EFI grub binaries built using binutils 2.27.

2016-09-01 Thread Michael Chang
On Thu, Sep 01, 2016 at 04:14:31PM -0400, Mathieu Trudel-Lapierre wrote: > Hi, > > Is anyone else having issues booting grub EFI images when grub has been > built using binutils 2.27? > > The build completes successfully, but then I get the following error at > boot: > > no symbol table >

Re: [PATCH v2] grub-file: fix segmentation fault

2016-11-22 Thread Michael Chang
On Tue, Nov 22, 2016 at 09:39:43PM +0300, Andrei Borzenkov wrote: > 22.11.2016 10:10, Michael Chang пишет: > > What about attached patch? It does not increase size of kernel. Just some nitpicks in comments and a potential leak in fail path (See below), otherwise LGTM. > > I

Re: [PATCH v2] grub-file: fix segmentation fault

2016-11-21 Thread Michael Chang
I have to resend the mail as the attached kernel image is too big that may not reach the list eventually. Sorry if you get duplicated mail. If you still have problem with reproducing the problem please let me know. I could provide download link for the kernel file. On Fri, Nov 18, 2016 at

[PATCH] Fix fwpath in efi netboot

2016-12-19 Thread Michael Chang
The path returned by grub_efi_net_config has already been stripped for the directory part extracted from cached bootp packet. We should just return the result to avoild it be stripped again. It fixed the problem that grub.efi as NBP image always looking for grub.cfg and platform directory in

Re: [PATCH] disk/efi: skip iPXE dummy block devices

2017-03-13 Thread Michael Chang
On Mon, Mar 13, 2017 at 06:45:02AM +0300, Andrei Borzenkov wrote: > iPXE adds Simple File System Protocol to loaded image handle, as side > effect it also adds Block IO protocol (according to comments, to work > around some bugs in EDK2). GRUB assumes that every device with Block IO > is disk and

Re: [PATCH] disk/efi: skip iPXE dummy block devices

2017-03-13 Thread Michael Chang
On Tue, Mar 14, 2017 at 06:19:04AM +0300, Andrei Borzenkov wrote: > 14.03.2017 06:03, Michael Chang пишет: > > On Mon, Mar 13, 2017 at 06:45:02AM +0300, Andrei Borzenkov wrote: > >> iPXE adds Simple File System Protocol to loaded image handle, as side > >> effect it

Re: [PATCH v2 0/9] Add UEFI HTTP Boot support for IPv4 and IPv6

2017-07-11 Thread Michael Chang
On Tue, Jul 11, 2017 at 07:39:16AM +, Lin, Keng-Yu wrote: > > How many test case did you perform on this patch. More specifically, did you > > verify how does it work with existing network commands > > > > https://www.gnu.org/software/grub/manual/grub.html#Networking- > > commands > > > >

Re: [PATCH v2 0/9] Add UEFI HTTP Boot support for IPv4 and IPv6

2017-07-10 Thread Michael Chang
On Thu, Jul 06, 2017 at 06:52:02AM +, Lin, Keng-Yu wrote: > > Hi Keng-Yu, > > > > Sorry for late reply but I clearing my backlog after long vacation. > > > > > > Thank you for doing the work. Unfortunately it is too late to put it into > > 2.02 release (I hope it will happen at the end of

Re: [PATCH 2/2] Core TPM support

2017-07-24 Thread Michael Chang
On Wed, Jul 05, 2017 at 02:19:57PM -0700, Matthew Garrett wrote: > Add support for performing basic TPM measurements. Right now this only > supports extending PCRs statically and only on UEFI. > --- > grub-core/Makefile.core.def| 7 + > grub-core/commands/efi/tpm.c | 282 >

[PATCH] ehci: fix build error of print format specifier

2017-06-13 Thread Michael Chang
It is introduced by commit e058df7b5a9cc7aaa9872eaa916b715544a8f9840, use PRIxGRUB_ADDR as format specfier to fix the portability problem. --- grub-core/bus/usb/ehci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/bus/usb/ehci.c b/grub-core/bus/usb/ehci.c index

Re: [PATCH] pass kernel command line as verbatim

2018-05-11 Thread Michael Chang
On Wed, May 09, 2018 at 03:23:56PM +0200, Daniel Kiper wrote: > On Thu, Apr 26, 2018 at 04:42:30PM +0800, Michael Chang wrote: > > On Tue, Apr 24, 2018 at 12:03:21PM +0200, Daniel Kiper wrote: > > > On Wed, Apr 18, 2018 at 03:07:15PM +0800, Michael Chang wrote: > > > &

Re: What is this grub_disk_read doing in the i386 linux loader?

2018-04-25 Thread Michael Chang
On Wed, Apr 25, 2018 at 12:45:15PM -0700, Andrew Jeddeloh wrote: > > As Michael said, "0x0202 + byte value at offset 0x0201" is your friend. > > I think Michael's message got lost; I think he replied to just you? I > didn't receive it and I don't see it in the archives. Yes, it got lost. I don't

Re: [PATCH] pass kernel command line as verbatim

2018-04-26 Thread Michael Chang
On Tue, Apr 24, 2018 at 12:03:21PM +0200, Daniel Kiper wrote: > On Wed, Apr 18, 2018 at 03:07:15PM +0800, Michael Chang wrote: > > On Tue, Apr 17, 2018 at 06:37:06PM +0200, Daniel Kiper wrote: > > > On Wed, Apr 11, 2018 at 05:17:03PM +0800, Michael Chang wrote: > > >

[PATCH] hostdisk: Fix linux disk cache workaround on multipath disks

2018-07-25 Thread Michael Chang
In hostdisk.c::grub_util_fd_open_device, there's a workaround to linux disk cache described below. "Linux has a bug that the disk cache for a whole disk is not consistent with the one for a partition of the disk." The workaround will result in using the partition device for writing the image of

Re: [PATCH resend] ofnet: Initialize structs in bootpath parser

2018-08-29 Thread Michael Chang
Actually I also have a similar patch posted one month ago for the very same problem. https://lists.gnu.org/archive/html/grub-devel/2018-07/msg00103.html But as long as either way will do, I don't mind which one is going to be reviewed and eventually merged. :) On Thu, Aug 23, 2018 at 02:12:56PM

[PATCH] ieee1275/ofnet.c: Fix uninitialized ipv4 field

2018-07-19 Thread Michael Chang
The ipv4 address field is not initialized to zero that would make the subsequent check to become false positive. The outcome is broken network interface being created with garbage value which may potentially break network connectivity. This patch fixes the problem by initializing them to zero as

Re: [PATCH] hostdisk: Fix linux disk cache workaround on multipath disks

2018-09-12 Thread Michael Chang
On Tue, Sep 04, 2018 at 04:46:31PM +0200, Daniel Kiper wrote: > On Wed, Jul 25, 2018 at 04:49:15PM +0800, Michael Chang wrote: > > In hostdisk.c::grub_util_fd_open_device, there's a workaround to linux disk > > s#hostdisk.c::grub_util_fd_open_device#grub-c

Re: [PATCH] pass kernel command line as verbatim

2018-04-11 Thread Michael Chang
And this bug report seems relevant .. https://savannah.gnu.org/bugs/?49937 On Wed, Apr 11, 2018 at 04:58:54PM +0800, Michael Chang wrote: > The command line has been processed by grub shell, then the result is expected > to be passed to kernel command line as verbatim according to th

[PATCH] pass kernel command line as verbatim

2018-04-11 Thread Michael Chang
the surrounding double-quotes added is kept as it used to protect space. [1] https://www.gnu.org/software/grub/manual/grub/html_node/linux.html#linux [2] https://www.gnu.org/software/grub/manual/grub/html_node/xen_005fhypervisor.html Signed-off-by: Michael Chang <mch...@suse.com> --- gru

Re: [PATCH] pass kernel command line as verbatim

2018-04-18 Thread Michael Chang
On Tue, Apr 17, 2018 at 06:37:06PM +0200, Daniel Kiper wrote: > On Wed, Apr 11, 2018 at 05:17:03PM +0800, Michael Chang wrote: > > And this bug report seems relevant .. > > > > https://savannah.gnu.org/bugs/?49937 > > > > On Wed, Apr 11, 2018 at 04:5

Re: [PATCH] bufio: fix the next_buf calculation

2018-04-18 Thread Michael Chang
On Tue, Apr 17, 2018 at 07:11:34PM +0200, Daniel Kiper wrote: > CC-ing Vladimir. > > On Mon, Apr 16, 2018 at 06:05:04PM +0800, Michael Chang wrote: > > The next_buf is the offset to the next cached block rounded to the size of > > bufio->block_size. However the calculat

[PATCH] bufio: round up block size to power of 2

2018-04-20 Thread Michael Chang
Rounding up the bufio->block_size to meet power of 2 to facilitate next_buf calcuation in grub_bufio_read. Signed-off-by: Michael Chang <mch...@suse.com> --- grub-core/io/bufio.c | 8 1 file changed, 8 insertions(+) diff --git a/grub-core/io/bufio.c b/grub-core/io/bufi

[PATCH v2] bufio: round up block size to power of 2

2018-04-24 Thread Michael Chang
Rounding up the bufio->block_size to meet power of 2 to facilitate next_buf calcuation in grub_bufio_read. Signed-off-by: Michael Chang <mch...@suse.com> v2: - Use a more terse approach to round up size suggested by Daniel - Added comment to explain why to have the size rounded

Re: [PATCH] bufio: round up block size to power of 2

2018-04-24 Thread Michael Chang
On Mon, Apr 23, 2018 at 03:57:22PM +0200, Daniel Kiper wrote: > On Fri, Apr 20, 2018 at 03:21:30PM +0800, Michael Chang wrote: > > Rounding up the bufio->block_size to meet power of 2 to facilitate next_buf > > calcuation in grub_bufio_read. > > > > Signed-off-by:

[PATCH] bufio: fix the next_buf calculation

2018-04-16 Thread Michael Chang
can be set arbitrary value. This patch fixes the next_buf calculation to accept any integers. Signed-off-by: Michael Chang <mch...@suse.com> --- grub-core/io/bufio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/io/bufio.c b/grub-core/io/bufio.c index

Re: [PATCH] Fix packed-not-aligned error on GCC 8

2018-03-27 Thread Michael Chang
On Mon, Mar 26, 2018 at 04:28:20PM +0200, Daniel Kiper wrote: > On Mon, Mar 26, 2018 at 04:52:34PM +0800, Michael Chang wrote: > > When building with GCC 8, there are several errors regarding > > packed-not-aligned. > > > > ./include/grub/gpt_partition.h:79:1: erro

Re: [PATCH] Fix packed-not-aligned error on GCC 8

2018-03-26 Thread Michael Chang
and paste error here for the mistake. In "struct efi_variable", we have to use grub_efi_packed_guid_t, as the name suggests. :) Signed-off-by: Michael Chang <mch...@suse.com> Tested-by: Michael Chang <mch...@suse.com> --- grub-core/fs/btrfs.c | 2 +- include/grub/efiemu/runt

Re: [PATCH 1/1] Fix PCIe LER when GRUB2 accesses non-enabled MMIO data from VGA

2018-03-29 Thread Michael Chang
roller. And then > > enable the MMIO address space with the specific bits. > > > > Signed-off-by: Mike Travis <mike.tra...@hpe.com> > > Reviewed-by: Michael Chang <mch...@suse.com> > > Reviewed-by: Daniel Kiper <dki...@net-space.pl> > > We

[PATCH] Fix packed-not-aligned error on GCC 8

2018-03-21 Thread Michael Chang
Here just came up with a patch that fixed the GCC 8 error for me. :) Would you test it work for you as well ? Thanks, Michael -- When building with GCC 8, there are several errors regarding packed-not-aligned. ./include/grub/gpt_partition.h:79:1: error: alignment 1 of ‘struct

[PATCH] verifiers: fix double close on pgp's sig file descriptor

2018-11-12 Thread Michael Chang
refine the application interface to accept file path rather than descriptor, in this way the caller doesn't have to care about closing the descriptor by delegating it to grub_verify_signature() with full tracing to opened file descriptor by itself. Signed-off-by: Michael Chang --- grub-core

Re: [PATCH] verifiers: fix double close on pgp's sig file descriptor

2018-11-15 Thread Michael Chang
On Wed, Nov 14, 2018 at 05:23:58PM +0100, Daniel Kiper wrote: > On Tue, Nov 13, 2018 at 02:31:18PM +0800, Michael Chang wrote: > > An error emerged as when I was tesing the verifiers branch, so instead > > of putting it in pgp prefix, the verifiers is used to reflect what the >

[PATCH v2] verifiers: fix double close on pgp's sig file descriptor

2018-11-15 Thread Michael Chang
refine the application interface to accept file path rather than descriptor, in this way the caller doesn't have to care about closing the descriptor by delegating it to grub_verify_signature() with full tracing to opened file descriptor by itself. Signed-off-by: Michael Chang v1 -> v2: - d

Re: efinet SNP issue affects iscsi boot

2018-09-20 Thread Michael Chang
On Thu, Sep 13, 2018 at 06:06:15PM -0600, Micah Parrish wrote: > Hi, new subscriber here.  We have a problem with Grub 2 and its use of SNP > instead of MNP.  Our UEFI driver for a network card parses the relevant DHCP > options for iSCSI boot, generates an iBFT table, then gets closed by Grub >

Re: [PATCH V1] hostdisk: Fix linux disk cache workaround on multipath disks

2018-09-20 Thread Michael Chang
On Wed, Sep 19, 2018 at 03:28:34PM +0200, Daniel Kiper wrote: > On Thu, Sep 13, 2018 at 03:20:34PM +0800, Michael Chang wrote: > > In grub-core/osdep/linux/hostdisk.c::grub_util_fd_open_device() there's > > comment > > about linux disk cache issue as below: > &g

Re: efinet SNP issue affects iscsi boot

2018-09-27 Thread Michael Chang
On Thu, Sep 20, 2018 at 01:26:47PM -0600, Micah Parrish wrote: > > > On 09/20/2018 07:47 AM, grub-devel-requ...@gnu.org wrote: > > On Thu, Sep 20, 2018 at 06:38:07PM +0800, Michael Chang wrote: > > > On Thu, Sep 13, 2018 at 06:06:15PM -0600, Micah Parrish wrote: > &g

[RFC] efinet: default to MNP interface and SNP as fallback

2018-09-27 Thread Michael Chang
without MNP implemented. Signed-off-by: Michael Chang --- grub-core/net/drivers/efi/efinet.c | 304 - include/grub/efi/api.h | 109 - include/grub/net.h | 2 + 3 files changed, 410 insertions(+), 5 deletions(-) diff --git

Re: efinet SNP issue affects iscsi boot

2018-09-27 Thread Michael Chang
On Thu, Sep 20, 2018 at 02:01:08PM +0200, Daniel Kiper wrote: > On Thu, Sep 20, 2018 at 06:38:07PM +0800, Michael Chang wrote: > > On Thu, Sep 13, 2018 at 06:06:15PM -0600, Micah Parrish wrote: > > > Hi, new subscriber here.? We have a problem with Grub 2 and its use of SNP &g

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-21 Thread Michael Chang
On Mon, Jan 14, 2019 at 11:22:23AM +0100, Alexander Graf wrote: > On 01/14/2019 10:14 AM, Michael Chang wrote: > > On Mon, Jan 14, 2019 at 08:07:34AM +0100, Ard Biesheuvel wrote: > > > On Mon, 14 Jan 2019 at 05:58, Michael Chang wrote: > > > > On Fri, Jan 11,

Re: [PATCH v2] verifiers: fix double close on pgp's sig file descriptor

2018-11-20 Thread Michael Chang
On Fri, Nov 16, 2018 at 03:01:30PM +0100, Daniel Kiper wrote: > On Thu, Nov 15, 2018 at 06:13:11PM +0800, Michael Chang wrote: > > An error emerged as when I was tesing the verifiers branch, so instead > > of putting it in pgp prefix, the verifiers is used to reflect what the >

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-13 Thread Michael Chang
On Fri, Jan 11, 2019 at 10:58:54AM +, Leif Lindholm wrote: > On Thu, Jan 10, 2019 at 09:59:38AM +0100, Alexander Graf wrote: > > > Am 10.01.2019 um 09:12 schrieb Michael Chang : > > > > > > Hi, > > > > > > With the advent of new v

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-13 Thread Michael Chang
On Fri, Jan 11, 2019 at 03:17:54PM +0100, Ard Biesheuvel wrote: > On Fri, 11 Jan 2019 at 11:58, Leif Lindholm wrote: > > > > On Thu, Jan 10, 2019 at 09:59:38AM +0100, Alexander Graf wrote: > > > > Am 10.01.2019 um 09:12 schrieb Michael Chang : > > > > >

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-14 Thread Michael Chang
On Mon, Jan 14, 2019 at 08:07:34AM +0100, Ard Biesheuvel wrote: > On Mon, 14 Jan 2019 at 05:58, Michael Chang wrote: > > > > On Fri, Jan 11, 2019 at 10:58:54AM +, Leif Lindholm wrote: > > > On Thu, Jan 10, 2019 at 09:59:38AM +0100, Alexander Graf wrote: > >

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-14 Thread Michael Chang
On Mon, Jan 14, 2019 at 08:41:21AM +0100, Ard Biesheuvel wrote: > On Mon, 14 Jan 2019 at 08:30, Michael Chang wrote: > > > > On Fri, Jan 11, 2019 at 03:17:54PM +0100, Ard Biesheuvel wrote: > > > On Fri, 11 Jan 2019 at 11:58, Leif Lindholm > > > wrote: > >

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM

2019-01-14 Thread Michael Chang
On Mon, Jan 14, 2019 at 10:57:10AM +0100, Ard Biesheuvel wrote: > On Mon, 14 Jan 2019 at 10:53, Michael Chang wrote: > > > > On Mon, Jan 14, 2019 at 08:41:21AM +0100, Ard Biesheuvel wrote: > > > On Mon, 14 Jan 2019 at 08:30, Michael Chang wrote: > > > > > &

[PATCH V1] hostdisk: Fix linux disk cache workaround on multipath disks

2018-09-13 Thread Michael Chang
message. Signed-off-by: Michael Chang --- grub-core/osdep/linux/hostdisk.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/grub-core/osdep/linux/hostdisk.c b/grub-core/osdep/linux/hostdisk.c index 06179fca7..ed530bdc4 100644 --- a/grub-core/osdep/linux/hostdisk.c +++ b/grub-core/osdep/linux/

[PATCH] msdos: Fix overflow in converting partition start and length into 512B blocks

2018-09-13 Thread Michael Chang
When booting from NVME SSD with 4k sector size, it fails with the message. error: attempt to read or write outside of partition. This patch fixes the problem by fixing overflow in converting partition start and length into 512B blocks. Signed-off-by: Michael Chang --- grub-core/partmap

Re: [PATCH 0/8] fix gcc9 build with -Werror=address-of-packed-member

2019-04-09 Thread Michael Chang
On Tue, Apr 09, 2019 at 10:15:33PM +1000, Vladimir 'phcoder' Serbinenko wrote: > On Tue, Apr 9, 2019 at 9:40 PM Michael Chang wrote: > > > > On Tue, Apr 09, 2019 at 08:57:25PM +1000, Vladimir 'phcoder' Serbinenko > > wrote: > > > On Tue, Apr 9, 2019 a

[PATCH v2 0/8] fix gcc9 build with -Werror=address-of-packed-member

2019-04-11 Thread Michael Chang
alignment requirement and the outcome is risky to memory alignment fault on some architecture when deferencing it. Please help to review. Thanks. v2: Disable -Werror=address-of-packed-member if its diagnose turns out to be false positive. Michael Chang (8): cpio: disable gcc9 -Waddress-of-packed

[PATCH v2 6/8] usbtest: disable gcc9 -Waddress-of-packed-member

2019-04-11 Thread Michael Chang
229s] | ^ Signed-off-by: Michael Chang --- grub-core/commands/usbtest.c | 9 + 1 file changed, 9 insertions(+) diff --git a/grub-core/commands/usbtest.c b/grub-core/commands/usbtest.c index 01cdca934..2c6d93fe6 100644 --- a/gru

[PATCH v2 4/8] hfsplus: fix gcc9 error with -Waddress-of-packed-member

2019-04-11 Thread Michael Chang
-Werror=address-of-packed-member] [ 59s] 1019 | *grub_utf16_to_utf8 ((grub_uint8_t *) (*label), catkey->name, [ 59s] | ~~^~ Signed-off-by: Michael Chang --- grub-core/fs/hfsplus.c | 57 +++-

[PATCH v2 7/8] chainloader: fix gcc9 error -Waddress-of-packed-member

2019-04-11 Thread Michael Chang
ed member of 'struct grub_efi_file_path_device_path' may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 243s] 138 | for (p = fp->path_name; p < fp->path_name + size; p++) [ 243s] |^~ Signed-off-by: Michael Chang --- grub-core/loader/efi/

[PATCH v2 5/8] acpi: fix gcc9 error -Waddress-of-packed-member

2019-04-11 Thread Michael Chang
]50 | struct grub_acpi_table_header [ 233s] |^~ [ 233s] ../../include/grub/acpi.h:90:8: note: defined here [ 233s]90 | struct grub_acpi_madt [ 233s] |^~ Signed-off-by: Michael Chang --- include/grub/acpi.h | 2 +- 1 file

[PATCH v2 1/8] cpio: disable gcc9 -Waddress-of-packed-member

2019-04-11 Thread Michael Chang
59s] | ~~^ Signed-off-by: Michael Chang --- grub-core/fs/cpio_common.c | 9 + 1 file changed, 9 insertions(+) diff --git a/grub-core/fs/cpio_common.c b/grub-core/fs/cpio_common.c index ed134d931..4e885d623 100644 --- a/grub-core/fs/cpio_common.c +++ b/grub-c

[PATCH v2 2/8] jfs: disable gcc9 -Waddress-of-packed-member

2019-04-11 Thread Michael Chang
d pointer value [-Werror=address-of-packed-member] [ 60s] 570 | le_to_cpu16_copy (filename + strpos, next_leaf->namepart, len < 15 ? len : 15); [ 60s] | ~^~ [ 60s] cc1: all warnings being treated as errors Signed-off-by: Mic

[PATCH v2 3/8] hfs: fix gcc9 error -Waddress-of-packed-member

2019-04-11 Thread Michael Chang
ess-of-packed-member] [ 83s] 700 | : (>sblock.extent_recs)); [ 83s] |~^~ Signed-off-by: Michael Chang --- include/grub/hfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grub/hfs.h b/include/grub/hfs.h index d935f5005..e27

[PATCH v2 8/8] efi: fix gcc9 error -Waddress-of-packed-member

2019-04-11 Thread Michael Chang
ame, [ 255s] | ~~^~~ Signed-off-by: Michael Chang --- grub-core/kern/efi/efi.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c index 708581fcb..62cd9829e 100644 --- a/grub-core/ke

Re: gcc9.1 and f2fs

2019-05-17 Thread Michael Chang
On Wed, May 08, 2019 at 01:51:20AM +0100, Neil MacLeod wrote: > Adrian > > I used the attached patch and grub is now building for me with gcc-9.1. > > I've no idea if this is the right solution, but it does at least work > (ie. builds) which is all I require for now as I'm not personally > using

[PATCH] f2fs: Fix gcc9 error -Werror=maybe-uninitialized

2019-05-17 Thread Michael Chang
to be processed. The fix is to set level = -1 as return value by grub_get_node_path to signify an error that the input block cannot be handled. Any caller should therefore check level is negative or not before processing the output. Reported-by: Neil MacLeod Signed-off-by: Michael Chang --- grub

Re: [PATCH] f2fs: Fix gcc9 error -Werror=maybe-uninitialized

2019-05-23 Thread Michael Chang
On Wed, May 22, 2019 at 05:35:34PM +0100, Neil MacLeod wrote: > > Thanks! I allowed myself to add your Tested-by. I hope this is not a > > problem for you > > Not at all! > > > This and other fixes posted earlier are now in the tree. > > Latest grub HEAD

[PATCH] 30_os-prober: Provide GRUB_OS_PROBER_DISABLE_DEBUG

2019-07-15 Thread Michael Chang
-by: Michael Chang --- docs/grub.texi | 4 util/grub-mkconfig.in | 3 ++- util/grub.d/30_os-prober.in | 4 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/grub.texi b/docs/grub.texi index 3d50b16ba..0295d1e67 100644 --- a/docs/grub.texi +++ b/docs

[PATCH 6/8] usbtest: fix gcc9 error address-of-packed-member

2019-04-09 Thread Michael Chang
gt;str, [ 229s] | ^ Signed-off-by: Michael Chang --- grub-core/commands/usbtest.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/grub-core/commands/usbtest.c b/grub-core/commands/usbtest.c index 01c

[PATCH 2/8] jfs: fix gcc9 error address-of-packed-member

2019-04-09 Thread Michael Chang
ber] [ 60s] 570 | le_to_cpu16_copy (filename + strpos, next_leaf->namepart, len < 15 ? len : 15); [ 60s] | ~^~ [ 60s] cc1: all warnings being treated as errors Signed-off-by: Michael Chang --- grub-core/fs/jfs.c | 5 +++--

[PATCH 5/8] acpi: fix gcc9 error address-of-packed-member

2019-04-09 Thread Michael Chang
: note: defined here [ 233s]50 | struct grub_acpi_table_header [ 233s] |^~ [ 233s] ../../include/grub/acpi.h:90:8: note: defined here [ 233s]90 | struct grub_acpi_madt [ 233s] |^~ Signed-off-by: Michael Chang --- include/grub

[PATCH 7/8] chainloader: fix gcc9 error address-of-packed-member

2019-04-09 Thread Michael Chang
f 'struct grub_efi_file_path_device_path' may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 243s] 138 | for (p = fp->path_name; p < fp->path_name + size; p++) [ 243s] |^~ Signed-off-by: Michael Chang --- grub-core/loader/efi/

Re: [PATCH 0/8] fix gcc9 build with -Werror=address-of-packed-member

2019-04-09 Thread Michael Chang
On Tue, Apr 09, 2019 at 08:57:25PM +1000, Vladimir 'phcoder' Serbinenko wrote: > On Tue, Apr 9, 2019 at 8:48 PM Michael Chang wrote: > > > > This patch set attempts to resolve the build failure in openSUSE build > > service equipped with new gcc 9 compiler, which has added a

[PATCH 1/8] cpio: fix gcc9 error address-of-packed-member

2019-04-09 Thread Michael Chang
59s] | ~~^ Signed-off-by: Michael Chang --- grub-core/fs/cpio.c| 5 +++-- grub-core/fs/cpio_be.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/grub-core/fs/cpio.c b/grub-core/fs/cpio.c index dab5f9898..a1aa66689 100644 --- a/grub-c

[PATCH 8/8] efi: fix gcc9 error address-of-packed-member

2019-04-09 Thread Michael Chang
may result in an unaligned pointer value [-Werror=address-of-packed-member] [ 255s] 900 | *grub_utf16_to_utf8 (buf, fp->path_name, [ 255s] | ~~^~~ Signed-off-by: Michael Chang --- grub-core/kern/efi/efi.c | 27 ---

[PATCH 3/8] hfs: fix gcc9 error address-of-packed-member

2019-04-09 Thread Michael Chang
lue [-Werror=address-of-packed-member] [ 83s] 700 | : (>sblock.extent_recs)); [ 83s] |~^~ Signed-off-by: Michael Chang --- include/grub/hfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grub/hfs.h b/include/grub/hfs.h

[PATCH 4/8] hfsplus: fix gcc9 error address-of-packed-member

2019-04-09 Thread Michael Chang
ber] [ 59s] 1019 | *grub_utf16_to_utf8 ((grub_uint8_t *) (*label), catkey->name, [ 59s] | ~~^~ Signed-off-by: Michael Chang --- grub-core/fs/hfsplus.c | 57 +++--- 1 file changed, 40 in

[PATCH 0/8] fix gcc9 build with -Werror=address-of-packed-member

2019-04-09 Thread Michael Chang
alignment requirement and the outcome is risky to memory alignment fault on some architecture when deferencing it. Please help to review. Thanks. Michael Chang (8): cpio: fix gcc9 error address-of-packed-member jfs: fix gcc9 error address-of-packed-member hfs: fix gcc9 error address-of-packed

Re: [PATCH] 30_os-prober: Provide GRUB_OS_PROBER_DISABLE_DEBUG

2019-07-16 Thread Michael Chang
On Mon, Jul 15, 2019 at 05:26:55PM +0100, Colin Watson wrote: > On Mon, Jul 15, 2019 at 09:28:31AM +0000, Michael Chang wrote: > > This patch adds support to disable os-prober debug output while running > > grub-mkconfig through GRUB_OS_PROBER_DISABLE_DEBUG=true in simple &g

Re: [PATCH] 30_os-prober: Provide GRUB_OS_PROBER_DISABLE_DEBUG

2019-07-25 Thread Michael Chang
On Tue, Jul 23, 2019 at 07:41:12PM +0100, Colin Watson wrote: > On Tue, Jul 16, 2019 at 07:28:32AM +0000, Michael Chang wrote: > > What about changing the os-prober default to disable the debug output ? > > I haven't thought about it in detail, but that seems reasonable enough. &

Re: [PATCH] lvm: add lvm cache logical volume handling

2019-11-18 Thread Michael Chang
On Thu, Oct 24, 2019 at 05:21:04PM +0200, Daniel Kiper wrote: > On Thu, Oct 24, 2019 at 04:43:58AM +0000, Michael Chang wrote: > > On Wed, Oct 23, 2019 at 12:48:23PM +0200, Daniel Kiper wrote: > > > On Wed, Oct 16, 2019 at 06:15:30AM +0000, Michael Chang wrote: > > > >

Re: [PATCH v2] lvm: add lvm cache logical volume handling

2019-11-18 Thread Michael Chang
On Wed, Nov 13, 2019 at 03:10:41PM +0100, Daniel Kiper wrote: > On Tue, Nov 05, 2019 at 09:33:00AM +0000, Michael Chang wrote: > > The lvm cache logical volume is the logical volume consisting of the > > original and the cache pool logical volume. The original is usually on a > &

[PATCH] Warn the user to edit environment block by grub-editenv

2019-11-05 Thread Michael Chang
it sparse the filesystem which could lead to unexpected outcome. This patch adds message in grubenv file to warn the user from editing it by tools other than grub-editenv. Signed-off-by: Michael Chang --- util/editenv.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git

[PATCH v2] lvm: add lvm cache logical volume handling

2019-11-05 Thread Michael Chang
es are not activated and mounted, IMHO it should be fine to read directly from original lv since all cached data should have been flushed back in the process of taking it offline. Signed-off-by: Michael Chang --- Changes since v2: * Move struct cache_lv definition to the beginning of file * Add handli

Re: [PATCH] btrfs: disable zstd support for i386-pc

2019-11-06 Thread Michael Chang
On Tue, Nov 05, 2019 at 11:52:44AM +0100, Paul Menzel wrote: > Dear Michael, > > > Thank you for your patch. > > On 2019-11-05 10:19, Michael Chang wrote: > > The zstd support in btrfs has dependenciy to zstd module and core.img > > dependency OK. The typo

Re: [PATCH] btrfs: disable zstd support for i386-pc

2019-11-06 Thread Michael Chang
; > On Tue, 5 Nov 2019, 01:25 Michael Chang, wrote: > > > The zstd support in btrfs has dependenciy to zstd module and core.img > > grows its size significantly to 75KB on my system. The resulted image > > cannot be installed into btrfs bootloader area in the size of 64

[PATCH] set linux file descriptor to O_CLOEXEC as default

2019-11-05 Thread Michael Chang
y the exec() family of functions. Signed-off-by: Michael Chang --- grub-core/osdep/linux/hostdisk.c | 3 +++ grub-core/osdep/unix/hostdisk.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/grub-core/osdep/linux/hostdisk.c b/grub-core/osdep/linux/hostdisk.c index 8b92f8528..da62f924e 100644

[PATCH] btrfs: disable zstd support for i386-pc

2019-11-05 Thread Michael Chang
. This is simple workaround until a proper fix landed upstream. Signed-off-by: Michael Chang --- grub-core/fs/btrfs.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c index 48bd3d04a..8f98892d3 100644 --- a/grub-core/fs/btrfs.c

Re: [PATCH] Warn the user to edit environment block by grub-editenv

2019-11-07 Thread Michael Chang
On Tue, Nov 05, 2019 at 12:49:08PM +0100, Javier Martinez Canillas wrote: > Hello Michael, > > On 11/5/19 10:20 AM, Michael Chang wrote: > > The environment block is a preallocated 1024-byte file serves as persistent > > storage for environment variables. It has its own form

Re: [PATCH] btrfs: disable zstd support for i386-pc

2019-11-06 Thread Michael Chang
On Wed, Nov 06, 2019 at 09:08:41PM -0800, Vladimir 'phcoder' Serbinenko wrote: > On Wed, 6 Nov 2019, 20:55 Michael Chang, wrote: > > > On Wed, Nov 06, 2019 at 11:15:04AM -0800, Vladimir 'phcoder' Serbinenko > > wrote: > > > Please don't do it this way. Th

Re: [PATCH] btrfs: disable zstd support for i386-pc

2019-11-06 Thread Michael Chang
On Wed, Nov 06, 2019 at 01:40:30PM +0100, David Sterba wrote: > On Tue, Nov 05, 2019 at 09:19:59AM +0000, Michael Chang wrote: > > The zstd support in btrfs has dependenciy to zstd module and core.img > > grows its size significantly to 75KB on my system. The resulted image > >

Re: [PATCH] Enable pager by default

2019-10-28 Thread Michael Chang
On Fri, Oct 25, 2019 at 08:48:05AM +0200, Vladimir 'phcoder' Serbinenko wrote: > On Fri, 25 Oct 2019, 08:20 Michael Chang, wrote: > > > On Thu, Oct 24, 2019 at 04:39:09PM +0200, Daniel Kiper wrote: > > > On Thu, Oct 24, 2019 at 06:54:53AM +, Michael Chang wrote: > &g

<    1   2   3   4   >