Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422662AbWJKVsg (ORCPT ); Wed, 11 Oct 2006 17:48:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422667AbWJKVsf (ORCPT ); Wed, 11 Oct 2006 17:48:35 -0400 Received: from smtp-out.google.com ([216.239.45.12]:46601 "EHLO smtp-out.google.com") by vger.kernel.org with ESMTP id S1422666AbWJKVs3 (ORCPT ); Wed, 11 Oct 2006 17:48:29 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=received:message-id:date:from:to:subject:cc:in-reply-to: mime-version:content-type:references; b=xx14zs3jT7HyzptUmrmW5Yic2zRxMqt/I6iUZ948DI1gtOz7iDUmwwFHRWilE/qyp nekwocxgyYXkFn+YgeyKQ== Message-ID: <65dd6fd50610111448q7ff210e1nb5f14917c311c8d4@mail.gmail.com> Date: Wed, 11 Oct 2006 14:48:14 -0700 From: "Ollie Wild" To: "Peter Zijlstra" Subject: Re: Removing MAX_ARG_PAGES (request for comments/assistance) Cc: linux-kernel@vger.kernel.org, parisc-linux@lists.parisc-linux.org, "Linus Torvalds" , "Arjan van de Ven" , "Ingo Molnar" , linux-mm@kvack.org, "Andrew Morton" , "Andi Kleen" , linux-arch@vger.kernel.org, "David Howells" In-Reply-To: <1160572460.2006.79.camel@taijtu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_15902_18081752.1160603294502" References: <65dd6fd50610101705t3db93a72sc0847cd120aa05d3@mail.gmail.com> <1160572460.2006.79.camel@taijtu> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 38333 Lines: 518 ------=_Part_15902_18081752.1160603294502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline > Yeah, you'll need to change the PTEs for those pages you created by > calling get_user_page() by calling an mprotect like function; perhaps > something like: Thanks. I've incorporated your changes (updated patch attached). > > + /* Move stack pages down in memory. */ > > + if (stack_shift) { > > + // FIXME: Verify the shift is OK. > > + > > What exactly are you wondering about? the call to move_vma looks sane to > me My concern was that the binfmt handler may have setup other vm areas which overlap the new range. The move_vma() function doesn't do overlap checking. I'm not sure if this is something I need to guard against, or if it falls in the "Don't do that!" category. Ollie ------=_Part_15902_18081752.1160603294502 Content-Type: application/octet-stream; name=no_MAX_ARG_PAGES.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_et68xy6a Content-Disposition: attachment; filename="no_MAX_ARG_PAGES.patch" ZGlmZiAtLWdpdCBhL2FyY2gveDg2XzY0L2lhMzIvaWEzMl9iaW5mbXQuYyBiL2FyY2gveDg2XzY0 L2lhMzIvaWEzMl9iaW5mbXQuYwppbmRleCA4MmVmMTgyLi4yZTVhOTM0IDEwMDY0NAotLS0gYS9h cmNoL3g4Nl82NC9pYTMyL2lhMzJfYmluZm10LmMKKysrIGIvYXJjaC94ODZfNjQvaWEzMi9pYTMy X2JpbmZtdC5jCkBAIC0yNzksOSArMjc5LDYgQEAgI2RlZmluZSBleGl0X2VsZl9iaW5mbXQJCQll eGl0X2VsZjMyX2JpbgogI2RlZmluZSBsb2FkX2VsZl9iaW5hcnkgbG9hZF9lbGYzMl9iaW5hcnkK IAogI2RlZmluZSBFTEZfUExBVF9JTklUKHIsIGxvYWRfYWRkcikJZWxmMzJfaW5pdChyKQotI2Rl ZmluZSBzZXR1cF9hcmdfcGFnZXMoYnBybSwgc3RhY2tfdG9wLCBleGVjX3N0YWNrKSBcCi0JaWEz Ml9zZXR1cF9hcmdfcGFnZXMoYnBybSwgc3RhY2tfdG9wLCBleGVjX3N0YWNrKQotaW50IGlhMzJf c2V0dXBfYXJnX3BhZ2VzKHN0cnVjdCBsaW51eF9iaW5wcm0gKmJwcm0sIHVuc2lnbmVkIGxvbmcg c3RhY2tfdG9wLCBpbnQgZXhlY3V0YWJsZV9zdGFjayk7CiAKICN1bmRlZiBzdGFydF90aHJlYWQK ICNkZWZp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HN0YXRpYyB1bnNpZ25lZCBsb25nIG1v dmVfcGFnZV90YWJsZXMoc3QKIAlyZXR1cm4gbGVuICsgb2xkX2FkZHIgLSBvbGRfZW5kOwkvKiBo b3cgbXVjaCBkb25lICovCiB9CiAKLXN0YXRpYyB1bnNpZ25lZCBsb25nIG1vdmVfdm1hKHN0cnVj dCB2bV9hcmVhX3N0cnVjdCAqdm1hLAordW5zaWduZWQgbG9uZyBtb3ZlX3ZtYShzdHJ1Y3Qgdm1f YXJlYV9zdHJ1Y3QgKnZtYSwKIAkJdW5zaWduZWQgbG9uZyBvbGRfYWRkciwgdW5zaWduZWQgbG9u ZyBvbGRfbGVuLAogCQl1bnNpZ25lZCBsb25nIG5ld19sZW4sIHVuc2lnbmVkIGxvbmcgbmV3X2Fk ZHIpCiB7Cg== ------=_Part_15902_18081752.1160603294502-- - 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/