DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 4BIN5lgR651131 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 4BIN5lgR651131 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=QNrxsVZy X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D292D3858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1734563146; bh=j5AnRMJy7AUnliPTVljenZLDrxHa3ZYOT9Jnnf76i8g=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=QNrxsVZyNDl4TGm6yMmscgr+iME6Zp6TftaS87cJ0j3DI8vt+DY9vHhxKAmg2NroX BXEgTc8+crqAhahYgPaZ2CKvCr+U9NuMD1cFlj9BWUSZUmjMgwtiCkNLgar5OKhzQ1 CDVkoETQEljpWpU59PKFVbUVnbejBECT2IKR9GdA= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 53A963858D20 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 53A963858D20 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1734563115; cv=pass; b=olcaJR6tZxjkgacQdSxF5X3smo6P5QOGJN7dMWtfHpekaMnn8qqqROThtRDq1jvOXCk25gfqutT/Ix8hka3VleNcWEGzbIiDLEDkTNuiUOge6S9o4Fd/WycZDLj0wZ4jZ5CyBPShbBBSglp+e0grIDQPosaQt22W8beTcF7HxZw= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1734563115; c=relaxed/simple; bh=D1xmdJ2B4AqqjzvGH61EGGCqQrNYbDVmNHfvflZT7Vw=; h=DKIM-Signature:Message-ID:Date:Subject:To:From:MIME-Version; b=mxttC9cWQNa3nLbZfmFJE9sWDlKRXGMqVJJnaM/Ytjtpe+G/jLQsfTjonD+yumeqZVnIMbxZGXpCccOciDLudBdg771jSdJ45aZdEjmxZA6Qml8fumE6IqhBV0jLVp+nJvJ0AHE60mf9h/+B/ollS4ADyIauPQB8mgHO0kF7+fI= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53A963858D20 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kSYA4K8XFliCR7Y7pdHQP7GqI8IZE/4d1odeAoz/U1aKenotTpzz+bY2LWxWsYg1gmPaJB4WK5YvfNxhgvMeyY3rJOKMA2CKVkbQ1Z8h6y6KP+pqp3JpvZJ6M5bSjZt0ojC/1wQUUai96N7IwZuROamrxNKTNqzM+Y6wg7y3hTJvstQN18+ob7KbgPypqd/SWUCwiWtCALAi855A0qgBzzCgWJEf2ORMxb6N8SwdmUK6xdh2GEogIaDrJAUNarQElWJnkf3+AWPult8UuHdHRcW3zKl0q7JQhNOZWjOFmfSWgZIwAx0ifvVueuOVlnZ7UwhtcSu1lvBeCBrBIthrOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QHwCkvDGWaMr7rXBn14Hl3iQTIg4DkrGOmfq+DNRTTk=; b=QxPrDslble09HU2tlp4LTE+NzdJwWXwp8OI2eqQtfu84ManKgrbQefSnCyDsEcwB2N+32SY2GZBDNpRrpj9/5/Of1OXu7BqjdrfvgSEM46htriiAhjdooJf0pAjNFKwUFMZ6dS7+/mRW++nrPry2Lycifrqod0c1jp/7Ax6vjSJcoNy1GlG7yeUf57EJe/0hcipfHzHDUMBvP1b5pGLwwD0rbsWEIYB8p57QUJvXhFsYwzJ2KyxLGO5LBkEQ3YlvgaYxeW6PchPHEzrffEjMt5x6TLLbXdb792+Hsve/zG/cpYwR8S4nnWN6WlU5IG/BuwlWJ2g+Pi27w4OIgjEUQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none Message-ID: <749daa4c-a4a6-41fd-bd34-2a70d942465a@cornell.edu> Date: Wed, 18 Dec 2024 18:05:11 -0500 User-Agent: Mozilla Thunderbird Subject: Re: Atomic mmap replacement To: cygwin AT cygwin DOT com References: <20180219090042 DOT GC3417 AT calimero DOT vinschen DOT de> <60ceffc6-083e-4877-982f-76ae121a4a99 AT cornell DOT edu> Content-Language: en-US In-Reply-To: <60ceffc6-083e-4877-982f-76ae121a4a99@cornell.edu> X-ClientProxiedBy: BL0PR0102CA0043.prod.exchangelabs.com (2603:10b6:208:25::20) To SN6PR04MB5151.namprd04.prod.outlook.com (2603:10b6:805:90::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR04MB5151:EE_|SA6PR04MB9326:EE_ X-MS-Office365-Filtering-Correlation-Id: 800f8172-4efb-4fc7-330e-08dd1fb86d8d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?cGx2cXV1ZEp4UUgxRG5SeFlsa0oxSWcrUHJPTi9SdmZuSXpLUzRReTBVSC9p?= =?utf-8?B?dWtQVjd4M0Y2UjlwQ3JmQS9HbDlIZGk2aFQyVy9rU0o3azI0aFpWeSs0bGYw?= =?utf-8?B?VjNXZWt6b0ttYWIySDM0Wj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:NLI; SFV:NSPM; H:SN6PR04MB5151.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M0s1cEE0bC9jMEQzeC94N2VrSXo1Q3oyK2tTUnQ5U3pleW5IRnREdGdVZlJN?= =?utf-8?B?aHJPQm54ZnIvOVRTRmVuVWxiT0VQWXA1bVJ2TmhZMXhXc3FoVU1XdC96RGlG?= =?utf-8?B?enRqcWZqczkxdlNDelRxVGc3cUNjeEw1aUJ5N0h3V21QOFk2MzZSRWc2dzhq?= =?utf-8?B?VHNVc3VUTzc0RzB1UmRNMEV2UDZqeGU1dzFkZEdTd29HNitqc1FrTTIraWZG?= =?utf-8?B?WWtOTloxWkpoV000K1NGV3JqakNlZXRwYVVIa3hFcHdPZkoyTDNOOXhOaHha?= =?utf-8?B?NXRndXhMSFVVVXFJMVNEcWZCNWVWaHp5aFo5a2lDenVUMWFoaFU1Y3ZPTm5y?= =?utf-8?B?WUc5Y3VvSWNGcHo0S0kxakhiaDFYdXlqajYrQVdkazdwalR1RE00bEtpWjNq?= =?utf-8?B?TWxBOGMyUnVQbmZFaks0ODdWRHJJb1JnY3VZTk80MmlDRVJUUmRWS21XYk0x?= =?utf-8?B?aFFEdEc5YXp3ZWpoam9aUmJUTExRaElPMzRZUzREWVZ2YS9ZQVA4ekp2NUlv?= =?utf-8?B?K1FPMi9wZ2VDeC9DNklaTHdFTkVzTmc1U3ZtWW93STkzenNnbjNhV3B5aVpp?= =?utf-8?B?bFVCS1RYc2p4bEFyb0k0VFEvOWtwU014Z09Fb01nUmVCbE1yV2MrYnU2MWxE?= =?utf-8?B?bHRYZ0RrYy9WeGhxcW1kWU1JdDdRWGlDd3l6eTd2cG92bDh1YzVreWJ1WW9O?= =?utf-8?B?Qk5DVWpGZ0JCVmJTaEZKNDN2K1J4Tk1hOHpm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R2RJbTE3Q0JGQWtaTk5VZVlSeC8wSlFGQnJCaXppSHN1NDhiVnpR?= =?utf-8?B?WmRibTluS0dLK3Z0QUZEbVBqcmVYdHdZZSsvcHo0dThGT1BkZzVxTWJiZWly?= =?utf-8?B?N2w3b0ZQQ2FicmZna3NJMVozWmxyOEdkdnNPODRyZWFYbGRZK2F0MlBEakZX?= =?utf-8?B?ODFHTnVTdEtmeER4dU1zUVVhcElFeXhVZGF6c29ucUlLd29VOFlTbjRYb2dn?= =?utf-8?B?RG5LSzFIeEZMb2ZoMjI4RFBYY2FOMjRwVXQ2QlJzc05CN09NN3c2MmQzakFw?= =?utf-8?B?TjhHOGZSRFJmMzdqVkt1VWNpMitWWHdNMHQzUWpvZjZrZ2RETGExOGxnWnpE?= =?utf-8?B?OW9GdUhHUXU1MTlTdDI4LzU2eFRkWWYzQUJIN3p2Tk1hRXN6T2EvajJ1eDBX?= =?utf-8?B?T3ZFZTJZaHk5cmQrR3h4ZWNwZTF3am1rZzZWeWdENHhXdzgwUVlnNHprc1JZ?= =?utf-8?Q?/4nd6dnRT7w9yAuKjIcGBD/ls?= X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: 800f8172-4efb-4fc7-330e-08dd1fb86d8d X-MS-Exchange-CrossTenant-AuthSource: SN6PR04MB5151.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2024 23:05:13.1637 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UNabvWBGAICDmZIidkuwFaB3gntnCWYKCKoQDU6fa30kBZ7s3+96vpu4Va5r03IN4UbBki/dWwyccv8nDo9vkQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA6PR04MB9326 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Ken Brown via Cygwin Reply-To: Ken Brown Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 4BIN5lgR651131 On 12/18/2024 5:24 PM, Ken Brown via Cygwin wrote: > On 12/18/2024 1:35 PM, Corinna Vinschen via Cygwin wrote: >> On Dec 18 10:45, Ken Brown via Cygwin wrote: >>> No, I'm still confused.  I thought that the interval determined by >>> u_addr >>> and u_len was the intersection of the requested interval and the whole >>> interval of the mmap_record; this implies u_addr >= addr.  Back in the >>> definition of mmap_record::match, we set low = max (addr, get_address >>> ()), >>> and then on success we set m_add = low.  Doesn't that imply m_addr >= >>> addr? >>> Sorry if I'm just being dense. >> >> Apologies, I didn't check mmap_record::match().  You're right of course. >> So, yeah, just go ahead. > I think I'm seeing a similar confusion in > mmap_is_attached_or_noreserve().  I'm tired now and am having trouble > sorting out exactly what that function is doing.  But the definition of > commit_len looks suspicious to me.  We know from above that start_addr > <= u_addr.  So the quantity we're subtracting from u_len is actually <= > 0.  That can't be what's intended.  Then in the call to VirtualAlloc, > we're allocating starting at start_addr.  But how do we know that > start_addr is in the noreserve region mapped by rec?  All we know is > that the interval from u_addr to u_addr + u_len is in that region. The only thing I can come up with immediately is that we should sort the list of mmap_records in order of their starting addresses. Then if start_addr == u_addr, we commit u_len bytes, otherwise we fail. > I hope I'm just missing something obvious. Still hoping... Ken -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple