acrn-kernel/fs
Jiri Kosina c1d171a002 x86: randomize brk
Randomize the location of the heap (brk) for i386 and x86_64.  The range is
randomized in the range starting at current brk location up to 0x02000000
offset for both architectures.  This, together with
pie-executable-randomization.patch and
pie-executable-randomization-fix.patch, should make the address space
randomization on i386 and x86_64 complete.

Arjan says:

This is known to break older versions of some emacs variants, whose dumper
code assumed that the last variable declared in the program is equal to the
start of the dynamically allocated memory region.

(The dumper is the code where emacs effectively dumps core at the end of it's
compilation stage; this coredump is then loaded as the main program during
normal use)

iirc this was 5 years or so; we found this way back when I was at RH and we
first did the security stuff there (including this brk randomization).  It
wasn't all variants of emacs, and it got fixed as a result (I vaguely remember
that emacs already had code to deal with it for other archs/oses, just
ifdeffed wrongly).

It's a rare and wrong assumption as a general thing, just on x86 it mostly
happened to be true (but to be honest, it'll break too if gcc does
something fancy or if the linker does a non-standard order).  Still its
something we should at least document.

Note 2: afaik it only broke the emacs *build*.  I'm not 100% sure about that
(it IS 5 years ago) though.

[ akpm@linux-foundation.org: deuglification ]

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Roland McGrath <roland@redhat.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30 13:30:40 +01:00
..
9p
adfs
affs
afs vfs: Add 64 bit i_version support 2008-01-28 23:58:27 -05:00
autofs
autofs4
befs
bfs regression: bfs endianness bug 2007-12-05 09:25:20 -08:00
cifs [CIFS] DFS build fixes 2008-01-25 10:12:41 +00:00
coda coda: convert struct class_device to struct device 2008-01-24 20:40:05 -08:00
configfs configfs: file.c fix possible recursive locking 2008-01-25 15:05:47 -08:00
cramfs
debugfs Kobject: convert fs/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
devpts
dlm Kobject: convert fs/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
ecryptfs [NETNS]: Consolidate kernel netlink socket destruction. 2008-01-28 15:08:07 -08:00
efs
exportfs
ext2 ext2: Fix the max file size for ext2 file system. 2008-01-28 23:58:26 -05:00
ext3 ext3: Fix the max file size for ext3 file system. 2008-01-28 23:58:26 -05:00
ext4 ext4: Use the ext4_ext_actual_len() helper function 2008-01-28 23:58:27 -05:00
fat fat: optimize fat_count_free_clusters() 2008-01-08 16:10:35 -08:00
freevxfs
fuse Kobject: convert fs/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
gfs2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw 2008-01-25 08:39:18 -08:00
hfs hfs: fix coverity-found null deref 2008-01-17 15:38:58 -08:00
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd jbd: do not try lock_acquire after handle made invalid 2008-01-17 15:38:59 -08:00
jbd2 jbd2: sparse pointer use of zero as null 2008-01-28 23:58:27 -05:00
jffs2 Freezer: Fix JFFS2 garbage collector freezing issue (rev. 2) 2007-12-04 01:35:41 -05:00
jfs mount options: fix jfs 2008-01-24 16:13:21 -06:00
lockd NLM: Fix a bogus 'return' in nlmclnt_rpc_release 2008-01-30 02:06:08 -05:00
minix
msdos
ncpfs
nfs NFSv4: Iterate through all nfs_clients when the server recalls a delegation 2008-01-30 02:06:12 -05:00
nfs_common
nfsd knfsd: Allow NFSv2/3 WRITE calls to succeed when krb5i etc is used. 2008-01-13 09:57:57 -08:00
nls
ntfs
ocfs2 ocfs2: Fix userspace ABI breakage in sysfs 2008-01-28 19:10:23 -08:00
openpromfs [SPARC]: Constify function pointer tables. 2008-01-22 18:29:20 -08:00
partitions Kobject: convert fs/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
proc [ATM]: Oops reading net/atm/arp 2008-01-28 15:01:36 -08:00
qnx4
ramfs
reiserfs proc: fix proc_dir_entry refcounting 2007-12-05 09:21:20 -08:00
romfs
smbfs FS: Remove dead code 2008-01-28 23:14:37 +01:00
sysfs Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-01-25 17:19:08 -08:00
sysv
udf
ufs ufs: fix nexstep dir block size 2007-12-05 09:21:18 -08:00
vfat
xfs [XFS] fix unaligned access in readdir 2008-01-11 18:05:04 +11:00
Kconfig ext4: Add the journal checksum feature 2008-01-28 23:58:27 -05:00
Kconfig.binfmt
Makefile
aio.c aio: only account I/O wait time in read_events if there are active requests 2007-12-05 09:21:18 -08:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c mm: fix exit_mmap BUG() on a.out binary exit 2007-12-20 07:49:53 -08:00
binfmt_elf.c x86: randomize brk 2008-01-30 13:30:40 +01:00
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio.c __bio_clone: don't calculate hw/phys segment counts 2008-01-28 10:04:46 +01:00
block_dev.c Driver core: convert block from raw kobjects to core devices 2008-01-24 20:40:36 -08:00
buffer.c Add buffer head related helper functions 2008-01-28 23:58:26 -05:00
char_dev.c Kobject: rename kobject_init_ng() to kobject_init() 2008-01-24 20:40:38 -08:00
compat.c security: call security_file_permission from rw_verify_area 2008-01-25 11:29:52 +11:00
compat_ioctl.c remove __attribute_used__ 2008-01-28 23:21:18 +01:00
dcache.c
dcookies.c
direct-io.c
dnotify.c
dquot.c Don't send quota messages repeatedly when hardlimit reached 2007-12-23 12:54:36 -08:00
drop_caches.c
eventfd.c
eventpoll.c
exec.c vfs: coredumping fix 2007-11-28 10:58:01 -08:00
fcntl.c
fifo.c
file.c
file_table.c
filesystems.c
fs-writeback.c Revert "writeback: introduce writeback_control.more_io to indicate more io" 2008-01-14 21:21:29 -08:00
generic_acl.c
inode.c ext4: Add inode version support in ext4 2008-01-28 23:58:27 -05:00
inotify.c
inotify_user.c
internal.h
ioctl.c
ioprio.c cfq-iosched: relax IOPRIO_CLASS_IDLE restrictions 2008-01-28 11:38:15 +01:00
libfs.c
locks.c
mbcache.c
mpage.c
namei.c Use access mode instead of open flags to determine needed permissions 2008-01-12 14:47:58 -08:00
namespace.c kobject: convert main fs kobject to use kobject_create 2008-01-24 20:40:13 -08:00
nfsctl.c
no-block.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
quota.c
quota_v1.c
quota_v2.c
read_write.c ext4: export iov_shorten from kernel for ext4's use 2008-01-28 23:58:27 -05:00
read_write.h
readdir.c
select.c
seq_file.c
signalfd.c
splice.c splice: fix problem with atime not being updated 2008-01-29 21:55:20 +01:00
stack.c
stat.c
super.c
sync.c
timerfd.c
utimes.c
xattr.c
xattr_acl.c