- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Usage of mprotect() on address space mapped via sy...
Operating System - OpenVMS
1752339
Members
5659
Online
108787
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2009 08:26 PM
02-10-2009 08:26 PM
Usage of mprotect() on address space mapped via sys$mgblsc
Is there is any restrictions on using mprotect on memory residing in a global sections?
The mprotect works fine when used on memory obtained via malloc(), but fails with ENOMEM when used on addresses residing in a global section.
The mprotect works fine when used on memory obtained via malloc(), but fails with ENOMEM when used on addresses residing in a global section.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2009 01:51 PM
02-11-2009 01:51 PM
Re: Usage of mprotect() on address space mapped via sys$mgblsc
Shreesha,
This doesn't surprise me much. Are individual process mappings allowed to have different protections on the same global section? The lack of a "prot" argument for $mgblsc suggests not. Fairly obviously, you don't want to allow a process to change the protection for other processes.
According to the documentation ENOMEM has two meanings:
[ENOMEM]
Addresses in the range [addr, addr + len) are invalid for the address space of a process, or specify one or more pages which are not mapped.
[ENOMEM]
The prot argument specifies PROT_WRITE on a MAP_PRIVATE mapping, and it would require more space than the system is able to supply for locking the private pages, if required.
I suspect the former applies to global sections, but it's worth checking that your sizes are correct.
Any reason the protection specified at the time the section was created isn't correct?
This doesn't surprise me much. Are individual process mappings allowed to have different protections on the same global section? The lack of a "prot" argument for $mgblsc suggests not. Fairly obviously, you don't want to allow a process to change the protection for other processes.
According to the documentation ENOMEM has two meanings:
[ENOMEM]
Addresses in the range [addr, addr + len) are invalid for the address space of a process, or specify one or more pages which are not mapped.
[ENOMEM]
The prot argument specifies PROT_WRITE on a MAP_PRIVATE mapping, and it would require more space than the system is able to supply for locking the private pages, if required.
I suspect the former applies to global sections, but it's worth checking that your sizes are correct.
Any reason the protection specified at the time the section was created isn't correct?
A crucible of informative mistakes
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP