All of lore.kernel.org
 help / color / mirror / Atom feed
From: <n@dhp.com>
To: linux-kernel@vger.kernel.org
Subject: Re: /dev/mem arch/x86 mm/pat.c break
Date: Mon, 24 Oct 2016 10:23:03 +0000 (/etc/localtime)	[thread overview]
Message-ID: <Pine.LNX.4.21.1610241022280.2165-100000@shell.dhp.com> (raw)
In-Reply-To: <Pine.LNX.4.21.1610240540340.31299-100000@shell.dhp.com>

Hey, 

It looks like https://lkml.org/lkml/2016/7/8/160 may have taken care of
it.. though back in, March or so, I saw it in some recent kernels and had
to make this patch myself.. so I dont know if it's committed.

--n

On Mon, 24 Oct 2016 n@dhp.com wrote:

> Hi,
> 
> Unless I read C wrong, pat.c seems to break all non-strict devmem use.  I
> discovered this while reversing a bunch of pci and other low-level
> stuff.  Here is a link to the fix, http//users.dhp.com/~n/pubs/
> the one starting with Linux-86...txt is the correct file, those kernel
> bugs in OpenBSD and that are just hilarious enough to keep around.. 
> 
> Oh, here is the full link:
> http://users.dhp.com/~n/Linux-x86-mmap-nonstrict-broken.txt
> 
> This was first 'nonpromisc_devmem', probably dating back to that
> introduction of 1MB limits on mmap(2) way back in the day.. who knows.
> 
> Alright, I confess as a kernel programmer Linux isn't my thing, I prefer
> Unix particularly BSD and SysV (SVR4 would be sort of both).  Thats mostly
> because sys_call_table is sysent to me, as are tons of other symbols.  But
> still, /usr/libexec/cpp seems to have broken /dev/mem
> mmap(2) functionality over the non-strict range of memory for.. a long
> time.
> 
> If I'm wrong, then there is no problem, however I had to fix this to get
> things working.  Thanks, I realize that #ifdef instead of #ifndef can
> cause strictness reversals.. good thing other portions of the kernel had
> this correct, or strict would be nonstrict, and vice-versa.  Alright,
> enjoy..
> 
> Reply address: n@mod.net (please).
> 
> 
> 
> -n
> 
> 
> 
> 
> 
> 

      reply	other threads:[~2016-10-24 10:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24  5:58 /dev/mem arch/x86 mm/pat.c break n
2016-10-24 10:23 ` n [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.21.1610241022280.2165-100000@shell.dhp.com \
    --to=n@dhp.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.