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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <11649.19421.qm@web39421.mail.mud.yahoo.com>
Date:	Wed, 16 Mar 2011 22:54:51 -0700 (PDT)
From:	Kenny Simpson <theonetruekenny@...oo.com>
To:	linux-kernel@...r.kernel.org
Subject: remap_file_pages doesn't like MAP_ANONYMOUS (but used to?)

Hello,
  In older kernels (2.6.15-2.6.18?) I was able to make an anonymous mapping and remap part of it back over itself to create a circular buffer:
  p = mmap(0, sz, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0)
  remap_file_pages(p + sz/2, sz/2, 0/*prot*/, 0/*offset*/, 0/*flags*/)

I find the same method fails with EINVAL on the remap_file_pages call in 2.6.35/38.  Making a dummy file or shared memory object works, but seems a bit more messy.

Why drop support for ANONYMOUS?  Is there another way to get the same effect?

thanks,
-Kenny



      
--
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