From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by sourceware.org (Postfix) with ESMTPS id 7DB64385DC1C; Thu, 28 May 2020 19:51:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7DB64385DC1C Received: by mail-oi1-x241.google.com with SMTP id w4so327311oia.1; Thu, 28 May 2020 12:51:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=P/iCsoNsM4oMs5VlHonQAXlQoR8M1PO4QDxfZn2Jyb4=; b=Fq28JG9sCa3G6kZKqU4Yzu+RH1Oq3W7AQKiILyF2kHLfdaByYU31lH9n1LbhXRlNZm Uj5NQYjDf0whiajTkIr1qMmLcGYLEj3HRo/a9+hq6zE4jbMvmJyLVWNjZcm5l3B6q7zZ KobJEZsO8twHTFhABbffl83rZZl0aY5UpJhYfOVodgc6aEA01ApiJT9bnJWJ4WzY4V5B 005iiAGPWZGukdrAL0CvoB6WSLVq4sGp3Z/IPzRdUiMDqwqLiUJmHPWv8hbrNlQfYcZ6 SdS02ABvZTcNxdXRh/gClu3xPlexuw4RgnrDqBB5PUxhPm+sOSvQKEC5QlOQtLuA/V20 /nCw== X-Gm-Message-State: AOAM530unA/7fxphOu50iszAz0HMNFXl4GjC1vyMqOHF0rq5BHfIf3Sq m6WfCeriGEQX8kTEsE0adilWo/D5o6ML2H/0asI= X-Google-Smtp-Source: ABdhPJxlyv7ffWJQ9tn1j66/UzbNh+RkfC+/0t2hja+W2q6LVfctsqqPh3DatjlugDmSHcldhHb3eydcxaUvE3W1xw4= X-Received: by 2002:a54:4701:: with SMTP id k1mr3435653oik.175.1590695492849; Thu, 28 May 2020 12:51:32 -0700 (PDT) MIME-Version: 1.0 References: <4b619179a08075bd2ee7f9e98aa2d5918191306d.camel@redhat.com> <5de2a5202b50882612e1fe51d254f2b125f61716.camel@redhat.com> <885d0b34df56c30f25c2ba57f4eecf517d1ba05c.camel@redhat.com> In-Reply-To: <885d0b34df56c30f25c2ba57f4eecf517d1ba05c.camel@redhat.com> From: =?UTF-8?Q?Nicolas_B=C3=A9rtolo?= Date: Thu, 28 May 2020 16:51:20 -0300 Message-ID: Subject: Re: [PATCH] Port libgccjit to Windows. To: David Malcolm Cc: jit@gcc.gnu.org, gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 19:51:34 -0000 > 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. 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. > 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.