All of lore.kernel.org
 help / color / mirror / Atom feed
* Page Fault
@ 2015-11-29 18:19 Gohar Irfan
  2015-11-30 10:32 ` Jan Beulich
  0 siblings, 1 reply; 17+ messages in thread
From: Gohar Irfan @ 2015-11-29 18:19 UTC (permalink / raw)
  To: xen-devel, xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 141 bytes --]

Inside the page fault handler for shadow page tables (sh_page_fault
function in multi.c) where is the code for swapping in a page from disk?

[-- Attachment #1.2: Type: text/html, Size: 162 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Page Fault
  2015-11-29 18:19 Page Fault Gohar Irfan
@ 2015-11-30 10:32 ` Jan Beulich
  2015-11-30 18:33   ` Gohar Irfan
  0 siblings, 1 reply; 17+ messages in thread
From: Jan Beulich @ 2015-11-30 10:32 UTC (permalink / raw)
  To: Gohar Irfan; +Cc: xen-devel

>>> On 29.11.15 at 19:19, <goharirfan94@gmail.com> wrote:
> Inside the page fault handler for shadow page tables (sh_page_fault
> function in multi.c) where is the code for swapping in a page from disk?

There is no swapping in from disk in that code. You probably think
of memory-paging, which has nothing to do with shadow code.

Jan

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Page Fault
  2015-11-30 10:32 ` Jan Beulich
@ 2015-11-30 18:33   ` Gohar Irfan
  0 siblings, 0 replies; 17+ messages in thread
From: Gohar Irfan @ 2015-11-30 18:33 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 470 bytes --]

Sorry, my apologies. I got it now, thanks!

On Mon, Nov 30, 2015 at 3:32 PM Jan Beulich <JBeulich@suse.com> wrote:

> >>> On 29.11.15 at 19:19, <goharirfan94@gmail.com> wrote:
> > Inside the page fault handler for shadow page tables (sh_page_fault
> > function in multi.c) where is the code for swapping in a page from disk?
>
> There is no swapping in from disk in that code. You probably think
> of memory-paging, which has nothing to do with shadow code.
>
> Jan
>
>

[-- Attachment #1.2: Type: text/html, Size: 818 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Page Fault
       [not found] <cc589888bda02ea2e599e3ac312e71a@cweb006.nm.nfra.io>
@ 2020-04-23 16:42 ` Enzo Desiage
  0 siblings, 0 replies; 17+ messages in thread
From: Enzo Desiage @ 2020-04-23 16:42 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 211 bytes --]

Thanks!
What I don't understand is why would we need rax register in the inline
assembly?

As I only need to flip the 16th bit of cr0, so using eax should suffice?
As I don't need to address the whole register.

[-- Attachment #1.2: Type: text/html, Size: 331 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Page Fault
@ 2020-04-23  0:02 Enzo Desiage
  0 siblings, 0 replies; 17+ messages in thread
From: Enzo Desiage @ 2020-04-23  0:02 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 7219 bytes --]

Hi,

I am trying to write a proof of concept where the execve
system call gets replaced by a new one, that
would print a message if ls is launched.

However, this is giving me a page fault everytime
I try to insmod it, and I cannot figure out why.

Thanks,
Enzo

here is the code:
+++++
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kallsyms.h>
#include <asm/paravirt.h>
#include <linux/dirent.h>
#include <linux/fs.h>
#include <linux/proc_ns.h>
#include <linux/slab.h>
#include <linux/version.h>
#include <linux/fdtable.h>
#include <linux/uaccess.h>
#include <asm/unistd_64.h>


MODULE_LICENSE("Dual BSD/GPL");

/* sys call table */
static void **sct = 0;


static asmlinkage long (*orig_execve) (const char __user *filename,
const char __user *const __user *argv,
const char __user *const __user *envp);

inline void disable_write_protection(void)
{
    asm volatile("cli\n\t"
                "mov %%cr0,%%eax\n\t"
                "and $0xfffeffff,%%eax\n\t"
                "mov %%eax,%%cr0"
                :"+m"(__force_order)
                :
                :);
}

inline void enable_write_protection(void)
{
    asm volatile("mov %%cr0,%%eax\n\t"
                "or $0x10000,%%eax\n\t"
                "mov %%eax,%%cr0\n\t"
                "sti"
                :"+m"(__force_order)
                :
                :);
}

/* Custom execve */

static asmlinkage long
my_execve(const char __user *filename,
const char __user *const __user *argv,
const char __user *const __user *envp);
{

    int ret;

    if(strstr(filename, "/bin/ls") != NULL)
    {
        printk(KERN_ALERT "Executing /bin/ls detected\n");
    }

    ret = (*orig_execve) (filename, argv, envp);
    return ret;
}



static int sys_init(void)
{

    printk(KERN_ALERT "Module loading\n");

    sct = (void **)kallsyms_lookup_name("sys_call_table");
    printk( "+ sys_call_table address = %p\n", sct );

    printk("Execve syscall # %d\n", __NR_execve);

// record the original getdents handler
    orig_execve = sct[__NR_execve];

    disable_write_protection();
    sct[__NR_execve] = my_execve;
    enable_write_protection();

    return 0;
}


static void sys_exit(void)
{

    disable_write_protection();
    sct[__NR_execve] = orig_execve;
    enable_write_protection();

    printk(KERN_ALERT "Goodbye, cruel world\n");
}

module_init(sys_init);
module_exit(sys_exit);
++++++

[ 4024.772066] Module loading
[ 4024.790716] + sys_call_table address = 00000000055df43d
[ 4024.790718] Execve syscall # 59
[ 4024.791116] BUG: unable to handle page fault for address:
000000008004020b
[ 4024.792614] #PF: supervisor write access in kernel mode
[ 4024.793944] #PF: error_code(0x0002) - not-present page
[ 4024.794920] PGD 0 P4D 0
[ 4024.795411] Oops: 0002 [#1] SMP PTI
[ 4024.796072] CPU: 1 PID: 3475 Comm: insmod Tainted: G           OE
5.6.0-rc2+ #1
[ 4024.797378] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.12.0-1 04/01/2014
[ 4024.798977] RIP: 0010:sys_init+0x69/0x90 [mvee]
[ 4024.799724] Code: 6b 60 9d c0 e8 ab 97 d3 d1 48 8b 05 99 22 00 00 48 8b
90 d8 01 00 00 48 89 15 83 22 00 00 fa 0f 20 c0 25 ff ff fe ff 0f 22 c0
<48> c7 80 d8 01 00 00 00 50 9d c0 0f 20 c0 0d 00 00 01 00 0f 22 c0
[ 4024.802782] RSP: 0018:ffffac860111fc60 EFLAGS: 00010086
[ 4024.803896] RAX: 0000000080040033 RBX: 0000000000000000 RCX:
0000000000000007
[ 4024.805017] RDX: ffffffff928e9180 RSI: 0000000000000086 RDI:
ffff98c27dd19900
[ 4024.806147] RBP: ffffac860111fc60 R08: 0000000000000242 R09:
0000000000000004
[ 4024.807220] R10: ffffffff93d827e0 R11: 0000000000000001 R12:
ffffffffc09d50a0
[ 4024.808285] R13: ffff98c27a8bf280 R14: ffffac860111fe68 R15:
ffffffffc09d7000
[ 4024.809390] FS:  00007fec8368f540(0000) GS:ffff98c27dd00000(0000)
knlGS:0000000000000000
[ 4024.810855] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080040033
[ 4024.811922] CR2: 000000008004020b CR3: 00000000336e4005 CR4:
0000000000360ee0
[ 4024.813231] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[ 4024.814610] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7:
0000000000000400
[ 4024.815651] Call Trace:
[ 4024.816155]  do_one_initcall+0x4a/0x200
[ 4024.816778]  ? _cond_resched+0x19/0x40
[ 4024.817363]  ? kmem_cache_alloc_trace+0x15c/0x210
[ 4024.818096]  ? __vunmap+0x1bd/0x210
[ 4024.818671]  do_init_module+0x5f/0x22a
[ 4024.819317]  load_module+0x26f8/0x2cd0
[ 4024.820077]  __do_sys_finit_module+0xfc/0x120
[ 4024.820796]  ? __do_sys_finit_module+0xfc/0x120
[ 4024.821538]  __x64_sys_finit_module+0x1a/0x20
[ 4024.822583]  do_syscall_64+0x57/0x1d0
[ 4024.823195]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 4024.823972] RIP: 0033:0x7fec831a0839
[ 4024.824552] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48
89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05
<48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 1f f6 2c 00 f7 d8 64 89 01 48
[ 4024.828363] RSP: 002b:00007ffd0cb40468 EFLAGS: 00000246 ORIG_RAX:
0000000000000139
[ 4024.829995] RAX: ffffffffffffffda RBX: 0000563be9d597a0 RCX:
00007fec831a0839
[ 4024.831531] RDX: 0000000000000000 RSI: 0000563be900cd2e RDI:
0000000000000003
[ 4024.832626] RBP: 0000563be900cd2e R08: 0000000000000000 R09:
00007fec83473000
[ 4024.833730] R10: 0000000000000003 R11: 0000000000000246 R12:
0000000000000000
[ 4024.835553] R13: 0000563be9d59770 R14: 0000000000000000 R15:
0000000000000000
[ 4024.837111] Modules linked in: mvee(OE+) kvm_intel kvm irqbypass
input_leds joydev serio_raw qemu_fw_cfg mac_hid sch_fq_codel ib_iser
rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi
scsi_transport_iscsi ip_tables x_tables btrfs blake2b_generic zstd_compress
raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx
xor raid6_pq raid1 raid0 multipath linear crct10dif_pclmul crc32_pclmul
ghash_clmulni_intel cirrus drm_kms_helper aesni_intel glue_helper
crypto_simd syscopyarea sysfillrect virtio_blk sysimgblt fb_sys_fops cec
i2c_piix4 psmouse sym53c8xx pata_acpi cryptd drm virtio_net [last unloaded:
mvee]
[ 4024.847494] CR2: 000000008004020b
[ 4024.848404] ---[ end trace 0988ed522895329e ]---
[ 4024.849514] RIP: 0010:sys_init+0x69/0x90 [mvee]
[ 4024.850610] Code: 6b 60 9d c0 e8 ab 97 d3 d1 48 8b 05 99 22 00 00 48 8b
90 d8 01 00 00 48 89 15 83 22 00 00 fa 0f 20 c0 25 ff ff fe ff 0f 22 c0
<48> c7 80 d8 01 00 00 00 50 9d c0 0f 20 c0 0d 00 00 01 00 0f 22 c0
[ 4024.854386] RSP: 0018:ffffac860111fc60 EFLAGS: 00010086
[ 4024.855612] RAX: 0000000080040033 RBX: 0000000000000000 RCX:
0000000000000007
[ 4024.857080] RDX: ffffffff928e9180 RSI: 0000000000000086 RDI:
ffff98c27dd19900
[ 4024.858549] RBP: ffffac860111fc60 R08: 0000000000000242 R09:
0000000000000004
[ 4024.860335] R10: ffffffff93d827e0 R11: 0000000000000001 R12:
ffffffffc09d50a0
[ 4024.862180] R13: ffff98c27a8bf280 R14: ffffac860111fe68 R15:
ffffffffc09d7000
[ 4024.863667] FS:  00007fec8368f540(0000) GS:ffff98c27dd00000(0000)
knlGS:0000000000000000
[ 4024.865500] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080040033
[ 4024.866775] CR2: 000000008004020b CR3: 00000000336e4005 CR4:
0000000000360ee0
[ 4024.868352] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[ 4024.869850] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7:
0000000000000400

[-- Attachment #1.2: Type: text/html, Size: 8468 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Page fault
@ 2004-07-25  5:17 bharat
  0 siblings, 0 replies; 17+ messages in thread
From: bharat @ 2004-07-25  5:17 UTC (permalink / raw)
  To: David Woodhouse; +Cc: PPC_LINUX


hi,
the patch  has nothing to do with my page fault problem,it's by mistake,
went in answer to that patch .
i sincerely apologize for that.

--

YOU CAN ACHIEVE ANYTHING BY PROGRAMMING YOUR MIND-SET !

with regards
Bharat Bhushan


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: page fault
  2004-07-24  3:52   ` page fault bharat
@ 2004-07-24 17:16     ` David Woodhouse
  0 siblings, 0 replies; 17+ messages in thread
From: David Woodhouse @ 2004-07-24 17:16 UTC (permalink / raw)
  To: bharat; +Cc: PPC_LINUX


On Sat, 2004-07-24 at 09:22 +0530, bharat wrote:
> problem is that it all went ok in kernel space but as soon as it enters
> in user space it starts giving PAGE_FAULTS.

You seem to have posted this in reply to Andreas Oberritter's message in
which he offered a patch to export m8xx_cpm_hostalloc().

Please could you explain why these are related -- did you only start
seeing this problem after you applied his patch?

--
dwmw2


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* page fault
       [not found] ` <20820601.1090640061250.JavaMail.administrator@RnDserver>
@ 2004-07-24  3:52   ` bharat
  2004-07-24 17:16     ` David Woodhouse
  0 siblings, 1 reply; 17+ messages in thread
From: bharat @ 2004-07-24  3:52 UTC (permalink / raw)
  To: PPC_LINUX


hi all,
i am a newbie,so i may be far behind the curve,but please bear with me.
i am porting hardhat linux for MPPC860T for our custome hardware and i
am not using any bootloader instead i use my custome utility to download
kernel to board,in /arch/ppc/m8xx_setup.c in function m8xx_init i give

	bd_t *binfo;

        binfo =res;

        binfo->bi_memstart=0;
        binfo->bi_memsize=10*1024*1024;
        binfo->bi_intfreq=50;

#ifdef CONFIG_BLK_DEV_INITRD
        initrd_start = 10*1024*1024 + KERNELBASE;
        initrd_end = 16*1024*1024 + KERNELBASE;
#endif
as i want to use 10 mb of my ram for execution and rest up to 16 mb
for file system currently it is nfs mounted.
problem is that it all went ok in kernel space but as soon as it enters
in user space it starts giving PAGE_FAULTS.
how can i remove this.
Thanks in anticipation
--

YOU CAN ACHIEVE ANYTHING BY PROGRAMMING YOUR MIND-SET !

with warm regards
Bharat Bhushan
coral Telecom,Noida
india


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* page fault
@ 2004-06-10 13:08 bharat
  0 siblings, 0 replies; 17+ messages in thread
From: bharat @ 2004-06-10 13:08 UTC (permalink / raw)
  To: linuxppc-embedded


hi Everyone
	i am novice in this field and trying to port hardhat linux on
my custome board i have configured whole kernel and  in last when i try to
start the /sbin/init function i get the error
PAGE FAULT IN INTERRUPT HANDLER
and sometime scheduling in interrupt
what should i do
please help me
thanks in anticipation
bharat

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: page fault.
  2000-10-27  2:12 ` page fault M.Jagadish Kumar
  2000-10-26 19:45   ` afei
@ 2000-10-30 12:19   ` volodya
  1 sibling, 0 replies; 17+ messages in thread
From: volodya @ 2000-10-30 12:19 UTC (permalink / raw)
  To: M.Jagadish Kumar; +Cc: linux-mm

I was interested in that too :)) So far the best I came up with was a
loadable module that prints out all pages in active memory. Perhaps you
can use it together with debugger to step through the program and see what
happens.

                          Vladimir Dergachev

On Fri, 27 Oct 2000, M.Jagadish Kumar wrote:

> hello,
> Is there any way in which i can know when the pagefault occured,
> i mean at what instruction of my program execution.
> Does OS provide any support. This would help me to improve my program.
> thanx
> jagadish
> 
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux.eu.org/Linux-MM/
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: page fault.
       [not found]         ` <8tboe4$3bfb7$1@fido.engr.sgi.com>
@ 2000-10-27 17:38           ` Rajagopal Ananthanarayanan
  0 siblings, 0 replies; 17+ messages in thread
From: Rajagopal Ananthanarayanan @ 2000-10-27 17:38 UTC (permalink / raw)
  To: Stephen C. Tweedie; +Cc: linux-mm

"Stephen C. Tweedie" wrote:
> 
> Hi,
> 
> On Thu, Oct 26, 2000 at 10:14:23PM -0400, afei@jhu.edu wrote:
> > You are right. I misunderstood what he wants. To know when the pagefault
> > occured, one simply can work on the pagefault handler. It is trivial.
> 
> Page faults already produce a SIGSEGV which gets passed a sigcontext
> struct describing where the fault occurred.
> 

Isn't it that only unsatisfied pagefaults generate
SIGSEGV? The original question was whether there
is a way to track all pagefaults in a given program.
Please correct if I'm wrong: the answer to this latter
question is no. Unless one modifies do_pagefault to
generate such a signal on all faults ...


--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
--------------------------------------------------------------------------
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: page fault.
  2000-10-27  2:14       ` afei
@ 2000-10-27 11:17         ` Stephen C. Tweedie
       [not found]         ` <8tboe4$3bfb7$1@fido.engr.sgi.com>
  1 sibling, 0 replies; 17+ messages in thread
From: Stephen C. Tweedie @ 2000-10-27 11:17 UTC (permalink / raw)
  To: afei; +Cc: Rik van Riel, M.Jagadish Kumar, linux-mm

Hi,

On Thu, Oct 26, 2000 at 10:14:23PM -0400, afei@jhu.edu wrote:
> You are right. I misunderstood what he wants. To know when the pagefault
> occured, one simply can work on the pagefault handler. It is trivial.

Page faults already produce a SIGSEGV which gets passed a sigcontext
struct describing where the fault occurred.

--Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: page fault.
  2000-10-26 19:53     ` Rik van Riel
@ 2000-10-27  2:14       ` afei
  2000-10-27 11:17         ` Stephen C. Tweedie
       [not found]         ` <8tboe4$3bfb7$1@fido.engr.sgi.com>
  0 siblings, 2 replies; 17+ messages in thread
From: afei @ 2000-10-27  2:14 UTC (permalink / raw)
  To: Rik van Riel; +Cc: afei, M.Jagadish Kumar, linux-mm

You are right. I misunderstood what he wants. To know when the pagefault
occured, one simply can work on the pagefault handler. It is trivial.

Fei

On Thu, 26 Oct 2000, Rik van Riel wrote:

> On Thu, 26 Oct 2000 afei@jhu.edu wrote:
> > On Fri, 27 Oct 2000, M.Jagadish Kumar wrote:
> > 
> > > Is there any way in which i can know when the pagefault occured,
> > > i mean at what instruction of my program execution.
> > > Does OS provide any support. This would help me to improve my program.
> 
> > The way I use is to use oops message and System.map to locate
> > the subroutine where the oops occured. To find the exact line
> > where the oops occured, you need to either check assemble code
> > or use more complicated kernel debug technique. I think Rik
> > covered some in his kernel debug slides.
> 
> You're confusing issues. A pagefault has NOTHING to do
> with an oops...
> 
> Rik
> --
> "What you're running that piece of shit Gnome?!?!"
>        -- Miguel de Icaza, UKUUG 2000
> 
> http://www.conectiva.com/		http://www.surriel.com/
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* page fault.
  2000-10-26 15:58 ptes flags in compressed cache Stephen C. Tweedie
@ 2000-10-27  2:12 ` M.Jagadish Kumar
  2000-10-26 19:45   ` afei
  2000-10-30 12:19   ` volodya
  0 siblings, 2 replies; 17+ messages in thread
From: M.Jagadish Kumar @ 2000-10-27  2:12 UTC (permalink / raw)
  To: linux-mm

hello,
Is there any way in which i can know when the pagefault occured,
i mean at what instruction of my program execution.
Does OS provide any support. This would help me to improve my program.
thanx
jagadish


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: page fault.
       [not found] <8ta1ir$358it$1@fido.engr.sgi.com>
@ 2000-10-26 20:44 ` Rajagopal Ananthanarayanan
  0 siblings, 0 replies; 17+ messages in thread
From: Rajagopal Ananthanarayanan @ 2000-10-26 20:44 UTC (permalink / raw)
  To: M.Jagadish Kumar, linux-mm

"M.Jagadish Kumar" wrote:
> 
> hello,
> Is there any way in which i can know when the pagefault occured,
> i mean at what instruction of my program execution.
> Does OS provide any support. This would help me to improve my program.


Unless the test program is the only one on the system,
there are other programs which will affect the pagefault
of the test program,  since the pages of those other programs
affect the resident pages of the test program.

AFAICT, there is no direct means of saying which instructions
caused page faults ... things like /sbin/time can report
total page faults only.

Why are you specifically interested in page faults?

--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
--------------------------------------------------------------------------
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: page fault.
  2000-10-26 19:45   ` afei
@ 2000-10-26 19:53     ` Rik van Riel
  2000-10-27  2:14       ` afei
  0 siblings, 1 reply; 17+ messages in thread
From: Rik van Riel @ 2000-10-26 19:53 UTC (permalink / raw)
  To: afei; +Cc: M.Jagadish Kumar, linux-mm

On Thu, 26 Oct 2000 afei@jhu.edu wrote:
> On Fri, 27 Oct 2000, M.Jagadish Kumar wrote:
> 
> > Is there any way in which i can know when the pagefault occured,
> > i mean at what instruction of my program execution.
> > Does OS provide any support. This would help me to improve my program.

> The way I use is to use oops message and System.map to locate
> the subroutine where the oops occured. To find the exact line
> where the oops occured, you need to either check assemble code
> or use more complicated kernel debug technique. I think Rik
> covered some in his kernel debug slides.

You're confusing issues. A pagefault has NOTHING to do
with an oops...

Rik
--
"What you're running that piece of shit Gnome?!?!"
       -- Miguel de Icaza, UKUUG 2000

http://www.conectiva.com/		http://www.surriel.com/

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: page fault.
  2000-10-27  2:12 ` page fault M.Jagadish Kumar
@ 2000-10-26 19:45   ` afei
  2000-10-26 19:53     ` Rik van Riel
  2000-10-30 12:19   ` volodya
  1 sibling, 1 reply; 17+ messages in thread
From: afei @ 2000-10-26 19:45 UTC (permalink / raw)
  To: M.Jagadish Kumar; +Cc: linux-mm


On Fri, 27 Oct 2000, M.Jagadish Kumar wrote:

> hello,
> Is there any way in which i can know when the pagefault occured,
> i mean at what instruction of my program execution.
> Does OS provide any support. This would help me to improve my program.
> thanx
> jagadish
The way I use is to use oops message and System.map to locate the
subroutine where the oops occured. To find the exact line where the oops
occured, you need to either check assemble code or use more complicated
kernel debug technique. I think Rik covered some in his kernel debug
slides.

Fei

> 
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org.  For more info on Linux MM,
> see: http://www.linux.eu.org/Linux-MM/
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-04-23 16:44 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-29 18:19 Page Fault Gohar Irfan
2015-11-30 10:32 ` Jan Beulich
2015-11-30 18:33   ` Gohar Irfan
     [not found] <cc589888bda02ea2e599e3ac312e71a@cweb006.nm.nfra.io>
2020-04-23 16:42 ` Enzo Desiage
  -- strict thread matches above, loose matches on Subject: below --
2020-04-23  0:02 Enzo Desiage
2004-07-25  5:17 Page fault bharat
2004-07-23 13:49 [PATCH] export m8xx_cpm_hostalloc Andreas Oberritter
     [not found] ` <20820601.1090640061250.JavaMail.administrator@RnDserver>
2004-07-24  3:52   ` page fault bharat
2004-07-24 17:16     ` David Woodhouse
2004-06-10 13:08 bharat
     [not found] <8ta1ir$358it$1@fido.engr.sgi.com>
2000-10-26 20:44 ` Rajagopal Ananthanarayanan
2000-10-26 15:58 ptes flags in compressed cache Stephen C. Tweedie
2000-10-27  2:12 ` page fault M.Jagadish Kumar
2000-10-26 19:45   ` afei
2000-10-26 19:53     ` Rik van Riel
2000-10-27  2:14       ` afei
2000-10-27 11:17         ` Stephen C. Tweedie
     [not found]         ` <8tboe4$3bfb7$1@fido.engr.sgi.com>
2000-10-27 17:38           ` Rajagopal Ananthanarayanan
2000-10-30 12:19   ` volodya

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.