On Thu, Mar 27, 2008 at 09:08:58PM +0200, Riku Voipio wrote: > Now after a quick relook, I think the issue is fstatat64. both find and > rm call it, but arch/arm/kernel/sys_oabi-compat.c doesn't have a shim > to convert the stat64 struct oldabi <-> eabi for this function. > Fix is probably trivial, if we want to continue to support the oldabi > emulation layer.
And here is probably the fix. For added excitement, apart from compiling, it's completely untested. It will take until weekend until I can test it.. -- "rm -rf" only sounds scary if you don't have backups
From 15c4a48e1d6c2249dece6b327e0ff2b0f3b720d4 Mon Sep 17 00:00:00 2001 From: Riku Voipio <[EMAIL PROTECTED]> Date: Thu, 27 Mar 2008 21:51:27 +0200 Subject: [PATCH] Add oabi shim for fstatat64 fixes bugs.debian.org/462677 Signed-off-by: Riku Voipio <[EMAIL PROTECTED]> --- arch/arm/kernel/calls.S | 2 +- arch/arm/kernel/sys_oabi-compat.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletions(-) diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 283e14f..7e97b73 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S @@ -336,7 +336,7 @@ CALL(sys_mknodat) /* 325 */ CALL(sys_fchownat) CALL(sys_futimesat) - CALL(sys_fstatat64) + CALL(ABI(sys_fstatat64, sys_oabi_fstatat64)) CALL(sys_unlinkat) CALL(sys_renameat) /* 330 */ CALL(sys_linkat) diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index e8b9804..96ab5f5 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c @@ -25,6 +25,7 @@ * sys_stat64: * sys_lstat64: * sys_fstat64: + * sys_fstatat64: * * struct stat64 has different sizes and some members are shifted * Compatibility wrappers are needed for them and provided below. @@ -169,6 +170,29 @@ asmlinkage long sys_oabi_fstat64(unsigned long fd, return error; } +asmlinkage long sys_oabi_fstatat64(int dfd, + char __user *filename, + struct oldabi_stat64 __user *statbuf, + int flag) +{ + struct kstat stat; + int error = -EINVAL; + + if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) + goto out; + + if (flag & AT_SYMLINK_NOFOLLOW) + error = vfs_lstat_fd(dfd, filename, &stat); + else + error = vfs_stat_fd(dfd, filename, &stat); + + if (!error) + error = cp_oldabi_stat64(&stat, statbuf); + +out: + return error; +} + struct oabi_flock64 { short l_type; short l_whence; -- 1.5.4.3
signature.asc
Description: Digital signature