lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19f34abd0902210913qe0539ebgf74c9b5e0b577786@mail.gmail.com>
Date:	Sat, 21 Feb 2009 18:13:42 +0100
From:	Vegard Nossum <vegard.nossum@...il.com>
To:	Pekka Enberg <penberg@...helsinki.fi>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH] kmemcheck: add hooks for page- and sg-dma-mappings

2009/2/21 Pekka Enberg <penberg@...helsinki.fi>:
> Vegard Nossum wrote:
>>
>> This is needed for page allocator support to prevent false positives
>> when accessing pages which are dma-mapped.
>>
>> Signed-off-by: Vegard Nossum <vegard.nossum@...il.com>
>> ---
>>  arch/x86/include/asm/dma-mapping.h |    6 ++++++
>>  1 files changed, 6 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/x86/include/asm/dma-mapping.h
>> b/arch/x86/include/asm/dma-mapping.h
>> index 830bb0e..713a002 100644
>> --- a/arch/x86/include/asm/dma-mapping.h
>> +++ b/arch/x86/include/asm/dma-mapping.h
>> @@ -117,7 +117,12 @@ dma_map_sg(struct device *hwdev, struct scatterlist
>> *sg,
>>  {
>>        struct dma_mapping_ops *ops = get_dma_ops(hwdev);
>>  +       struct scatterlist *s;
>> +       int i;
>> +
>>        BUG_ON(!valid_dma_direction(direction));
>> +       for_each_sg(sg, s, nents, i)
>> +               kmemcheck_mark_initialized(sg_virt(s), s->length);
>>        return ops->map_sg(hwdev, sg, nents, direction);
>>  }
>>  @@ -215,6 +220,7 @@ static inline dma_addr_t dma_map_page(struct device
>> *dev, struct page *page,
>>        struct dma_mapping_ops *ops = get_dma_ops(dev);
>>          BUG_ON(!valid_dma_direction(direction));
>> +       kmemcheck_mark_initialized(page_address(page) + offset, size);
>>        return ops->map_single(dev, page_to_phys(page) + offset,
>>                               size, direction);
>>  }
>
> What's with the new BUG_ON() calls here?
>

What new BUG_ON calls? Do you need glasses?


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ