Re: More on fedora f11 build failure

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Fri Jun 05 2009 - 17:39:37 PDT

  • Next message: �����: "Re: Re: Question about "fd" token"
    Neal,
    
      Attached is a patch for BLCR-0.8.1 that have confirmed resolves the 
    compilation issue you report and a related depmod failure on 
    copy_fs_struct() that occurs once the compilation completes.  However, I 
    have *NOT* run the resulting kernel module because I don't have any 
    suitable installations on which to test.  So, I'd appreciate it if you 
    could test this out and let me know the outcome.
    
      If this does work, then please consider this the "official 
    work-around" until I have a 0.8.2 release (if any).  The patch already 
    has by signed-off-by line in it and you can trivially claim that this 
    patch has been submitted "upstream".
    
    -Paul
    
    Neal Becker wrote:
    > On Friday 05 June 2009, Paul H. Hargrove wrote:
    >   
    >> I didn't find a 2.6.29.3-140 but I've grabbed sources for
    >> 2.6.29.4-167.fc11.i686.PAE from Fedora's testing dir.
    >> I *can* reproduce the problem.  The function put_fs_struct() is gone,
    >> and there is a new function free_fs_struct().
    >>
    >> If I can confirm that these are a 1-for-1 replacement, I'll provide the
    >> necessary patch soon.  However, if the change is deeper than that, I
    >> might not tackle until early next week.
    >>
    >> -Paul
    >>
    >>     
    >
    > Thanks for looking into this.  Fedora F11 will be release on 6/9, blcr will be 
    > missing for now (I have no idea how many people are actually using it).  I'll 
    > provide the update whenever you're ready.
    >   
    
    
    -- 
    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'
    
    
    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>
    
    Index: acinclude.m4
    ===================================================================
    RCS file: /var/local/cvs/lbnl_cr/acinclude.m4,v
    retrieving revision 1.177.14.1
    diff -u -r1.177.14.1 acinclude.m4
    --- acinclude.m4	14 Feb 2009 01:48:55 -0000	1.177.14.1
    +++ acinclude.m4	5 Jun 2009 23:49:40 -0000
    @@ -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
    Index: configure.ac
    ===================================================================
    RCS file: /var/local/cvs/lbnl_cr/configure.ac,v
    retrieving revision 1.410.2.6
    diff -u -r1.410.2.6 configure.ac
    --- configure.ac	25 Mar 2009 21:44:17 -0000	1.410.2.6
    +++ configure.ac	5 Jun 2009 23:49:40 -0000
    @@ -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);])
    Index: cr_module/cr_dest_file.c
    ===================================================================
    RCS file: /var/local/cvs/lbnl_cr/cr_module/cr_dest_file.c,v
    retrieving revision 1.27
    diff -u -r1.27 cr_dest_file.c
    --- cr_module/cr_dest_file.c	23 Nov 2008 20:29:14 -0000	1.27
    +++ cr_module/cr_dest_file.c	5 Jun 2009 23:49:40 -0000
    @@ -186,7 +186,7 @@
     
     	// For directory:
     	if (loc->fs) {
    -		put_fs_struct(loc->fs);
    +		cr_free_fs_struct(loc->fs);
     	}
     }
     
    Index: cr_module/cr_kcompat.h
    ===================================================================
    RCS file: /var/local/cvs/lbnl_cr/cr_module/cr_kcompat.h,v
    retrieving revision 1.247.8.1
    diff -u -r1.247.8.1 cr_kcompat.h
    --- cr_module/cr_kcompat.h	7 Feb 2009 00:15:57 -0000	1.247.8.1
    +++ cr_module/cr_kcompat.h	5 Jun 2009 23:49:40 -0000
    @@ -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 */
    

  • Next message: �����: "Re: Re: Question about "fd" token"