Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S272337AbTG3XhI (ORCPT ); Wed, 30 Jul 2003 19:37:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S272360AbTG3XhI (ORCPT ); Wed, 30 Jul 2003 19:37:08 -0400 Received: from fmr04.intel.com ([143.183.121.6]:3792 "EHLO caduceus.sc.intel.com") by vger.kernel.org with ESMTP id S272337AbTG3Xgm (ORCPT ); Wed, 30 Jul 2003 19:36:42 -0400 Message-ID: <3F28562D.2060408@intel.com> Date: Wed, 30 Jul 2003 16:35:09 -0700 From: Arun Sharma User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630 X-Accept-Language: en-us, en MIME-Version: 1.0 To: torvalds@osdl.org, akpm@osdl.org CC: linux-kernel@vger.kernel.org Subject: binfmt handler issues with emulators Content-Type: multipart/mixed; boundary="------------070406080602070408030504" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4249 Lines: 76 This is a multi-part message in MIME format. --------------070406080602070408030504 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi Linus/Andrew, Did you get a chance to see my patch posted to LKML on 7/28 ? http://marc.theaimsgroup.com/?l=linux-kernel&m=105942737328805&w=2 This is an issue for cases where an interpreter itself may be interpreted (by an emulator). The current implementation has problems with argument passing and the output of ps (which doesn't match native). The attached patch fixes the problems for us. Comments ? -Arun --------------070406080602070408030504 Content-Type: text/plain; name="binfmt_interp.patch" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="binfmt_interp.patch" LS0tIGxpbnV4L2ZzL2V4ZWMuYy0JVGh1IE1hciAxMyAxMTo0Mjo1MSAyMDAzCisrKyBsaW51 eC9mcy9leGVjLmMJVGh1IE1hciAxMyAxMTo0MzowNSAyMDAzCkBAIC04ODIsNiArODgyLDcg QEAKIAogCWJwcm0uZmlsZSA9IGZpbGU7CiAJYnBybS5maWxlbm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WFkICpsOwogCiAJ Zm9yIChsID0gZW50cmllcy5uZXh0OyBsICE9ICZlbnRyaWVzOyBsID0gbC0+bmV4dCkgewpA QCAtMTI1LDEzICsxMjUsMTMgQEAKIAlpZiAoIShmbXQtPmZsYWdzICYgTUlTQ19GTVRfUFJF U0VSVkVfQVJHVjApKSB7CiAJCXJlbW92ZV9hcmdfemVybyhicHJtKTsKIAl9Ci0JcmV0dmFs ID0gY29weV9zdHJpbmdzX2tlcm5lbCgxLCAmYnBybS0+ZmlsZW5hbWUsIGJwcm0pOworCXJl dHZhbCA9IGNvcHlfc3RyaW5nc19rZXJuZWwoMSwgJmJwcm0tPmludGVycCwgYnBybSk7CiAJ aWYgKHJldHZhbCA8IDApIGdvdG8gX3JldDsgCiAJYnBybS0+YXJnYysrOwogCXJldHZhbCA9 IGNvcHlfc3RyaW5nc19rZXJuZWwoMSwgJmluYW1lX2FkZHIsIGJwcm0pOwogCWlmIChyZXR2 YWwgPCAwKSBnb3RvIF9yZXQ7IAogCWJwcm0tPmFyZ2MrKzsKLQlicHJtLT5maWxlbmFtZSA9 IGluYW1lOwkvKiBmb3IgYmluZm10X3NjcmlwdCAqLworCWJwcm0tPmludGVycCA9IGluYW1l OwkvKiBmb3IgYmluZm10X3NjcmlwdCAqLwogCiAJZmlsZSA9IG9wZW5fZXhlYyhpbmFtZSk7 CiAJcmV0dmFsID0gUFRSX0VSUihmaWxlKTsK --------------070406080602070408030504-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/