From: kanoj@google.engr.sgi.com (Kanoj Sarcar)
To: Andrea Arcangeli <andrea@suse.de>
Cc: alan@lxorguk.ukuu.org.uk, torvalds@transmeta.com, sct@redhat.com,
Gerhard.Wichert@pdb.siemens.de, Winfried.Gerhard@pdb.siemens.de,
linux-kernel@vger.rutgers.edu, linux-mm@kvack.org
Subject: Re: [bigmem-patch] 4GB with Linux on IA32
Date: Mon, 16 Aug 1999 16:28:58 -0700 (PDT) [thread overview]
Message-ID: <199908162328.QAA24338@google.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.10.9908162235570.4139-100000@laser.random> from "Andrea Arcangeli" at Aug 16, 99 10:54:45 pm
>
> On Mon, 16 Aug 1999, Alan Cox wrote:
>
> >> a range of user pages that were in bigmem area? Also, debuggers
> >> want to look at user memory, so they would also need to map the
> >> pages. Are there any other cases where a driver might want to
> >
> >That is the tricky one. What occurs if I mmap a high memory page of
> >another process via /proc/pid/mem ? then write it
>
> IMO Kanoj was talking about another thing (ptrace).
>
Andrea,
I was also talking about drivers which assume that all of memory is
direct mapped. For example, __va and __pa assume this. There might be
other macros/procedures which have the same assumption built in.
Basically, anything that is dependent on PAGE_OFFSET needs to be
checked.
For example, on a 2.2.10 kernel:
[kanoj@entity kern]$ gid __va | grep drivers
drivers/char/mem.c:124: if (copy_to_user(buf, __va(p), count))
drivers/char/mem.c:142: return do_write_mem(file, __va(p), p, buf, count, ppos);
drivers/scsi/sym53c8xx.c:572:#define remap_pci_mem(base, size) ((u_long) __va(base))
drivers/video/creatorfb.c:684: disp->screen_base = (char *)__va(regs[0].phys_addr) + FFB_DFB24_POFF + 8192 * fb->y_margin + 4 * fb->x_margin;
drivers/video/creatorfb.c:687: fb->s.ffb.fbc = (struct ffb_fbc *)((char *)__va(regs[0].phys_addr) + FFB_FBC_REGS_POFF);
drivers/video/creatorfb.c:688: fb->s.ffb.dac = (struct ffb_dac *)((char *)__va(regs[0].phys_addr) + FFB_DAC_POFF);
drivers/sbus/char/zs.c:1934: __va((((unsigned long)zsregs[0].which_io)<<32) |
For all such macros, a decision needs to be made whether such usage
will create problems if the underlying page happens to be a bigmem page.
If so, the proper mapping (and unmapping) calls need to be made around
the kernel code that accesses the page contents.
Kanoj
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/
next prev parent reply other threads:[~1999-08-16 23:28 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-16 16:29 Andrea Arcangeli
1999-08-16 16:48 ` Matthew Wilcox
1999-08-16 17:19 ` Andrea Arcangeli
1999-08-16 18:43 ` Kanoj Sarcar
1999-08-16 19:43 ` Alan Cox
1999-08-16 20:54 ` Andrea Arcangeli
1999-08-16 22:47 ` Andrea Arcangeli
1999-08-16 23:26 ` Andrea Arcangeli
1999-08-16 23:39 ` Kanoj Sarcar
1999-08-17 0:10 ` Andrea Arcangeli
1999-08-17 6:37 ` Kanoj Sarcar
1999-08-17 6:41 ` Linus Torvalds
1999-08-17 6:50 ` Kanoj Sarcar
1999-08-17 7:03 ` Linus Torvalds
1999-08-17 7:23 ` Linus Torvalds
1999-08-17 11:39 ` Alan Cox
1999-08-26 16:27 ` Andrea Arcangeli
1999-08-17 11:46 ` Alan Cox
1999-08-17 14:26 ` Andrea Arcangeli
1999-08-17 6:39 ` Linus Torvalds
1999-08-17 12:40 ` Andrea Arcangeli
1999-08-17 6:29 ` Linus Torvalds
1999-08-17 12:37 ` Andrea Arcangeli
1999-08-17 14:04 ` Andrea Arcangeli
1999-08-17 8:52 ` Jakub Jelinek
1999-08-17 9:13 ` Pavel Machek
1999-08-18 14:08 ` Andrea Arcangeli
1999-08-19 12:20 ` Andrea Arcangeli
1999-08-16 23:28 ` Kanoj Sarcar [this message]
1999-08-16 23:49 ` Andrea Arcangeli
1999-08-17 6:29 ` David S. Miller
1999-08-17 12:38 ` Andrea Arcangeli
1999-08-17 0:17 ` Andrea Arcangeli
1999-08-19 13:33 ` Thierry Vignaud
1999-08-19 16:49 ` Stephen C. Tweedie
1999-08-20 7:35 ` Thierry Vignaud
1999-08-20 9:55 ` Alan Cox
1999-08-20 18:25 ` Linus Torvalds
1999-08-16 20:34 ` Andrea Arcangeli
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=199908162328.QAA24338@google.engr.sgi.com \
--to=kanoj@google.engr.sgi.com \
--cc=Gerhard.Wichert@pdb.siemens.de \
--cc=Winfried.Gerhard@pdb.siemens.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andrea@suse.de \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--cc=sct@redhat.com \
--cc=torvalds@transmeta.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox