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
87b049b5
Commit
87b049b5
authored
Jan 03, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linux-sam.bkbits.net/kbuild
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
5c4ac43f
3a28b9c6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
53 additions
and
26 deletions
+53
-26
Makefile
Makefile
+13
-9
arch/x86_64/mm/init.c
arch/x86_64/mm/init.c
+10
-0
include/asm-x86_64/page.h
include/asm-x86_64/page.h
+1
-7
include/linux/mm.h
include/linux/mm.h
+6
-2
kernel/kallsyms.c
kernel/kallsyms.c
+11
-4
mm/memory.c
mm/memory.c
+3
-3
scripts/Makefile.build
scripts/Makefile.build
+0
-1
scripts/kallsyms.c
scripts/kallsyms.c
+9
-0
No files found.
Makefile
View file @
87b049b5
...
...
@@ -149,14 +149,13 @@ space := $(nullstring) # end of line
# careful not to include files twice if building in the source
# directory. LOCALVERSION from the command line override all of this
ifeq
($(objtree),$(srctree))
localversion-files
:=
$(
wildcard
$(srctree)
/localversion
*
)
else
localversion-files
:=
$(
wildcard
$(objtree)
/localversion
*
$(srctree)
/localversion
*
)
endif
localver
:=
$(objtree)
/localversion
*
$(srctree)
/localversion
*
localver
:=
$(
sort
$(
wildcard
$(localver)
))
# skip backup files (containing '~')
localver
:=
$(
foreach
f,
$(localver)
,
$(
if
$(
findstring
~,
$(f)
)
,,
$(f)
))
LOCALVERSION
=
$(
subst
$(space)
,,
\
$(
shell
cat
/dev/null
$
(
localver
sion-files:%~
=
))
\
$(
shell
cat
/dev/null
$(localver)
)
\
$(
patsubst
"%"
,%,
$(CONFIG_LOCALVERSION)
))
KERNELRELEASE
=
$(VERSION)
.
$(PATCHLEVEL)
.
$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION)
...
...
@@ -291,7 +290,7 @@ check_gcc = $(warning check_gcc is deprecated - use cc-option) \
$(
call
cc-option,
$(1)
,
$(2)
)
# cc-option-yn
# Usage: flag := $(call
g
cc-option-yn, -march=winchip-c6)
# Usage: flag := $(call cc-option-yn, -march=winchip-c6)
cc-option-yn
=
$(
shell
if
$(CC)
$(CFLAGS)
$(1)
-S
-o
/dev/null
-xc
/dev/null
\
>
/dev/null 2>&1
;
then
echo
"y"
;
else
echo
"n"
;
fi
;
)
...
...
@@ -331,7 +330,10 @@ DEPMOD = /sbin/depmod
KALLSYMS
=
scripts/kallsyms
PERL
=
perl
CHECK
=
sparse
NOSTDINC_FLAGS
:=
-nostdinc
-isystem
$(
shell
$(CC)
-print-file-name
=
include
)
CHECKFLAGS
:=
-D__linux__
-Dlinux
-D__STDC__
-Dunix
-D__unix__
CHECKFLAGS
+=
$(NOSTDINC_FLAGS)
MODFLAGS
=
-DMODULE
CFLAGS_MODULE
=
$(MODFLAGS)
AFLAGS_MODULE
=
$(MODFLAGS)
...
...
@@ -339,7 +341,6 @@ LDFLAGS_MODULE = -r
CFLAGS_KERNEL
=
AFLAGS_KERNEL
=
NOSTDINC_FLAGS
=
-nostdinc
-iwithprefix
include
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
...
...
@@ -389,7 +390,7 @@ scripts_basic:
# using a seperate output directory. This allows convinient use
# of make in output directory
outputmakefile
:
$(Q)
if
/usr/bin/env
test
!
$(srctree)
-ef
$(objtree)
;
then
\
$(Q)
if
test
!
$(srctree)
-ef
$(objtree)
;
then
\
$(CONFIG_SHELL)
$(srctree)
/scripts/mkmakefile
\
$(srctree)
$(objtree)
$(VERSION)
$(PATCHLEVEL)
\
>
$(objtree)
/Makefile
;
\
...
...
@@ -1210,6 +1211,9 @@ checkstack:
$(OBJDUMP)
-d
vmlinux
$$
(
find
.
-name
'*.ko'
)
|
\
$(PERL)
$(src)
/scripts/checkstack.pl
$(ARCH)
kernelrelease
:
@
echo
$(KERNELRELEASE)
# FIXME Should go into a make.lib or something
# ===========================================================================
...
...
arch/x86_64/mm/init.c
View file @
87b049b5
...
...
@@ -614,3 +614,13 @@ int in_gate_area(struct task_struct *task, unsigned long addr)
struct
vm_area_struct
*
vma
=
get_gate_vma
(
task
);
return
(
addr
>=
vma
->
vm_start
)
&&
(
addr
<
vma
->
vm_end
);
}
/* Use this when you have no reliable task/vma, typically from interrupt
* context. It is less reliable than using the task's vma and may give
* false positives.
*/
int
in_gate_area_no_task
(
unsigned
long
addr
)
{
return
(((
addr
>=
VSYSCALL_START
)
&&
(
addr
<
VSYSCALL_END
))
||
((
addr
>=
VSYSCALL32_BASE
)
&&
(
addr
<
VSYSCALL32_END
)));
}
include/asm-x86_64/page.h
View file @
87b049b5
...
...
@@ -134,13 +134,7 @@ extern __inline__ int get_order(unsigned long size)
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#define CONFIG_ARCH_GATE_AREA 1
#ifndef __ASSEMBLY__
struct
task_struct
;
struct
vm_area_struct
*
get_gate_vma
(
struct
task_struct
*
tsk
);
int
in_gate_area
(
struct
task_struct
*
task
,
unsigned
long
addr
);
#endif
#define __HAVE_ARCH_GATE_AREA 1
#endif
/* __KERNEL__ */
...
...
include/linux/mm.h
View file @
87b049b5
...
...
@@ -816,10 +816,14 @@ kernel_map_pages(struct page *page, int numpages, int enable)
}
#endif
#ifndef CONFIG_ARCH_GATE_AREA
extern
struct
vm_area_struct
*
get_gate_vma
(
struct
task_struct
*
tsk
);
#ifdef __HAVE_ARCH_GATE_AREA
int
in_gate_area_no_task
(
unsigned
long
addr
);
int
in_gate_area
(
struct
task_struct
*
task
,
unsigned
long
addr
);
#endif
#else
int
in_gate_area_no_task
(
unsigned
long
addr
);
#define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);})
#endif
/* __HAVE_ARCH_GATE_AREA */
#endif
/* __KERNEL__ */
#endif
/* _LINUX_MM_H */
kernel/kallsyms.c
View file @
87b049b5
...
...
@@ -18,6 +18,13 @@
#include <linux/fs.h>
#include <linux/err.h>
#include <linux/proc_fs.h>
#include <linux/mm.h>
#ifdef CONFIG_KALLSYMS_ALL
#define all_var 1
#else
#define all_var 0
#endif
/* These will be re-linked against their real values during the second link stage */
extern
unsigned
long
kallsyms_addresses
[]
__attribute__
((
weak
));
...
...
@@ -30,7 +37,7 @@ extern u16 kallsyms_token_index[] __attribute__((weak));
extern
unsigned
long
kallsyms_markers
[]
__attribute__
((
weak
));
/* Defined by the linker script. */
extern
char
_stext
[],
_etext
[],
_sinittext
[],
_einittext
[];
extern
char
_stext
[],
_etext
[],
_sinittext
[],
_einittext
[]
,
_end
[]
;
static
inline
int
is_kernel_inittext
(
unsigned
long
addr
)
{
...
...
@@ -44,7 +51,7 @@ static inline int is_kernel_text(unsigned long addr)
{
if
(
addr
>=
(
unsigned
long
)
_stext
&&
addr
<=
(
unsigned
long
)
_etext
)
return
1
;
return
0
;
return
in_gate_area_no_task
(
addr
)
;
}
/* expand a compressed symbol data into the resulting uncompressed string,
...
...
@@ -147,7 +154,7 @@ const char *kallsyms_lookup(unsigned long addr,
namebuf
[
KSYM_NAME_LEN
]
=
0
;
namebuf
[
0
]
=
0
;
if
(
is_kernel_text
(
addr
)
||
is_kernel_inittext
(
addr
))
{
if
(
all_var
||
is_kernel_text
(
addr
)
||
is_kernel_inittext
(
addr
))
{
unsigned
long
symbol_end
=
0
;
/* do a binary search on the sorted kallsyms_addresses array */
...
...
@@ -181,7 +188,7 @@ const char *kallsyms_lookup(unsigned long addr,
if
(
is_kernel_inittext
(
addr
))
symbol_end
=
(
unsigned
long
)
_einittext
;
else
symbol_end
=
(
unsigned
long
)
_etext
;
symbol_end
=
all_var
?
(
unsigned
long
)
_end
:
(
unsigned
long
)
_etext
;
}
*
symbolsize
=
symbol_end
-
kallsyms_addresses
[
low
];
...
...
mm/memory.c
View file @
87b049b5
...
...
@@ -2092,7 +2092,7 @@ unsigned long vmalloc_to_pfn(void * vmalloc_addr)
EXPORT_SYMBOL
(
vmalloc_to_pfn
);
#if !defined(
CONFIG
_ARCH_GATE_AREA)
#if !defined(
__HAVE
_ARCH_GATE_AREA)
#if defined(AT_SYSINFO_EHDR)
struct
vm_area_struct
gate_vma
;
...
...
@@ -2118,7 +2118,7 @@ struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
#endif
}
int
in_gate_area
(
struct
task_struct
*
task
,
unsigned
long
addr
)
int
in_gate_area
_no_task
(
unsigned
long
addr
)
{
#ifdef AT_SYSINFO_EHDR
if
((
addr
>=
FIXADDR_USER_START
)
&&
(
addr
<
FIXADDR_USER_END
))
...
...
@@ -2127,4 +2127,4 @@ int in_gate_area(struct task_struct *task, unsigned long addr)
return
0
;
}
#endif
#endif
/* __HAVE_ARCH_GATE_AREA */
scripts/Makefile.build
View file @
87b049b5
...
...
@@ -83,7 +83,6 @@ __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \
# Linus' kernel sanity checking tool
ifneq
($(KBUILD_CHECKSRC),0)
CHECKFLAGS
+=
-I
$(
shell
$(CC)
-print-file-name
=
include
)
ifeq
($(KBUILD_CHECKSRC),2)
quiet_cmd_force_checksrc
=
CHECK
$<
cmd_force_checksrc
=
$(CHECK)
$(CHECKFLAGS)
$(c_flags)
$<
;
...
...
scripts/kallsyms.c
View file @
87b049b5
...
...
@@ -184,6 +184,15 @@ symbol_valid(struct sym_entry *s)
if
((
s
->
addr
<
_stext
||
s
->
addr
>
_etext
)
&&
(
s
->
addr
<
_sinittext
||
s
->
addr
>
_einittext
))
return
0
;
/* Corner case. Discard any symbols with the same value as
* _etext or _einittext, they can move between pass 1 and 2
* when the kallsyms data is added. If these symbols move then
* they may get dropped in pass 2, which breaks the kallsyms
* rules.
*/
if
((
s
->
addr
==
_etext
&&
strcmp
(
s
->
sym
+
1
,
"_etext"
))
||
(
s
->
addr
==
_einittext
&&
strcmp
(
s
->
sym
+
1
,
"_einittext"
)))
return
0
;
}
/* Exclude symbols which vary between passes. */
...
...
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