From owner-freebsd-hackers@freebsd.org Wed Apr 26 22:28:07 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70D32D51709 for ; Wed, 26 Apr 2017 22:28:07 +0000 (UTC) (envelope-from Zhuojia.Shen@rochester.edu) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0106.outbound.protection.outlook.com [104.47.36.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D1C0F35 for ; Wed, 26 Apr 2017 22:28:06 +0000 (UTC) (envelope-from Zhuojia.Shen@rochester.edu) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rochester.edu; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=tgYEwpyOyapp+m07N7knkWOHOx9eS+h95hlQTVwjeT4=; b=HOStNbQ0giSTix54rGbiNHLxpU9g9Fi5vTXORbOkyvLCWYyqStf7cxgeyXAdmVZNb/TI0fnhJl/Qm9HbY3kOt2YfcD/BZYGHc7JPnYtlfvoXATG/2/B/oSxo6Mnw7V15Jnirv1TDAgdI4FsDmxl5pm/C0WzD5p792fdeshQslpM= Authentication-Results: freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=none action=none header.from=cs.rochester.edu; Received: from j13.cs.rochester.edu (128.151.67.93) by DM5PR07MB3532.namprd07.prod.outlook.com (10.164.153.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1061.12; Wed, 26 Apr 2017 22:28:04 +0000 From: Zhuojia Shen Subject: Allocate huge chunk of pageable memory in FreeBSD kernel space To: freebsd-hackers@freebsd.org Message-ID: <2c616149-274d-b758-1500-ffd580fd51fd@cs.rochester.edu> Date: Wed, 26 Apr 2017 18:28:02 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [128.151.67.93] X-ClientProxiedBy: BN3PR03CA0076.namprd03.prod.outlook.com (10.167.1.164) To DM5PR07MB3532.namprd07.prod.outlook.com (10.164.153.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b36caf95-6256-4fd7-5ece-08d48cf381f6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:DM5PR07MB3532; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3532; 3:D1FTFZqP7SCqEn9UXhKyndt9o5uLRgFW0l5OwI3pOVVcuUzruFfjZ+X7aziik5zh5H9CXCoY6uN71jBE3k0bMavyi+F8xtEetdlZIsBOaRFzR+BDlaFVa4qoqQL8yT/8Av0EbgBMlraar5An8Jb4W5dfr4FADcb8X6zZefaDw45bjd3LNn3SjkaA/KhL6Ygzp7Vh62MrtN3X/NhXmWasSEp3+iknZfbf/TJuoPqpuKUHDa1ni6ngE0RFACTpM4yc5Q3xh1fotslqBxwUdEY8I1rblCQo01oAGf2RiiZDWpA21fu5euivKs3egiZZM+0vXMklDQkDaTbokqGcpqwUiA==; 25:HOib7ySMy0f+HQRh82Z6nsQ3Om05dAlJg+el/P7ONcCBHIBHgr0mdNaIICgEsjMjKQ2/TmjYaMUFyTOVn/ZwkB3SLSbb2zCV0TOFVKKQNW7oXP5qG13vJIO9pXEBQnlCsmY5TrNHL9yc+buYXstRslTBdCrsiGwf6bgAMSNnLhdG8jt9Y6wgQzycV/ZI6TQaWxc3eaZHYG+vIJxc+0TfMScJnHOJh82cY69ZpEx981f+tAnsxpIdyYaKr7IgTcC3FN+x9JtS4BBCrw2zRZTny2wzSjZSQKaroKbaFCuelmDYi73tKOwzHYwER/xWnzWUbdX59slukN4a3Av16W7Ra63jC79DdYF2gTYn7YMtOU4aeO5elSEipqLN/rauUjRGp5TFlIbvUDFBhzx5rGWqx0m+AM4Gdmulgi70nsiaDQK40deFe6lHUtkXCA6WdMPQpmYLnPIwpjWB7g+0GYBxTA== X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3532; 31:Wl2HI5isO6/lrj3HMOgP+iee5ypqoQrzEyhekwjif56bNhMCsYsb1LcePlHBPEL9BrozigZ6rw+KPWwjKoMPpaW6CZL1UI4P6F7bsYwflptHHY45Ks/qyH2EjetLCfJmewbPgmojOBDSLqkWyTDAzW13uazm/mBQRTEMFztwXKedRzyWDP1zDKqTIbxP2v33NcF8kfB3Z1cAagYSUa8Om80KRlFEGZ5IBHbjDurKTo1JDMtekbYgHWhZACCmHaFjbZLfSupfKT/FcariulteaszIUBj78Y/F5WljipC1mNQ=; 20:+RCGjCjDIBfJfQn4myDRk3skF32Vh5Rj08xnrvdzHmxunt0/09m04+Zaj3elmVVNaDWUCxZuUEyrt3Y0QT6GcQhfsw8b4TT4reCkfW5eNACb70SaNZIb3k0L6gMMAsJKGGinhyR5vrGvJoSvZeR4qnJ89synXUDS+Fjdrt05vxsH3IQ1bI0cIGaOoGUQlORrn+HoMqUslhnalNbK9WsRzXpq1TlbfpElM1LjxUdpqPQjz3I/A/d9PmaVAfYKWCIsKWSXlaqM8Szdkq9OcDfzLmh/U0ZcH8nBGV/oT52rUOyJvYFppVxWDTg5jrq15wNddg0vzCFa9ypldtdPcjIiDWGLwV57OUIurB4bSJmc8UPgxwnxmJMiI/S7tQBfpRBXQMXvsdtLeDK6yd9h42dakv7cRBZo3QgG+dEV5My6YxqqDTYpjE85Dx4O5x3xMCDkewHDt1oZg8sQcJedF7yPrDkMtbLSr5b0fQw8SYdDT2BbLD43oHtGTFCfYKBIiHaE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123564025)(20161123562025)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123558100)(6072148); SRVR:DM5PR07MB3532; BCL:0; PCL:0; RULEID:; SRVR:DM5PR07MB3532; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3532; 4:Eqc0DLB+HkOe4VezIGjoMNWReNWMb0iisB6F7NKolPWmFNj8VCh50FCCrF+DwJoDJU6g1YxIX9OqAKfo0SAvhQ37IvwnPniNGMFu5z8pQyyFAED1kKsPKdJaseZS0qqno8otSIuNomV8dbVVXEdSmeDOGbAOkhSND18vhocHYZ/dq2vjMJgpcZNrxslXvFiFUEdY+03oX0lbmHoYueBEtAmk/ly0sGe2dTiEuJg9Q/2aUZ8n8PzZzJ0TEhU29SI3QQLScjOCEIwxZ76zWm5sMLMWecc5rtGbPcHdjfZGoadFFNZZKv2yqpKMnlErkO+HMfPSf+MqvHkdkuvL8wUa7XFVtF+FgyH6Pe60+jBJ2DfJny38C/g6E1OvDxNeSW6DH98h2bg0u2dnYLb4oXVTSYlNNX7HvWEGc5zE+U+rkSEbDG00QpX3ok009aDMsadKGDml5diuy4f5shn4hhVP0rfCjtaUrEyGapIPv6Sq4b+ReDVJZ37fW/mI9bVFjeHGT5Ni1cmoGiuW5KarVkMhZPzJxTOMJWGvS8KnR0FtgT0o5Vd52kKqVwLpGtnZqqoqSnvsOtbd1LyyOfsUjzGBhwx8muHcwaSC2k4yvBNtmdN2HQfnYRjsQgdoXosBHRtj71XyOr+GPUurVvzih8qn+GT0RNmdb7LVnQu5gFeWtURL3+8RCCljxIPmRvwo2F0ssPlQKBV1puh6YhA7RmoTwcPAybFpT1Z3v+Wikz86GbzIsNacqzpfj0GJag1KYzku2UsLSo2i/iGaoMxVld6JRVqX0UaPKbbkJRnEeOaWOebIUD3FMYrxtxJpFiedg4QksyzqjAPspbSt84QfqC4oj4gjku4GC4DLPxPSbJbbO6I= X-Forefront-PRVS: 0289B6431E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39850400002)(39840400002)(39410400002)(39400400002)(39450400003)(2361001)(7736002)(2351001)(2906002)(31696002)(230700001)(47776003)(305945005)(65956001)(33646002)(50986999)(88552002)(66066001)(6116002)(42186005)(54356999)(31686004)(25786009)(75432002)(3846002)(189998001)(4001350100001)(50466002)(83506001)(6916009)(5660300001)(65826007)(81166006)(23676002)(110136004)(38730400002)(6486002)(53936002)(14583001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR07MB3532; H:j13.cs.rochester.edu; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjA3TUIzNTMyOzIzOnBIdDVNalJLemNsVXZYYVplL3lPRU1oeTU3?= =?utf-8?B?NThkcjZDdzN6Y3c4QnJpcTI1ZSt5OEFiaGY1eW81WXVQaUQrVjZyM1JlaGN3?= =?utf-8?B?T3Y4K3RObFpzN20raEUzR0tmdE00MDVHRU9TUUlra0hqTjJsT2YraUprTlB3?= =?utf-8?B?c2lnbUlJbHZRUXh0MFJpSmFOODdEa3NmWDdDTzIrWlg2eFhnTk5OaW91d3d1?= =?utf-8?B?ZXFNQU9RWFI0M2JwUG1mNUVoNS9ZaUF1elZrc25EQk10akpsWmFwdTM4TWo4?= =?utf-8?B?dVZKYnFIWjZJSis3N21oN2pBUWo5akQzbUVIbkFGN0NVSGtLSFAxc3c2MDlD?= =?utf-8?B?ZlV1WXhyZUF5R3JnWWFwSzdUTmNrbm5CU2pUMnRRYW5ZOXVvYmhRU1FxU2c3?= =?utf-8?B?ckNGU0JrRFVqWDhOT1ZHOWwrQ1VqVFNiMTVkOTJkS0ZGd3ZUMFB3eC82RS9M?= =?utf-8?B?Y1p2bVMyRGNkWDdIa3J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VW5reWdaam1ockV3aGl2eE9na2lKQ0NCOEJDMGJsQ2tldU9aenpTZkwz?= =?utf-8?Q?YfzTqs=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3532; 6:Z0Ms1xJeE2hht5ySOa7tw57BcB0nnyODiZYjUWZF0ITUuh70r5+9C5+sUaxMTkrGlR4bGnQjqk4zucTtzb7MUT57yQ++hGtq0lTUnTJXdBo9H/0nwfyqzp53ULUGYXDUAYNx4S6W+ituuOozcfxIJqX7xJHIizBF+GxfHiULKBIRkpmOn463f63IpWPVzqhA8m4fI98jjQvgs4jRKw+FTskeb91YHmIGqFN2s7tjDAC+73Y3mS5KJl9KnIOO9CZsBS39+nOFpoXQZwNxSfEJCHtKt2OwoOsSiF7paJALYzc+BvLIJOl70svsKyyYc4f8q6SW+ZlbmG2wxObXDgti/86Vb25ynbFWn5OHEajJhBeZtzf2PvhjGd01cCDSvAfywk9y3yvM4JVbXbkrB+/lO5py/rSnqQffEcDBUAqioShDGUev2mlGa2WEk2Zt6MskG66YXHkyX6dkRu8fEQijHdleGBBinMC/xBysuPX4NHXGELuLDYCztQP0813Ydhjf5gGV6PxYUiB9izNkj6zGJg==; 5:fxQgtXTYwReIRqkclGHbEesWBSTmDPqk1TPoV7LIq5H4eXna/kDqjo0qQuPHY2PlA/CVti7kH2HC43Ll465NWYhjgmhH8S9t4AXGKGNNFgh7fj1BK0bAeVGhYTiQjg0DBdo5zukxXV8ZUaVp/MbJCw==; 24:tySukEXS7ddM8qAWfNJZdnQiCrs6pfY1aV7WyP+WZhiM6yF4N6YNeDBPxnFgL6EyGdwsmCbULOB5to33pRmcXAiAkniGi0iAOXkYuEbnmK0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3532; 7:FcsEb95sUvYEEnZr5s9TwU9JWA4+NQYM7IIBoahhMtyUDwSAf6DRNxgmGIMCLAbutsAUYzz1EeYLoPci7sB5rbxpSAbgLgGO+npJgIbo3SIq5vJMtpv6boH1yOyKZKCbV/QfwkUx9N9/ZM0yL8QFMAGVcC+uTOqZgbNGgeHjQyz1KJgAdp31oJ8Ff1QaV6qCU4G9b3B/kVkLwtk12hCa9D8B52EHatov3gYlgLMm5/tZqUjzoGTCpOuFv+RruzTZ5YLhgjdevKqvU9JKpWx8xJQDPtI8W1pZ36wgOo8Iy0UneaSdwo0XHDwWUF5K3EJcZW5s9c7iFqME3ivJ3a830g== X-OriginatorOrg: cs.rochester.edu X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2017 22:28:04.9809 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3532 X-Mailman-Approved-At: Wed, 26 Apr 2017 22:40:30 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Apr 2017 22:28:07 -0000 Hi, I'm working on a project that uses FreeBSD 11.0 on amd64 to do some security research. Now what I want to achieve is to allocate an 8TB portion of memory within the kernel virtual address space using demand paging. I noticed that there is an unused portion of kernel space from 0xffff804020101000 to 0xfffff80000000000 where the 8TB structure will fit. I also noticed that there is a function kmap_alloc_wait() which can be used to allocate pageable memory. Do you suggest that I use this function and, if so, how would I use it? Thank you, Zhuojia -- Zhuojia Shen Graduate Student Department of Computer Science University of Rochester