Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
14f9761e
Commit
14f9761e
authored
Jul 19, 2004
by
Patrick Mochel
Browse files
Options
Browse Files
Download
Plain Diff
Merge digitalimplant.org:/home/mochel/src/linux-2.6-virgin
into digitalimplant.org:/home/mochel/src/linux-2.6-power
parents
9556b782
1bb0fa18
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
89 additions
and
37 deletions
+89
-37
Makefile
Makefile
+1
-1
arch/i386/mm/discontig.c
arch/i386/mm/discontig.c
+5
-1
arch/ppc/defconfig
arch/ppc/defconfig
+3
-3
arch/x86_64/kernel/smpboot.c
arch/x86_64/kernel/smpboot.c
+1
-4
drivers/serial/pmac_zilog.c
drivers/serial/pmac_zilog.c
+27
-5
fs/binfmt_elf.c
fs/binfmt_elf.c
+3
-1
fs/exec.c
fs/exec.c
+6
-2
include/asm-i386/elf.h
include/asm-i386/elf.h
+7
-1
include/asm-i386/page.h
include/asm-i386/page.h
+4
-2
include/linux/personality.h
include/linux/personality.h
+7
-0
kernel/exit.c
kernel/exit.c
+8
-11
mm/mmap.c
mm/mmap.c
+7
-6
mm/mprotect.c
mm/mprotect.c
+7
-0
security/selinux/hooks.c
security/selinux/hooks.c
+3
-0
No files found.
Makefile
View file @
14f9761e
VERSION
=
2
PATCHLEVEL
=
6
SUBLEVEL
=
8
EXTRAVERSION
=
-rc
1
EXTRAVERSION
=
-rc
2
NAME
=
Zonked Quokka
# *DOCUMENTATION*
...
...
arch/i386/mm/discontig.c
View file @
14f9761e
...
...
@@ -448,7 +448,11 @@ void __init set_highmem_pages_init(int bad_ppro)
void
__init
set_max_mapnr_init
(
void
)
{
#ifdef CONFIG_HIGHMEM
highmem_start_page
=
NODE_DATA
(
0
)
->
node_zones
[
ZONE_HIGHMEM
].
zone_mem_map
;
struct
zone
*
high0
=
&
NODE_DATA
(
0
)
->
node_zones
[
ZONE_HIGHMEM
];
if
(
high0
->
spanned_pages
>
0
)
highmem_start_page
=
high0
->
zone_mem_map
;
else
highmem_start_page
=
pfn_to_page
(
max_low_pfn
+
1
);
num_physpages
=
highend_pfn
;
#else
num_physpages
=
max_low_pfn
;
...
...
arch/ppc/defconfig
View file @
14f9761e
...
...
@@ -689,7 +689,7 @@ CONFIG_SERIO_SERPORT=y
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ATKBD is not set
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
...
...
@@ -724,8 +724,8 @@ CONFIG_SERIAL_8250_NR_UARTS=4
#
# Non-8250 serial port support
#
# CONFIG_SERIAL_CORE is not set
# CONFIG_SERIAL_PMACZILOG is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_PMACZILOG=y
# CONFIG_SERIAL_PMACZILOG_CONSOLE is not set
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
...
...
arch/x86_64/kernel/smpboot.c
View file @
14f9761e
...
...
@@ -659,7 +659,7 @@ static void __init do_boot_cpu (int apicid)
Dprintk
(
"CPU has booted.
\n
"
);
}
else
{
boot_error
=
1
;
if
(
*
((
volatile
unsigned
char
*
)
phys_to_virt
(
8192
))
if
(
*
((
volatile
unsigned
char
*
)
phys_to_virt
(
SMP_TRAMPOLINE_BASE
))
==
0xA5
)
/* trampoline started but...? */
printk
(
"Stuck ??
\n
"
);
...
...
@@ -676,9 +676,6 @@ static void __init do_boot_cpu (int apicid)
clear_bit
(
cpu
,
&
cpu_initialized
);
/* was set by cpu_init() */
cpucount
--
;
}
/* mark "stuck" area as not stuck */
*
((
volatile
unsigned
*
)
phys_to_virt
(
8192
))
=
0
;
}
cycles_t
cacheflush_time
;
...
...
drivers/serial/pmac_zilog.c
View file @
14f9761e
...
...
@@ -1433,6 +1433,7 @@ static int __init pmz_init_port(struct uart_pmac_port *uap)
ioremap
(
np
->
addrs
[
np
->
n_addrs
-
1
].
address
,
0x1000
);
if
(
uap
->
rx_dma_regs
==
NULL
)
{
iounmap
((
void
*
)
uap
->
tx_dma_regs
);
uap
->
tx_dma_regs
=
NULL
;
uap
->
flags
&=
~
PMACZILOG_FLAG_HAS_DMA
;
goto
no_dma
;
}
...
...
@@ -1490,7 +1491,6 @@ static int __init pmz_init_port(struct uart_pmac_port *uap)
uap
->
port
.
ops
=
&
pmz_pops
;
uap
->
port
.
type
=
PORT_PMAC_ZILOG
;
uap
->
port
.
flags
=
0
;
spin_lock_init
(
&
uap
->
port
.
lock
);
/* Setup some valid baud rate information in the register
* shadows so we don't write crap there before baud rate is
...
...
@@ -1508,10 +1508,13 @@ static void pmz_dispose_port(struct uart_pmac_port *uap)
{
struct
device_node
*
np
;
iounmap
((
void
*
)
uap
->
control_reg
);
np
=
uap
->
node
;
iounmap
((
void
*
)
uap
->
rx_dma_regs
);
iounmap
((
void
*
)
uap
->
tx_dma_regs
);
iounmap
((
void
*
)
uap
->
control_reg
);
uap
->
node
=
NULL
;
of_node_put
(
np
);
memset
(
uap
,
0
,
sizeof
(
struct
uart_pmac_port
));
}
/*
...
...
@@ -1798,7 +1801,7 @@ static int __init pmz_register(void)
* Register this driver with the serial core
*/
rc
=
uart_register_driver
(
&
pmz_uart_reg
);
if
(
rc
!=
0
)
if
(
rc
)
return
rc
;
/*
...
...
@@ -1808,10 +1811,19 @@ static int __init pmz_register(void)
struct
uart_pmac_port
*
uport
=
&
pmz_ports
[
i
];
/* NULL node may happen on wallstreet */
if
(
uport
->
node
!=
NULL
)
uart_add_one_port
(
&
pmz_uart_reg
,
&
uport
->
port
);
rc
=
uart_add_one_port
(
&
pmz_uart_reg
,
&
uport
->
port
);
if
(
rc
)
goto
err_out
;
}
return
0
;
err_out:
while
(
i
--
>
0
)
{
struct
uart_pmac_port
*
uport
=
&
pmz_ports
[
i
];
uart_remove_one_port
(
&
pmz_uart_reg
,
&
uport
->
port
);
}
uart_unregister_driver
(
&
pmz_uart_reg
);
return
rc
;
}
static
struct
of_match
pmz_match
[]
=
...
...
@@ -1841,6 +1853,7 @@ static struct macio_driver pmz_driver =
static
int
__init
init_pmz
(
void
)
{
int
rc
,
i
;
printk
(
KERN_INFO
"%s
\n
"
,
version
);
/*
...
...
@@ -1862,7 +1875,16 @@ static int __init init_pmz(void)
/*
* Now we register with the serial layer
*/
pmz_register
();
rc
=
pmz_register
();
if
(
rc
)
{
printk
(
KERN_ERR
"pmac_zilog: Error registering serial device, disabling pmac_zilog.
\n
"
"pmac_zilog: Did another serial driver already claim the minors?
\n
"
);
/* effectively "pmz_unprobe()" */
for
(
i
=
0
;
i
<
pmz_ports_count
;
i
++
)
pmz_dispose_port
(
&
pmz_ports
[
i
]);
return
rc
;
}
/*
* Then we register the macio driver itself
...
...
fs/binfmt_elf.c
View file @
14f9761e
...
...
@@ -627,8 +627,10 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
executable_stack
=
EXSTACK_DISABLE_X
;
break
;
}
#ifdef LEGACY_BINARIES
if
(
i
==
elf_ex
.
e_phnum
)
def_flags
|=
VM_EXEC
|
VM_MAYEXEC
;
current
->
personality
|=
READ_IMPLIES_EXEC
;
#endif
/* Some simple consistency checks for the interpreter */
if
(
elf_interpreter
)
{
...
...
fs/exec.c
View file @
14f9761e
...
...
@@ -887,8 +887,10 @@ int prepare_binprm(struct linux_binprm *bprm)
if
(
!
(
bprm
->
file
->
f_vfsmnt
->
mnt_flags
&
MNT_NOSUID
))
{
/* Set-uid? */
if
(
mode
&
S_ISUID
)
if
(
mode
&
S_ISUID
)
{
current
->
personality
&=
~
PER_CLEAR_ON_SETID
;
bprm
->
e_uid
=
inode
->
i_uid
;
}
/* Set-gid? */
/*
...
...
@@ -896,8 +898,10 @@ int prepare_binprm(struct linux_binprm *bprm)
* is a candidate for mandatory locking, not a setgid
* executable.
*/
if
((
mode
&
(
S_ISGID
|
S_IXGRP
))
==
(
S_ISGID
|
S_IXGRP
))
if
((
mode
&
(
S_ISGID
|
S_IXGRP
))
==
(
S_ISGID
|
S_IXGRP
))
{
current
->
personality
&=
~
PER_CLEAR_ON_SETID
;
bprm
->
e_gid
=
inode
->
i_gid
;
}
}
/* fill in binprm security blob */
...
...
include/asm-i386/elf.h
View file @
14f9761e
...
...
@@ -117,7 +117,13 @@ typedef struct user_fxsr_struct elf_fpxregset_t;
#define AT_SYSINFO_EHDR 33
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
#define SET_PERSONALITY(ex, ibcs2) do { } while (0)
/*
* A legacy binary, when loaded by the ELF loader, will have the
* READ_IMPLIES_EXEC personality flag set automatically:
*/
#define LEGACY_BINARIES
extern
int
dump_task_regs
(
struct
task_struct
*
,
elf_gregset_t
*
);
extern
int
dump_task_fpu
(
struct
task_struct
*
,
elf_fpregset_t
*
);
...
...
include/asm-i386/page.h
View file @
14f9761e
...
...
@@ -140,8 +140,10 @@ static __inline__ int get_order(unsigned long size)
#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#define VM_DATA_DEFAULT_FLAGS \
(VM_READ | VM_WRITE | \
((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif
/* __KERNEL__ */
...
...
include/linux/personality.h
View file @
14f9761e
...
...
@@ -30,6 +30,7 @@ extern int abi_fake_utsname;
*/
enum
{
MMAP_PAGE_ZERO
=
0x0100000
,
READ_IMPLIES_EXEC
=
0x0400000
,
ADDR_LIMIT_32BIT
=
0x0800000
,
SHORT_INODE
=
0x1000000
,
WHOLE_SECONDS
=
0x2000000
,
...
...
@@ -37,6 +38,12 @@ enum {
ADDR_LIMIT_3GB
=
0x8000000
,
};
/*
* Security-relevant compatibility flags that must be
* cleared upon setuid or setgid exec:
*/
#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC)
/*
* Personality types.
*
...
...
kernel/exit.c
View file @
14f9761e
...
...
@@ -1018,20 +1018,17 @@ static int wait_task_zombie(task_t *p, unsigned int __user *stat_addr, struct ru
if
(
p
->
real_parent
!=
p
->
parent
)
{
__ptrace_unlink
(
p
);
p
->
state
=
TASK_ZOMBIE
;
/* If this is a detached thread, this is where it goes away. */
if
(
p
->
exit_signal
==
-
1
)
{
/* release_task takes the lock itself. */
write_unlock_irq
(
&
tasklist_lock
);
release_task
(
p
);
}
else
{
/*
* If this is not a detached task, notify the parent. If it's
* still not detached after that, don't release it now.
*/
if
(
p
->
exit_signal
!=
-
1
)
{
do_notify_parent
(
p
,
p
->
exit_signal
);
write_unlock_irq
(
&
tasklist_lock
);
if
(
p
->
exit_signal
!=
-
1
)
p
=
NULL
;
}
p
=
NULL
;
}
else
write_unlock_irq
(
&
tasklist_lock
);
write_unlock_irq
(
&
tasklist_lock
);
}
if
(
p
!=
NULL
)
release_task
(
p
);
...
...
mm/mmap.c
View file @
14f9761e
...
...
@@ -750,6 +750,13 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
int
accountable
=
1
;
unsigned
long
charged
=
0
;
/*
* Does the application expect PROT_READ to imply PROT_EXEC:
*/
if
(
unlikely
((
prot
&
PROT_READ
)
&&
(
current
->
personality
&
READ_IMPLIES_EXEC
)))
prot
|=
PROT_EXEC
;
if
(
file
)
{
if
(
is_file_hugepages
(
file
))
accountable
=
0
;
...
...
@@ -792,12 +799,6 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
vm_flags
=
calc_vm_prot_bits
(
prot
)
|
calc_vm_flag_bits
(
flags
)
|
mm
->
def_flags
|
VM_MAYREAD
|
VM_MAYWRITE
|
VM_MAYEXEC
;
/*
* mm->def_flags might have VM_EXEC set, which PROT_NONE does NOT want.
*/
if
(
prot
==
PROT_NONE
)
vm_flags
&=
~
VM_EXEC
;
if
(
flags
&
MAP_LOCKED
)
{
if
(
!
capable
(
CAP_IPC_LOCK
))
return
-
EPERM
;
...
...
mm/mprotect.c
View file @
14f9761e
...
...
@@ -17,6 +17,7 @@
#include <linux/highmem.h>
#include <linux/security.h>
#include <linux/mempolicy.h>
#include <linux/personality.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
...
...
@@ -205,6 +206,12 @@ sys_mprotect(unsigned long start, size_t len, unsigned long prot)
return
-
EINVAL
;
if
(
end
==
start
)
return
0
;
/*
* Does the application expect PROT_READ to imply PROT_EXEC:
*/
if
(
unlikely
((
prot
&
PROT_READ
)
&&
(
current
->
personality
&
READ_IMPLIES_EXEC
)))
prot
|=
PROT_EXEC
;
vm_flags
=
calc_vm_prot_bits
(
prot
);
...
...
security/selinux/hooks.c
View file @
14f9761e
...
...
@@ -1894,6 +1894,9 @@ static void selinux_bprm_apply_creds(struct linux_binprm *bprm, int unsafe)
task_unlock
(
current
);
}
/* Clear any possibly unsafe personality bits on exec: */
current
->
personality
&=
~
PER_CLEAR_ON_SETID
;
/* Close files for which the new task SID is not authorized. */
flush_unauthorized_files
(
current
->
files
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment