From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by sourceware.org (Postfix) with ESMTP id B29403851C19 for ; Thu, 28 May 2020 20:46:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B29403851C19 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-176-NmYbvw0PPIyHft8t7T-hyQ-1; Thu, 28 May 2020 16:46:38 -0400 X-MC-Unique: NmYbvw0PPIyHft8t7T-hyQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 90EAA800688; Thu, 28 May 2020 20:46:37 +0000 (UTC) Received: from ovpn-112-12.phx2.redhat.com (ovpn-112-12.phx2.redhat.com [10.3.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 05F229F98C; Thu, 28 May 2020 20:46:36 +0000 (UTC) Message-ID: <5edb0f517d11a551f622ebb787fc06cd6c06225b.camel@redhat.com> Subject: Re: [PATCH] Port libgccjit to Windows. From: David Malcolm To: Nicolas =?ISO-8859-1?Q?B=E9rtolo?= Cc: jit@gcc.gnu.org, gcc-patches@gcc.gnu.org Date: Thu, 28 May 2020 16:46:36 -0400 In-Reply-To: References: <4b619179a08075bd2ee7f9e98aa2d5918191306d.camel@redhat.com> <5de2a5202b50882612e1fe51d254f2b125f61716.camel@redhat.com> <885d0b34df56c30f25c2ba57f4eecf517d1ba05c.camel@redhat.com> User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: jit@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Jit mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 20:46:43 -0000 On Thu, 2020-05-28 at 16:51 -0300, Nicolas BĂ©rtolo wrote: > > I'm going to have to trust your Windows expertise here; the tempdir > > code looks convoluted to me, but perhaps that's the only way to do > it. > > (Microsoft's docs for "SECURITY_ATTRIBUTES" suggest to me that if > > lpSecurityDescriptor is NULL, then the directory gets a default > > security descriptor, and that this may mean it's only readable by > the > > user represented by the access token of the process [1], which > might > > suggest a simplification - but I'm very hazy on how the security > model > > in Windows works) > > I tested this and it gives write access to the "Authenticated Users" > group. Aha - sounds like that would be a problem. Thanks for clarifying. > The > way I did it gives access only to the user that owns the libgccjit > process. I > have to admit that it is a lot of code and it is hard to understand > unless you > know the security model of Windows well. I don't know it well, I > wrote this > keeping the documentation close and experimenting. Thanks. > > I was able to successfully bootstrap and regression test with your > > patch on x86_64-pc-linux-gnu. I also verified that the result of > "make > > install" was not affected for my configuration. > > Great. > > > I've pushed your patch to master as > > c83027f32d9cca84959c7d6a1e519a0129731501. > > > > Thanks again for the patch > > Dave > > Thanks to you for all the good feedback. > > Nico.