* Kees Cook wrote:
> On Thu, Apr 28, 2016 at 9:47 AM, One Thousand Gnomes
> wrote:
> > O> For example, this is what I've got currently:
> >>
> >> /* Detect and warn about potential overlaps. */
> >> void *memcpy(void *dest, const void *src, size_t n)
> >> {
> >> if (dest > src && dest -
On Thu, Apr 28, 2016 at 9:47 AM, One Thousand Gnomes
wrote:
> O> For example, this is what I've got currently:
>>
>> /* Detect and warn about potential overlaps. */
>> void *memcpy(void *dest, const void *src, size_t n)
>> {
>> if (dest > src && dest - src < n)
>> warn("Pot
O> For example, this is what I've got currently:
>
> /* Detect and warn about potential overlaps. */
> void *memcpy(void *dest, const void *src, size_t n)
> {
> if (dest > src && dest - src < n)
> warn("Potentially unsafe overlapping memcpy detected!");
> return __m
On Thu, Apr 28, 2016 at 2:37 AM, Ingo Molnar wrote:
>
> * Kees Cook wrote:
>
>> On Thu, Apr 28, 2016 at 2:04 AM, Ingo Molnar wrote:
>> >
>> > * Kees Cook wrote:
>> >> +void *memcpy(void *dest, const void *src, size_t n)
>> >
>> > btw., if there's any doubt about other overlapping uses, we could
On Thu, Apr 28, 2016 at 2:37 AM, Ingo Molnar wrote:
>
> * Kees Cook wrote:
>
>> On Thu, Apr 28, 2016 at 2:04 AM, Ingo Molnar wrote:
>> >
>> > * Kees Cook wrote:
>> > > +#define memmove memmove
>> >
>> > Btw., what's the purpose of this define? If it's already defined then we
>> >
* Kees Cook wrote:
> On Thu, Apr 28, 2016 at 2:04 AM, Ingo Molnar wrote:
> >
> > * Kees Cook wrote:
> > > +#define memmove memmove
> >
> > Btw., what's the purpose of this define? If it's already defined then we
> > should
> > get a build warning. If it's not, we won't.
>
> It's
On Thu, Apr 28, 2016 at 2:04 AM, Ingo Molnar wrote:
>
> * Kees Cook wrote:
> > +#define memmove memmove
>
> Btw., what's the purpose of this define? If it's already defined then we
> should
> get a build warning. If it's not, we won't.
It's for the decompressor that checks for memm
* Kees Cook wrote:
> +void *memcpy(void *dest, const void *src, size_t n)
btw., if there's any doubt about other overlapping uses, we could add this to
memcpy():
WARN_ON_ONCE(dest > src && dest-src < n);
or so? Does printk() work so early on?
Thanks,
Ingo
* Kees Cook wrote:
> Instead of having non-standard memcpy() behavior, explicitly call the new
> function memmove(), make it available to the decompressors, and switch
> the two overlap cases (screen scrolling and ELF parsing) to use memmove().
> Additionally documents the purpose of compressed/
Instead of having non-standard memcpy() behavior, explicitly call the new
function memmove(), make it available to the decompressors, and switch
the two overlap cases (screen scrolling and ELF parsing) to use memmove().
Additionally documents the purpose of compressed/string.c.
Suggested-by: Lasse
10 matches
Mail list logo