[PATCH 02/11] LICENSES: Add 0BSD license text

2024-03-20 Thread Lasse Collin
The license text was copied from: https://spdx.org/licenses/0BSD.html Reviewed-by: Jia Tan Signed-off-by: Lasse Collin --- Notes: 0BSD is the ISC license without the requirements to preserve copyright and license notices. LICENSES/deprecated/0BSD | 23 +++ 1

[PATCH 03/11] xz: Switch from public domain to BSD Zero Clause License (0BSD)

2024-03-20 Thread Lasse Collin
or perceived) legal issues in some jurisdictions. Reviewed-by: Jia Tan Signed-off-by: Lasse Collin --- include/linux/decompress/unxz.h | 5 ++--- include/linux/xz.h | 5 ++--- lib/decompress_unxz.c | 5 ++--- lib/xz/xz_crc32.c | 5 ++--- lib/xz/xz_dec_bc

Re: Possible memory leak in unxz()

2020-05-10 Thread Lasse Collin
nlz4.c checks it but in addition it seems to also reject the case where input != NULL && fill != NULL. Perhaps that combination isn't used anywhere but it is allowed by the API ("input" would be a temporary buffer for "fill"). I think the decompress_fn API is more complex than it looks at glance. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode

Re: [tip:x86/boot] x86/boot: Make memcpy() handle overlaps

2016-04-22 Thread Lasse Collin
d of memcpy(). In those places where buffers can overlap one would then use memmove() so that it's clear to the reader that overlapping is possible. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode

Re: [tip:x86/boot] x86/boot: Make memcpy() handle overlaps

2016-04-22 Thread Lasse Collin
d of memcpy(). In those places where buffers can overlap one would then use memmove() so that it's clear to the reader that overlapping is possible. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode

Re: [PATCH v5 06/21] x86, KASLR: Update description for decompressor worst case size

2016-04-15 Thread Lasse Collin
* instead */ if (unlikely(dst_len == src_len)) memcpy(out_buf, in_buf, src_len); The overlap can only happen if there's enough incompressible data near the end of the kernel image. It still works in practice as long as memcpy works with overlapping buffers for dest < src. -- L

Re: [PATCH v5 06/21] x86, KASLR: Update description for decompressor worst case size

2016-04-15 Thread Lasse Collin
* instead */ if (unlikely(dst_len == src_len)) memcpy(out_buf, in_buf, src_len); The overlap can only happen if there's enough incompressible data near the end of the kernel image. It still works in practice as long as memcpy works with overlapping buffers for dest < src. -- L

Re: [PATCH v5 13/21] x86, boot: Report overlap failures in memcpy

2016-04-15 Thread Lasse Collin
nside a "#ifndef memmove" block. That #ifndef should be taken into account when adding a memmove symbol. Changing decompress_unxz.c is fine but then one needs to think about other archs too. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode

Re: [PATCH v5 13/21] x86, boot: Report overlap failures in memcpy

2016-04-15 Thread Lasse Collin
e" block. That #ifndef should be taken into account when adding a memmove symbol. Changing decompress_unxz.c is fine but then one needs to think about other archs too. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode

Re: About support XZ-compressed kernel on x86

2016-02-19 Thread Lasse Collin
bove example in misc.c, but maybe the example helps in figuring out a better wording for the existing text in misc.c. In most decompressors, the input pointer moves faster than the output pointer in certain common situations (like file format headers), thus some decompressor-specific safety ma

Re: About support XZ-compressed kernel on x86

2016-02-19 Thread Lasse Collin
bove example in misc.c, but maybe the example helps in figuring out a better wording for the existing text in misc.c. In most decompressors, the input pointer moves faster than the output pointer in certain common situations (like file format headers), thus some decompressor-specific safety ma

Re: About support XZ-compressed kernel on x86

2016-02-17 Thread Lasse Collin
On 2016-02-16 Baoquan He wrote: > On 02/15/16 at 10:26pm, Lasse Collin wrote: > > Yes, like all zeros. I wrote another explanation just in case it > > helps: > > Yes, this is great and very helpful for people who want to understand > this details. I want to mak

Re: About support XZ-compressed kernel on x86

2016-02-17 Thread Lasse Collin
On 2016-02-16 Baoquan He wrote: > On 02/15/16 at 10:26pm, Lasse Collin wrote: > > Yes, like all zeros. I wrote another explanation just in case it > > helps: > > Yes, this is great and very helpful for people who want to understand > this details. I want to mak

Re: About support XZ-compressed kernel on x86

2016-02-15 Thread Lasse Collin
On 2016-02-14 Baoquan He wrote: > On 02/13/16 at 08:57pm, Lasse Collin wrote: > > The long comment in arch/x86/boot/compressed/misc.c explains the > > need for the offset for gzip/Deflate. A similar comment in > > lib/decompress_unxz.c explains it for XZ/LZMA2. > > Th

Re: About support XZ-compressed kernel on x86

2016-02-15 Thread Lasse Collin
On 2016-02-14 Baoquan He wrote: > On 02/13/16 at 08:57pm, Lasse Collin wrote: > > The long comment in arch/x86/boot/compressed/misc.c explains the > > need for the offset for gzip/Deflate. A similar comment in > > lib/decompress_unxz.c explains it for XZ/LZMA2. > > Th

Re: About support XZ-compressed kernel on x86

2016-02-13 Thread Lasse Collin
On 2016-02-12 Baoquan He wrote: > Now I have a question about the commit from you: > > commit 303148045aac34b70db722a54e5ad94a3a6625c6 > Author: Lasse Collin > Date: Wed Jan 12 17:01:24 2011 -0800 > > x86: support XZ-compressed kernel > > > In this c

Re: About support XZ-compressed kernel on x86

2016-02-13 Thread Lasse Collin
On 2016-02-12 Baoquan He wrote: > Now I have a question about the commit from you: > > commit 303148045aac34b70db722a54e5ad94a3a6625c6 > Author: Lasse Collin <lasse.col...@tukaani.org> > Date: Wed Jan 12 17:01:24 2011 -0800 > > x86: support XZ-compressed ke

[PATCH] xz: Add comments for the intentionally missing break statements

2014-04-09 Thread Lasse Collin
From: Lasse Collin Signed-off-by: Lasse Collin --- lib/xz/xz_dec_lzma2.c |4 1 file changed, 4 insertions(+) diff -Narup linux-3.14.orig/lib/xz/xz_dec_lzma2.c linux-3.14/lib/xz/xz_dec_lzma2.c --- linux-3.14.orig/lib/xz/xz_dec_lzma2.c 2014-03-31 06:40:15.0 +0300

[PATCH] xz: Add comments for the intentionally missing break statements

2014-04-09 Thread Lasse Collin
From: Lasse Collin lasse.col...@tukaani.org Signed-off-by: Lasse Collin lasse.col...@tukaani.org --- lib/xz/xz_dec_lzma2.c |4 1 file changed, 4 insertions(+) diff -Narup linux-3.14.orig/lib/xz/xz_dec_lzma2.c linux-3.14/lib/xz/xz_dec_lzma2.c --- linux-3.14.orig/lib/xz/xz_dec_lzma2.c

Re: [PATCH] xz: make XZ_DEC_BCJ filters non-optional

2014-03-08 Thread Lasse Collin
e to too big LZMA2 dictionary (if you used -9, the decompressor allocates 64 MiB of memory, but I cannot guess how much RAM the target system had). In Documentation/xz.txt under "Notes on compression options" there are some tips about compressing files for the in-kernel XZ decompressor. --

Re: [PATCH] xz: make XZ_DEC_BCJ filters non-optional

2014-03-08 Thread Lasse Collin
dictionary (if you used -9, the decompressor allocates 64 MiB of memory, but I cannot guess how much RAM the target system had). In Documentation/xz.txt under Notes on compression options there are some tips about compressing files for the in-kernel XZ decompressor. -- Lasse Collin | IRC: Larhzu

[PATCH] xz: Enable all filters by default in Kconfig

2014-03-05 Thread Lasse Collin
From: Lasse Collin This restores the old behavior that existed before 2013-02-22. Disabling the filters only makes sense on embedded systems. Signed-off-by: Lasse Collin --- lib/xz/Kconfig | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff -Nru linux

Re: [PATCH] xz: make XZ_DEC_BCJ filters non-optional

2014-03-05 Thread Lasse Collin
may get lost. If all filters are enabled by default, a clear error message on XZ_OPTIONS_ERROR should be enough, I think. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to major

Re: [PATCH] xz: make XZ_DEC_BCJ filters non-optional

2014-03-05 Thread Lasse Collin
to disable filters is there to reduce code size *slightly*. If you or we add something extra to figure out what is supported at runtime, the size benefit may get lost. If all filters are enabled by default, a clear error message on XZ_OPTIONS_ERROR should be enough, I think. -- Lasse Collin | IRC

[PATCH] xz: Enable all filters by default in Kconfig

2014-03-05 Thread Lasse Collin
From: Lasse Collin lasse.col...@tukaani.org This restores the old behavior that existed before 2013-02-22. Disabling the filters only makes sense on embedded systems. Signed-off-by: Lasse Collin lasse.col...@tukaani.org --- lib/xz/Kconfig | 24 1 file changed, 12

Re: [PATCH] xz: make XZ_DEC_BCJ filters non-optional

2014-03-04 Thread Lasse Collin
On 2014-03-03 Florian Fainelli wrote: > 2014-03-03 4:51 GMT-08:00 Lasse Collin : > > The second version enables the BCJ filter only for the current arch > > by default if CONFIG_EXPERT; without CONFIG_EXPERT all filters are > > forced on: > > I like this version bette

Re: [PATCH] xz: make XZ_DEC_BCJ filters non-optional

2014-03-04 Thread Lasse Collin
On 2014-03-03 Florian Fainelli wrote: 2014-03-03 4:51 GMT-08:00 Lasse Collin lasse.col...@tukaani.org: The second version enables the BCJ filter only for the current arch by default if CONFIG_EXPERT; without CONFIG_EXPERT all filters are forced on: I like this version better because

Re: [PATCH] xz: make XZ_DEC_BCJ filters non-optional

2014-03-03 Thread Lasse Collin
er" - default y if (ARM && ARM_THUMB) + bool "ARM-Thumb BCJ filter decoder" if EXPERT + default y if !EXPERT || (ARM && ARM_THUMB) select XZ_DEC_BCJ config XZ_DEC_SPARC - bool "SPARC BCJ filter decoder" - default y

Re: [PATCH] xz: make XZ_DEC_BCJ filters non-optional

2014-03-03 Thread Lasse Collin
+ default y if !EXPERT || SPARC select XZ_DEC_BCJ endif -- Lasse Collin | IRC: Larhzu @ IRCnet Freenode -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

Re: [PATCH] decompressors: fix typo "POWERPC"

2013-03-13 Thread Lasse Collin
oot environment has done its job once "Booting the kernel." has been printed. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org M

Re: [PATCH] decompressors: fix typo "POWERPC"

2013-03-13 Thread Lasse Collin
r the selected architecture, but I think the current method is OK. See also lib/xz/xz_private.h. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordo

Re: [PATCH] decompressors: fix typo POWERPC

2013-03-13 Thread Lasse Collin
is OK. See also lib/xz/xz_private.h. -- Lasse Collin | IRC: Larhzu @ IRCnet Freenode -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ

Re: [PATCH] decompressors: fix typo POWERPC

2013-03-13 Thread Lasse Collin
environment has done its job once Booting the kernel. has been printed. -- Lasse Collin | IRC: Larhzu @ IRCnet Freenode -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH 2/2] decompressors: make the default XZ_BCJ_* config match the selected architecture

2013-01-18 Thread Lasse Collin
On 2013-01-16 Florian Fainelli wrote: > On 01/15/2013 07:11 PM, Lasse Collin wrote: > > On 2013-01-15 Florian Fainelli wrote: > >> config XZ_DEC_X86 > >>bool "x86 BCJ filter decoder" if EXPERT > >> - default y > >> + default y if

Re: [PATCH 2/2] decompressors: make the default XZ_BCJ_* config match the selected architecture

2013-01-18 Thread Lasse Collin
On 2013-01-16 Florian Fainelli wrote: On 01/15/2013 07:11 PM, Lasse Collin wrote: On 2013-01-15 Florian Fainelli wrote: config XZ_DEC_X86 bool x86 BCJ filter decoder if EXPERT - default y + default y if X86 select XZ_DEC_BCJ [...] I think the if EXPERT strings should

Re: [PATCH 2/2] decompressors: make the default XZ_BCJ_* config match the selected architecture

2013-01-15 Thread Lasse Collin
> bool "x86 BCJ filter decoder" if EXPERT > - default y > + default y if X86 > select XZ_DEC_BCJ [...] I think the "if EXPERT" strings should be dropped when all BCJ filters aren't enabled by default. One should be able to enable all filters witho

Re: [PATCH 2/2] decompressors: make the default XZ_BCJ_* config match the selected architecture

2013-01-15 Thread Lasse Collin
decoder if EXPERT - default y + default y if X86 select XZ_DEC_BCJ [...] I think the if EXPERT strings should be dropped when all BCJ filters aren't enabled by default. One should be able to enable all filters without enabling EXPERT. -- Lasse Collin | IRC: Larhzu @ IRCnet

[PATCH] i386: Fix usage of -mtune when X86_GENERIC=y or CONFIG_MCORE2=y

2007-02-28 Thread Lasse Collin
) += -march=i486 @@ -42,5 +42,5 @@ # add at the end to overwrite eventual tuning options from earlier # cpu entries -cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic) +cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic,$(call tune,i686)) -- Lasse Collin | IRC: Larhzu @ IRCnet

[PATCH] i386: Fix usage of -mtune when X86_GENERIC=y or CONFIG_MCORE2=y

2007-02-28 Thread Lasse Collin
) += -march=i486 @@ -42,5 +42,5 @@ # add at the end to overwrite eventual tuning options from earlier # cpu entries -cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic) +cflags-$(CONFIG_X86_GENERIC) += $(call tune,generic,$(call tune,i686)) -- Lasse Collin | IRC: Larhzu @ IRCnet Freenode