Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1638495

Re: [RESENT PATCH] x86/mem: fix the offset overflow when read/write mem

From zhong jiang <zhongjiang@huawei.com>
Newsgroups linux.kernel
Subject Re: [RESENT PATCH] x86/mem: fix the offset overflow when read/write mem
Date 2017-05-10 04:20 +0200
Message-ID <tFpol-21R-1@gated-at.bofh.it> (permalink)
References <tAQfw-8w0-21@gated-at.bofh.it> <tCN3Q-3du-23@gated-at.bofh.it> <tD7vA-Hg-29@gated-at.bofh.it> <tDeGJ-5D9-3@gated-at.bofh.it> <tFfyH-3F4-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2017/5/9 23:46, Rik van Riel wrote:
> On Thu, 2017-05-04 at 10:28 +0800, zhong jiang wrote:
>> On 2017/5/4 2:46, Rik van Riel wrote:
>>> However, it is not as easy as simply checking the
>>> end against __pa(high_memory). Some systems have
>>> non-contiguous physical memory ranges, with gaps
>>> of invalid addresses in-between.
>>  The invalid physical address means that it is used as
>>  io mapped. not in system ram region. /dev/mem is not
>>  access to them , is it right?
> Not necessarily. Some systems simply have large
> gaps in physical memory access. Their memory map
> may look like this:
>
> |MMMMMM|IO|MMMM|..................|MMMMMMMM|
>
> Where M is memory, IO is IO space, and the
> dots are simply a gap in physical address
> space with no valid accesses at all.
>
>>> At that point, is the complexity so much that it no
>>> longer makes sense to try to protect against root
>>> crashing the system?
>>>
>>  your suggestion is to let the issue along without any protection.
>>  just root user know what they are doing.
> Well, root already has other ways to crash the system.
>
> Implementing validation on /dev/mem may make sense if
> it can be done in a simple way, but may not be worth
> it if it becomes too complex.
>
 I have no a simple way to fix. Do you any suggestion. or you can send
 a patch for me ?

 Thanks
 zhongjiang

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RESENT PATCH] x86/mem: fix the offset overflow when read/write mem zhongjiang <zhongjiang@huawei.com> - 2017-04-27 14:00 +0200
  Re: [RESENT PATCH] x86/mem: fix the offset overflow when read/write  mem zhong jiang <zhongjiang@huawei.com> - 2017-05-02 04:00 +0200
  Re: [RESENT PATCH] x86/mem: fix the offset overflow when read/write  mem David Rientjes <rientjes@google.com> - 2017-05-02 23:00 +0200
    Re: [RESENT PATCH] x86/mem: fix the offset overflow when read/write  mem zhong jiang <zhongjiang@huawei.com> - 2017-05-03 08:50 +0200
    Re: [RESENT PATCH] x86/mem: fix the offset overflow when read/write  mem Rik van Riel <riel@redhat.com> - 2017-05-03 20:50 +0200
      Re: [RESENT PATCH] x86/mem: fix the offset overflow when read/write  mem zhong jiang <zhongjiang@huawei.com> - 2017-05-04 04:30 +0200
        Re: [RESENT PATCH] x86/mem: fix the offset overflow when read/write  mem Rik van Riel <riel@redhat.com> - 2017-05-09 17:50 +0200
          Re: [RESENT PATCH] x86/mem: fix the offset overflow when read/write  mem zhong jiang <zhongjiang@huawei.com> - 2017-05-10 04:20 +0200
          Re: [RESENT PATCH] x86/mem: fix the offset overflow when read/write  mem Xishi Qiu <qiuxishi@huawei.com> - 2017-05-10 04:20 +0200

csiph-web