Please change the clib_unix_warning to print p->stack and page_size.

If they look sane—which is likely—you’ll need to figure out why the kernel is 
complaining. I wouldn’t be shocked to discover that the 64k page size kernel 
simply refuses to read-protect one 64k page in the middle of a much larger 
chunk of read/write memory.

Worst-case you can simply disable the mprotect call which creates 
stack-overflow guard pages. You won’t detect stack overflows as easily, but vpp 
will run fine without the guard pages so long as no stack overflows occur.

D.

From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Lei Zhang
Sent: Friday, November 22, 2019 1:05 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] Support needed for ARM64 64k pagesize

Hi,

    Anyone knows if VPP can support ARM64 64K pagesize?
   Or anyone has experiences on below issue?

   Thank you!

    Here is the kernel config.
# CONFIG_ARM64_4K_PAGES is not set
# CONFIG_ARM64_16K_PAGES is not set
CONFIG_ARM64_64K_PAGES=y

    VPP reports a lot of errors when it starts up on ARM64 64k pagesize 
enviroment.

load_one_plugin:189: Loaded plugin: stn_plugin.so (VPP Steals the NIC for 
Container integration)
load_one_plugin:189: Loaded plugin: svs_plugin.so (Source VRF Select)
load_one_plugin:189: Loaded plugin: tlsopenssl_plugin.so (openssl based TLS 
Engine)
load_one_plugin:117: Plugin disabled (default): unittest_plugin.so
load_one_plugin:189: Loaded plugin: vmxnet3_plugin.so (VMWare Vmxnet3 Device 
Plugin)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)

     The source code of the error is at mprotect(). It seems that VPP memeory 
management may not support 64K pagesize.
#ifdef CLIB_UNIX
        /*
         * Disallow writes to the bottom page of the stack, to
         * catch stack overflows.
         */
        if (mprotect (p->stack, page_size, PROT_READ) < 0)
          clib_unix_warning ("process stack");
#endif
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14671): https://lists.fd.io/g/vpp-dev/message/14671
Mute This Topic: https://lists.fd.io/mt/61493265/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to