Re: [PATCH] fixup! scripts: Add common library functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 27, 2021 at 08:01:50AM +0200, Ahmad Fatoum wrote:
> scripts: common: mmap mutable memory in read_file_2
> 
> imx-usb-loader expects the file buffer contents to be mutable as it
> will patch out references to plugin and DCD segments.
> 
> With the consolidation of the different file read helpers, the
> buffer is no longer always malloc'd, but a read-only shared
> mapping is attempted first and if it succeeds, imx-usb-loader
> will seg fault during fixups.
> 
> As we don't want to modify the underlying file, switch to a writable
> private mapping to remedy this.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
> ---
>  scripts/common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux