missing bit of non-executable data patch

missing bit of non-executable data patch

Post by Bjorn Helgaa » Sun, 29 Sep 2002 06:50:06

Most of David Mosberger's work to allow data to be non-executable
by default is already in, but this bit appears to have been lost.
Note that all architectures except ia64 currently set the default
so data is executable, so this doesn't change behavior for anybody.

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#                  ChangeSet    1.683   -> 1.684  
#         include/linux/mm.h    1.39    -> 1.40  
#       include/asm-arm/page.h  1.4     -> 1.5    
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------

# Last bit of VM_DATA_DEFAULT_FLAGS patch (makes rights on a data
# page architecture-dependent).
# --------------------------------------------
diff -Nru a/include/asm-arm/page.h b/include/asm-arm/page.h
--- a/include/asm-arm/page.h    Fri Sep 20 16:13:54 2002

 #define VALID_PAGE(page)       ((page - mem_map) < max_mapnr)

+                                VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)

diff -Nru a/include/linux/mm.h b/include/linux/mm.h
--- a/include/linux/mm.h        Fri Sep 20 16:13:54 2002

 #define VM_DONTEXPAND  0x00040000      /* Cannot expand with mremap() */
 #define VM_RESERVED    0x00080000      /* Don't unmap it from swap_out */

-#define VM_STACK_FLAGS 0x00000177

 #define VM_READHINTMASK                        (VM_SEQ_READ | VM_RAND_READ)
 #define VM_ClearReadHint(v)            (v)->vm_flags &= ~VM_READHINTMASK
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


1. I need to run 16-bit executable on 32-bit OS

(My previous posting's description seems to have its ending "?" truncated,
so I am re-posting with a new description.)

What I need is the ability to -run- existing 16-bit compiled and linked code
on a 32-bit UNIX operating system and have it interface to native UNIX code.

I have a package running on an 80286.  I want to move it to a UNIX platform,
and UnixWare is what my company would like to use.

The package DOES NOT run under DOS.  It runs on our own system which DOES
NOT use any protected mode capabilities of the 80286.  However, executables
that we load and run -are- in DOS's 16-bit ".EXE" format (the non-Windows
format).  Loading the executable into memory is not a problem.  I already
have a solution for that.  What I need to resolve is the following:

  1.  How do I tell UnixWare that the code I want it to execute is 16-bit
        code, and
  2.  How do I call 32-bit routines from the 16-bit code?

Note:  The executable is already being passed the address of a table of
service routine addresses in segment:offset format.  The executable then
uses these routine addresses for every access to system services for file,
I/O, and other operations.

BTW:  UnixWare -does- come with a product called Merge from Locus Computing
Corporation, but it does not fully meet our needs.


Apertus Technologies                                       (612) 828-0582
Eden Prairie, MN

2. compressing algorithm

3. How to log SMTP Dialogues

4. Why is my 32 bit executable faster than 64 bit build on ultra sparc.

5. OH My God !!!!

6. How to run a 16-bit executable on a 32-bit OS?

7. Display errors

8. can we make anonymous memory non-EXECUTABLE?

9. Non-Executable stack on Linux 2.2.x kernels?

10. What to do with non-executable core?

11. a non-executable program???

12. a non-executable program? answer...