[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160422075610.GD7352@gmail.com>
Date: Fri, 22 Apr 2016 09:56:11 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Kees Cook <keescook@...omium.org>
Cc: Yinghai Lu <yinghai@...nel.org>, Baoquan He <bhe@...hat.com>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
"H.J. Lu" <hjl.tools@...il.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Borislav Petkov <bp@...e.de>,
Andy Lutomirski <luto@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] x86, boot: Make memcpy handle overlaps
* Kees Cook <keescook@...omium.org> wrote:
> Two uses of memcpy (screen scrolling and ELF parsing) were handling
> overlapping memory areas. While there were no explicitly noticed bugs
> here (yet), it is best to fix this so that the copying will always be
> safe.
>
> Instead of making a new memmove function that might collide with other
> memmove definitions in the decompressors, this just makes the compressed
> boot's copy of memcpy overlap safe.
Btw., I changed all mentions of function calls to include a '()', i.e.:
Subject: x86/boot: Make memcpy() handle overlaps
From: Kees Cook <keescook@...omium.org>
Date: Wed, 20 Apr 2016 13:55:45 -0700
Two uses of memcpy() (screen scrolling and ELF parsing) were handling
overlapping memory areas. While there were no explicitly noticed bugs
here (yet), it is best to fix this so that the copying will always be
safe.
Instead of making a new memmove() function that might collide with other
memmove() definitions in the decompressors, this just makes the compressed
boot code's copy of memcpy() overlap-safe.
Please try to do this in future changelogs and patch titles, all references to
function calls should use parentheses, and all references to variables or
parameters should be escaped with '...' when it's not abundantly clear what they
are - this makes for much easier reading.
So just to mention an extreme (made up) example, which of these two commit titles
is less confusing to read:
Change out parameter of function to buffer to avoid confusion
or:
Change 'out' parameter of function() to 'buffer' to avoid confusion
?
I know which one I'd pick! ;-)
Thanks,
Ingo
Powered by blists - more mailing lists