From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Mon Jun 08 2009 - 11:55:38 PDT
Neal, From that log it appears that the configure script that ran was not rebuilt after applying the patch to acinclude.m4 and configure.ac (which are used to generate configure). Resolving this could be as simple as adding "autoreconf" in the %prep section of the spec file to ensure that configure and blcr_config.h.in are both regenerated from their sources before configure it run. Alternatively, the attached diff includes the previous one PLUS the changes to the generated file configure and blcr_config.h.in. This approach is more fragile in general, but doesn't assume autoreconf is available on the build system. -Paul Neal Becker wrote: > On Monday 08 June 2009, Paul H. Hargrove wrote: > >> Hmm, it certainly works for the kernel version I downloaded. >> >> Neal, >> Could you please confirm that the configure scripts was rebuilt after >> the patch. Also, I didn't find the kernel version you referenced. >> Could you provide a URL for it if it is still available somewhere. >> -Paul >> >> > > It looks like the configure scripts were run - here is the entire build log: > > http://buildsys.rpmfusion.org/logs/fedora-development-rpmfusion_free/4147- > blcr-kmod-0.8.1-2.fc11.7/i686/build.log > -- Paul H. Hargrove PHHargrove_at_lbl_dot_gov Future Technologies Group Tel: +1-510-495-2352 HPC Research Department Fax: +1-510-486-6900 Lawrence Berkeley National Laboratory This file is a patch against BLCR-0.8.1 to resolve the following error, reported by Neal Becker, that is seen with the 2.6.29.x kernels used in fc11: CC [M] /builddir/build/BUILD/blcr-0.8.1/_kmod_build_2.6.29.3-140.fc11.i686.PAE/cr_module/kbuild/cr_dest_file.o /builddir/build/BUILD/blcr-0.8.1/_kmod_build_2.6.29.3-140.fc11.i686.PAE/cr_module/kbuild/cr_dest_file.c: In function 'cr_loc_free': /builddir/build/BUILD/blcr-0.8.1/_kmod_build_2.6.29.3-140.fc11.i686.PAE/cr_module/kbuild/cr_dest_file.c:189: error: implicit declaration of function 'put_fs_struct' Note that this patch modifies configure and blcr_config.h.in directly. If patch should fail to cleanly apply only those hunks, then running "autoreconf" should have the same effect. It is my intention that if a 0.8.2 release of BLCR is made, this fix will be included. However, it is possible that this may not appear in an official BLCR release until 0.9.0 in the Fall. - Paul H. Hargrove Signed-off-by: Paul H. Hargrove <PHHargrove_at_lbl_dot_gov> diff -ur blcr-0.8.1.orig/acinclude.m4 blcr-0.8.1/acinclude.m4 --- blcr-0.8.1.orig/acinclude.m4 2009-02-13 17:48:55.000000000 -0800 +++ blcr-0.8.1/acinclude.m4 2009-06-08 11:41:24.000000000 -0700 @@ -1116,7 +1116,7 @@ # If not found, leave CR_K${TYPE}_${symbol} undefined # If found to be exported, "#define CR_K${TYPE}_${symbol} 0" # If found not to be exported, "#define CR_K${TYPE}_${symbol} 0x<value>" -# On return, cr_addr is set (or undefined) the same way. +# On return, cr_addr is set (or empty) the same way. AC_DEFUN([CR_FIND_KSYM],[ AC_REQUIRE([CR_LINUX_SYMTAB]) AC_MSG_CHECKING([[kernel symbol table for $1]]) @@ -1135,6 +1135,7 @@ ],[int x = sizeof(&$1);],[cr_cvname="Y$cr_cvname"],[cr_cvname="N$cr_cvname"]) fi ]) + cr_addr='' if test -z "$cr_cvname"; then cr_result='not found' else diff -ur blcr-0.8.1.orig/configure.ac blcr-0.8.1/configure.ac --- blcr-0.8.1.orig/configure.ac 2009-03-25 14:44:17.000000000 -0700 +++ blcr-0.8.1/configure.ac 2009-06-08 11:41:24.000000000 -0700 @@ -1472,9 +1472,17 @@ CR_FIND_KSYM([sys_prctl],[CODE], [extern asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5);]) +CR_FIND_KSYM([copy_fs_struct],[CODE]) +CR_FIND_KSYM([put_fs_struct],[CODE]) +if test -z "$cr_addr"; then + CR_FIND_KSYM([free_fs_struct],[CODE]) + if test -z "$cr_addr"; then + AC_MSG_ERROR([failed to find either symbol put_fs_struct or free_fs_struct]) + fi +fi + # For blcr CR_FIND_KSYM([set_fs_pwd],[CODE]) -CR_FIND_KSYM([put_fs_struct],[CODE]) # For vmadump4 CR_FIND_KSYM([sys_mremap],[CODE], [extern asmlinkage unsigned long sys_mremap(unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags, unsigned long new_addr);]) diff -ur blcr-0.8.1.orig/cr_module/cr_dest_file.c blcr-0.8.1/cr_module/cr_dest_file.c --- blcr-0.8.1.orig/cr_module/cr_dest_file.c 2008-11-23 12:29:14.000000000 -0800 +++ blcr-0.8.1/cr_module/cr_dest_file.c 2009-06-08 11:41:24.000000000 -0700 @@ -186,7 +186,7 @@ // For directory: if (loc->fs) { - put_fs_struct(loc->fs); + cr_free_fs_struct(loc->fs); } } diff -ur blcr-0.8.1.orig/cr_module/cr_kcompat.h blcr-0.8.1/cr_module/cr_kcompat.h --- blcr-0.8.1.orig/cr_module/cr_kcompat.h 2009-02-06 16:15:57.000000000 -0800 +++ blcr-0.8.1/cr_module/cr_kcompat.h 2009-06-08 11:41:24.000000000 -0700 @@ -556,4 +556,15 @@ #define cr_task_cred(_t) (_t) #endif +#if defined(CR_KCODE_put_fs_struct) + static __inline__ void cr_free_fs_struct(struct fs_struct *fs) { + CRI_ASSERT(atomic_read(&fs->count) == 1); + put_fs_struct(fs); + } +#elif defined(CR_KCODE_free_fs_struct) + #define cr_free_fs_struct free_fs_struct +#else + #error "no cr_free_fs_struct() definition" +#endif + #endif /* _CR_KCOMPAT_H */ diff -ur blcr-0.8.1.orig/configure blcr-0.8.1/configure --- blcr-0.8.1.orig/configure 2009-03-25 21:23:59.000000000 -0700 +++ blcr-0.8.1/configure 2009-06-08 11:43:54.000000000 -0700 @@ -28435,6 +28435,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_timeval_to_jiffies"; then cr_result='not found' else @@ -28548,6 +28549,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_jiffies_to_timeval"; then cr_result='not found' else @@ -31168,6 +31170,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab___put_task_struct"; then cr_result='not found' else @@ -31281,6 +31284,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab___put_task_struct_cb"; then cr_result='not found' else @@ -32119,6 +32123,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab___kuser_helper_start"; then cr_result='not found' else @@ -32233,6 +32238,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab___kuser_cmpxchg"; then cr_result='not found' else @@ -32678,6 +32684,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_arch_setup_additional_pages"; then cr_result='not found' else @@ -32906,6 +32913,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_map_vsyscall"; then cr_result='not found' else @@ -33021,6 +33029,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_syscall32_setup_pages"; then cr_result='not found' else @@ -33137,6 +33146,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_arch_pick_mmap_layout"; then cr_result='not found' else @@ -33250,6 +33260,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_arch_get_unmaped_area"; then cr_result='not found' else @@ -33363,6 +33374,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_arch_unmap_area"; then cr_result='not found' else @@ -33787,6 +33799,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_hugetlbfs_file_operations"; then cr_result='not found' else @@ -33901,6 +33914,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_is_file_shm_hugepages"; then cr_result='not found' else @@ -34015,6 +34029,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_hugepage_vma"; then cr_result='not found' else @@ -34129,6 +34144,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_pmd_huge"; then cr_result='not found' else @@ -34243,6 +34259,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_follow_huge_pmd"; then cr_result='not found' else @@ -34357,6 +34374,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_follow_huge_addr"; then cr_result='not found' else @@ -34770,6 +34788,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_mem_map_zero"; then cr_result='not found' else @@ -34886,6 +34905,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_empty_zero_page"; then cr_result='not found' else @@ -35298,6 +35318,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_copy_siginfo_to_user"; then cr_result='not found' else @@ -35412,6 +35433,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_group_send_sig_info"; then cr_result='not found' else @@ -35528,6 +35550,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_do_sigaltstack"; then cr_result='not found' else @@ -35855,6 +35878,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_cpu_gdt_descr"; then cr_result='not found' else @@ -35969,6 +35993,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_cpu_gdt_table"; then cr_result='not found' else @@ -36082,6 +36107,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_per_cpu__cpu_gdt_descr"; then cr_result='not found' else @@ -37320,6 +37346,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_init_fpu"; then cr_result='not found' else @@ -37434,6 +37461,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_xstate_size"; then cr_result='not found' else @@ -38937,6 +38965,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_get_dumpable"; then cr_result='not found' else @@ -39710,6 +39739,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_suid_dumpable"; then cr_result='not found' else @@ -39933,6 +39963,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_set_dumpable"; then cr_result='not found' else @@ -40047,6 +40078,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_groups_search"; then cr_result='not found' else @@ -40161,6 +40193,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_supplemental_group_member"; then cr_result='not found' else @@ -40554,6 +40587,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_detach_pid"; then cr_result='not found' else @@ -40667,6 +40701,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_attach_pid"; then cr_result='not found' else @@ -40780,6 +40815,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_change_pid"; then cr_result='not found' else @@ -40893,6 +40929,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_find_pid"; then cr_result='not found' else @@ -41006,6 +41043,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_link_pid"; then cr_result='not found' else @@ -42494,6 +42532,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_free_pid"; then cr_result='not found' else @@ -42607,6 +42646,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_pid_hash"; then cr_result='not found' else @@ -42721,6 +42761,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_pidhash_shift"; then cr_result='not found' else @@ -42941,6 +42982,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_pid_cachep"; then cr_result='not found' else @@ -43133,6 +43175,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_init_pspace"; then cr_result='not found' else @@ -43247,6 +43290,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_init_pid_ns"; then cr_result='not found' else @@ -43969,6 +44013,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_pidmap_array"; then cr_result='not found' else @@ -44092,6 +44137,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_pidmap_lock"; then cr_result='not found' else @@ -44719,6 +44765,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_child_reaper"; then cr_result='not found' else @@ -46099,6 +46146,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_anon_pipe_buf_ops"; then cr_result='not found' else @@ -48380,6 +48428,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_ptrace_utrace_ops"; then cr_result='not found' else @@ -48711,6 +48760,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_tasklist_lock"; then cr_result='not found' else @@ -48824,6 +48874,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_shmem_file_operations"; then cr_result='not found' else @@ -48938,6 +48989,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_ramfs_file_operations"; then cr_result='not found' else @@ -49052,6 +49104,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_HPAGE_SHIFT"; then cr_result='not found' else @@ -49166,6 +49219,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_phys_base"; then cr_result='not found' else @@ -49282,6 +49336,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_do_pipe"; then cr_result='not found' else @@ -49395,6 +49450,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_sys_munmap"; then cr_result='not found' else @@ -49509,6 +49565,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_sys_dup2"; then cr_result='not found' else @@ -49623,6 +49680,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_sys_lseek"; then cr_result='not found' else @@ -49737,6 +49795,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_sys_ftruncate"; then cr_result='not found' else @@ -49851,6 +49910,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_sys_mprotect"; then cr_result='not found' else @@ -49965,6 +50025,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_sys_setitimer"; then cr_result='not found' else @@ -50079,6 +50140,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_sys_prctl"; then cr_result='not found' else @@ -50106,21 +50168,20 @@ echo "${ECHO_T}$cr_result" >&6 -# For blcr - echo "$as_me:$LINENO: checking kernel symbol table for set_fs_pwd" >&5 -echo $ECHO_N "checking kernel symbol table for set_fs_pwd... $ECHO_C" >&6 + echo "$as_me:$LINENO: checking kernel symbol table for copy_fs_struct" >&5 +echo $ECHO_N "checking kernel symbol table for copy_fs_struct... $ECHO_C" >&6 # Our cacheval is encoded with 'Y' or 'N' as the first char to indicate # if a declaration was found or not, and the address or 0 as the rest. - if test "${cr_cv_ksymtab_set_fs_pwd+set}" = set; then + if test "${cr_cv_ksymtab_copy_fs_struct+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cr_cv_ksymtab_set_fs_pwd=`eval $LINUX_SYMTAB_CMD | sed -n -e "/${CR_KSYM_PATTERN_CODE}set_fs_pwd$/ {s/ .*//p;q;}"` - if test -n "$cr_cv_ksymtab_set_fs_pwd"; then - if eval $LINUX_SYMTAB_CMD | grep " __ksymtab_set_fs_pwd\$" >/dev/null ; then - cr_cv_ksymtab_set_fs_pwd=0 + cr_cv_ksymtab_copy_fs_struct=`eval $LINUX_SYMTAB_CMD | sed -n -e "/${CR_KSYM_PATTERN_CODE}copy_fs_struct$/ {s/ .*//p;q;}"` + if test -n "$cr_cv_ksymtab_copy_fs_struct"; then + if eval $LINUX_SYMTAB_CMD | grep " __ksymtab_copy_fs_struct\$" >/dev/null ; then + cr_cv_ksymtab_copy_fs_struct=0 fi @@ -50149,7 +50210,7 @@ int main () { -int x = sizeof(&set_fs_pwd); +int x = sizeof(©_fs_struct); ; return 0; } @@ -50179,7 +50240,7 @@ CC=$SAVE_CC CFLAGS=$SAVE_CFLAGS CPPFLAGS=$SAVE_CPPFLAGS - cr_cv_ksymtab_set_fs_pwd="Y$cr_cv_ksymtab_set_fs_pwd" + cr_cv_ksymtab_copy_fs_struct="Y$cr_cv_ksymtab_copy_fs_struct" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -50187,7 +50248,7 @@ CC=$SAVE_CC CFLAGS=$SAVE_CFLAGS CPPFLAGS=$SAVE_CPPFLAGS - cr_cv_ksymtab_set_fs_pwd="N$cr_cv_ksymtab_set_fs_pwd" + cr_cv_ksymtab_copy_fs_struct="N$cr_cv_ksymtab_copy_fs_struct" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext @@ -50195,25 +50256,26 @@ fi - if test -z "$cr_cv_ksymtab_set_fs_pwd"; then + cr_addr='' + if test -z "$cr_cv_ksymtab_copy_fs_struct"; then cr_result='not found' else - if expr "$cr_cv_ksymtab_set_fs_pwd" : N >/dev/null; then - { { echo "$as_me:$LINENO: error: Found symbol set_fs_pwd but no declaration -- please file a bug report." >&5 -echo "$as_me: error: Found symbol set_fs_pwd but no declaration -- please file a bug report." >&2;} + if expr "$cr_cv_ksymtab_copy_fs_struct" : N >/dev/null; then + { { echo "$as_me:$LINENO: error: Found symbol copy_fs_struct but no declaration -- please file a bug report." >&5 +echo "$as_me: error: Found symbol copy_fs_struct but no declaration -- please file a bug report." >&2;} { (exit 1); exit 1; }; } fi - cr_result=`echo $cr_cv_ksymtab_set_fs_pwd | tr -d 'YN'` + cr_result=`echo $cr_cv_ksymtab_copy_fs_struct | tr -d 'YN'` if test $cr_result = 0; then cr_result=exported cr_addr=0 else cr_addr="0x$cr_result" - echo "_CR_IMPORT_KCODE(set_fs_pwd, $cr_addr)" >>$CR_KSYM_IMPORT_CALLS + echo "_CR_IMPORT_KCODE(copy_fs_struct, $cr_addr)" >>$CR_KSYM_IMPORT_CALLS fi cat >>confdefs.h <<_ACEOF -#define CR_KCODE_set_fs_pwd $cr_addr +#define CR_KCODE_copy_fs_struct $cr_addr _ACEOF fi @@ -50308,6 +50370,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_put_fs_struct"; then cr_result='not found' else @@ -50333,6 +50396,243 @@ echo "$as_me:$LINENO: result: $cr_result" >&5 echo "${ECHO_T}$cr_result" >&6 +if test -z "$cr_addr"; then + + + echo "$as_me:$LINENO: checking kernel symbol table for free_fs_struct" >&5 +echo $ECHO_N "checking kernel symbol table for free_fs_struct... $ECHO_C" >&6 + # Our cacheval is encoded with 'Y' or 'N' as the first char to indicate + # if a declaration was found or not, and the address or 0 as the rest. + if test "${cr_cv_ksymtab_free_fs_struct+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cr_cv_ksymtab_free_fs_struct=`eval $LINUX_SYMTAB_CMD | sed -n -e "/${CR_KSYM_PATTERN_CODE}free_fs_struct$/ {s/ .*//p;q;}"` + if test -n "$cr_cv_ksymtab_free_fs_struct"; then + if eval $LINUX_SYMTAB_CMD | grep " __ksymtab_free_fs_struct\$" >/dev/null ; then + cr_cv_ksymtab_free_fs_struct=0 + fi + + + SAVE_CC=$CC + SAVE_CFLAGS=$CFLAGS + SAVE_CPPFLAGS=$CPPFLAGS + CC=$KCC + CFLAGS="" + CPPFLAGS="$KCFLAGS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include <linux/kernel.h> + #ifndef FASTCALL + #define FASTCALL(_decl) _decl + #endif + #include <linux/types.h> + + #define IN_CONFIGURE 1 + #include "${TOP_SRCDIR}/include/blcr_imports.h.in" + +int +main () +{ +int x = sizeof(&free_fs_struct); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + CC=$SAVE_CC + CFLAGS=$SAVE_CFLAGS + CPPFLAGS=$SAVE_CPPFLAGS + cr_cv_ksymtab_free_fs_struct="Y$cr_cv_ksymtab_free_fs_struct" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +CC=$SAVE_CC + CFLAGS=$SAVE_CFLAGS + CPPFLAGS=$SAVE_CPPFLAGS + cr_cv_ksymtab_free_fs_struct="N$cr_cv_ksymtab_free_fs_struct" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + fi + +fi + + cr_addr='' + if test -z "$cr_cv_ksymtab_free_fs_struct"; then + cr_result='not found' + else + if expr "$cr_cv_ksymtab_free_fs_struct" : N >/dev/null; then + { { echo "$as_me:$LINENO: error: Found symbol free_fs_struct but no declaration -- please file a bug report." >&5 +echo "$as_me: error: Found symbol free_fs_struct but no declaration -- please file a bug report." >&2;} + { (exit 1); exit 1; }; } + fi + cr_result=`echo $cr_cv_ksymtab_free_fs_struct | tr -d 'YN'` + if test $cr_result = 0; then + cr_result=exported + cr_addr=0 + else + cr_addr="0x$cr_result" + echo "_CR_IMPORT_KCODE(free_fs_struct, $cr_addr)" >>$CR_KSYM_IMPORT_CALLS + fi + +cat >>confdefs.h <<_ACEOF +#define CR_KCODE_free_fs_struct $cr_addr +_ACEOF + + fi + echo "$as_me:$LINENO: result: $cr_result" >&5 +echo "${ECHO_T}$cr_result" >&6 + + if test -z "$cr_addr"; then + { { echo "$as_me:$LINENO: error: failed to find either symbol put_fs_struct or free_fs_struct" >&5 +echo "$as_me: error: failed to find either symbol put_fs_struct or free_fs_struct" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# For blcr + + + echo "$as_me:$LINENO: checking kernel symbol table for set_fs_pwd" >&5 +echo $ECHO_N "checking kernel symbol table for set_fs_pwd... $ECHO_C" >&6 + # Our cacheval is encoded with 'Y' or 'N' as the first char to indicate + # if a declaration was found or not, and the address or 0 as the rest. + if test "${cr_cv_ksymtab_set_fs_pwd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cr_cv_ksymtab_set_fs_pwd=`eval $LINUX_SYMTAB_CMD | sed -n -e "/${CR_KSYM_PATTERN_CODE}set_fs_pwd$/ {s/ .*//p;q;}"` + if test -n "$cr_cv_ksymtab_set_fs_pwd"; then + if eval $LINUX_SYMTAB_CMD | grep " __ksymtab_set_fs_pwd\$" >/dev/null ; then + cr_cv_ksymtab_set_fs_pwd=0 + fi + + + SAVE_CC=$CC + SAVE_CFLAGS=$CFLAGS + SAVE_CPPFLAGS=$CPPFLAGS + CC=$KCC + CFLAGS="" + CPPFLAGS="$KCFLAGS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include <linux/kernel.h> + #ifndef FASTCALL + #define FASTCALL(_decl) _decl + #endif + #include <linux/types.h> + + #define IN_CONFIGURE 1 + #include "${TOP_SRCDIR}/include/blcr_imports.h.in" + +int +main () +{ +int x = sizeof(&set_fs_pwd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + CC=$SAVE_CC + CFLAGS=$SAVE_CFLAGS + CPPFLAGS=$SAVE_CPPFLAGS + cr_cv_ksymtab_set_fs_pwd="Y$cr_cv_ksymtab_set_fs_pwd" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +CC=$SAVE_CC + CFLAGS=$SAVE_CFLAGS + CPPFLAGS=$SAVE_CPPFLAGS + cr_cv_ksymtab_set_fs_pwd="N$cr_cv_ksymtab_set_fs_pwd" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + fi + +fi + + cr_addr='' + if test -z "$cr_cv_ksymtab_set_fs_pwd"; then + cr_result='not found' + else + if expr "$cr_cv_ksymtab_set_fs_pwd" : N >/dev/null; then + { { echo "$as_me:$LINENO: error: Found symbol set_fs_pwd but no declaration -- please file a bug report." >&5 +echo "$as_me: error: Found symbol set_fs_pwd but no declaration -- please file a bug report." >&2;} + { (exit 1); exit 1; }; } + fi + cr_result=`echo $cr_cv_ksymtab_set_fs_pwd | tr -d 'YN'` + if test $cr_result = 0; then + cr_result=exported + cr_addr=0 + else + cr_addr="0x$cr_result" + echo "_CR_IMPORT_KCODE(set_fs_pwd, $cr_addr)" >>$CR_KSYM_IMPORT_CALLS + fi + +cat >>confdefs.h <<_ACEOF +#define CR_KCODE_set_fs_pwd $cr_addr +_ACEOF + + fi + echo "$as_me:$LINENO: result: $cr_result" >&5 +echo "${ECHO_T}$cr_result" >&6 + # For vmadump4 @@ -50422,6 +50722,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_sys_mremap"; then cr_result='not found' else @@ -50536,6 +50837,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_do_sigaction"; then cr_result='not found' else @@ -50650,6 +50952,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_load_gs_index"; then cr_result='not found' else @@ -50765,6 +51068,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_sys_setgroups"; then cr_result='not found' else @@ -50879,6 +51183,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_sys_setresuid"; then cr_result='not found' else @@ -50993,6 +51298,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_sys_setresgid"; then cr_result='not found' else @@ -51108,6 +51414,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_expand_files"; then cr_result='not found' else @@ -51222,6 +51529,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab___flush_icache_range"; then cr_result='not found' else @@ -51335,6 +51643,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_sys_link"; then cr_result='not found' else @@ -51449,6 +51758,7 @@ fi + cr_addr='' if test -z "$cr_cv_ksymtab_lookup_create"; then cr_result='not found' else diff -ur blcr-0.8.1.orig/blcr_config.h.in blcr-0.8.1/blcr_config.h.in --- blcr-0.8.1.orig/blcr_config.h.in 2009-03-25 21:23:58.000000000 -0700 +++ blcr-0.8.1/blcr_config.h.in 2009-06-08 11:41:44.000000000 -0700 @@ -107,6 +107,10 @@ exported */ #undef CR_KCODE_change_pid +/* Define to address of non-exported kernel symbol copy_fs_struct, or 0 if + exported */ +#undef CR_KCODE_copy_fs_struct + /* Define to address of non-exported kernel symbol copy_siginfo_to_user, or 0 if exported */ #undef CR_KCODE_copy_siginfo_to_user @@ -143,6 +147,10 @@ exported */ #undef CR_KCODE_follow_huge_pmd +/* Define to address of non-exported kernel symbol free_fs_struct, or 0 if + exported */ +#undef CR_KCODE_free_fs_struct + /* Define to address of non-exported kernel symbol free_pid, or 0 if exported */ #undef CR_KCODE_free_pid