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>] [day] [month] [year] [list]
Message-ID: <CAM3X=jOq+1uNZtwPh0am00jq0nsHu+bdVUPvpsyb+qr=5opTjA@mail.gmail.com>
Date:	Fri, 10 Aug 2012 15:59:07 +0530
From:	kps mailme <kps.mailme@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: Issues with ioremap

Hello,
I have a ARM926 based development board. I am trying to remap 23 MB of
IO memory using ioremap and access with the code snippet below, mm
throws an exception most of the times -
#define MRAM_SIZE 23068672

    while(1)
    {
        offset = test_random() % MRAM_SIZE;
        virt_addr = mmem + offset;
        page = virt_to_page (virt_addr);
        get_page(page);
        /* do something */
        put_page(page);
    }
Exception in linux-kernel ver - 3.1-
[  116.390625] [<bf0120a4>] (test_init+0xa4/0x114 [test]) from
[<c0008770>] (do_one_initcall+0x94/0x16c)
[  116.390625] [<c0008770>] (do_one_initcall+0x94/0x16c) from
[<c0043f50>] (sys_init_module+0xd8c/0xfdc)
[  116.390625] [<c0043f50>] (sys_init_module+0xd8c/0xfdc) from
[<c0009280>] (ret_fast_syscall+0x0/0x2c)
[  116.390625] Code: e7933280 e3130902 0a000008 e594301c (e5932010)

0xa4 is in test_init (include/linux/mm.h:386).
381            /*
382             * This is safe only because
383             * __split_huge_page_refcount can't run under
384             * get_page().
385             */
386            VM_BUG_ON(atomic_read(&page->first_page->_count) < 0);
387            atomic_inc(&page->first_page->_count);
388        }
389    }


Exception in linux-kernel ver - 3.4.3 -
[  108.640625] [<c0063ce4>] (__get_page_tail+0x20/0xb0) from
[<bf012084>] (test_init+0x84/0x100 [test])
[  108.640625] [<bf012084>] (test_init+0x84/0x100 [test]) from
[<c0008770>] (do_one_initcall+0x94/0x16c)
[  108.640625] [<c0008770>] (do_one_initcall+0x94/0x16c) from
[<c0045330>] (sys_init_module+0x70/0x18c)
[  108.640625] [<c0045330>] (sys_init_module+0x70/0x18c) from
[<c0009320>] (ret_fast_syscall+0x0/0x2c)
[  108.640625] Code: 0a000023 e590001c e1530000 0a000020 (e5902010)

Is there a limitation on the size of memory that can be mapped using
ioremap? Looks like, first_page is not configured correctly for memory
mapped using ioremap.
This is a shared memory used by a network device to read and write ip
packets. Can someone please confirm? Any pointers on how to debug and
fix this issue are much appreciated.

Thank you!
Regards, Pratik

[Note: I tried using iotable but situation does not improve.]
--
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