From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by sourceware.org (Postfix) with ESMTPS id 883B53858D3C for ; Mon, 17 Jan 2022 13:51:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 883B53858D3C Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2051.outbound.protection.outlook.com [104.47.13.51]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-19-NMewEXo6M9SPmItt5d9iwQ-1; Mon, 17 Jan 2022 14:51:31 +0100 X-MC-Unique: NMewEXo6M9SPmItt5d9iwQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mmXoJY133U+iHP/0OlF582Tg59Q3SqNKGwEwVOWf3XBD0hKtNP5eUlZEaecRxRoOYErRUyvL7/TVnMVTPgpLtkQUuWK9BTVbUldeLbXzYPyGzT5HnNlPjrv7WVNMAEqYmsIu8yd2jdfP4xFxvElYPeIjhHiAmCwOs3xjq7tN/r/ILXW9SLAJurs1qI44sGJv4U7/6VvvXh2XgGBjSJJ4NxZSiilTM3Cd+Bree2eTcc/o9NsEoUIjwQPX8Y5+OLCiQFMDFlwd8i9d5BDADRC+2CQutf9GfqTjiGSGcQ7kCuyMrLDeo7pF4W6DwBHEJ0VRAo4CHzwqaQPOKzLrBi2qcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=mCfIylUipM8edYlMDDFBYPL1iG+RpmQm3N/Uz+tNhCc=; b=LjS/vC2ALNees6M3pFvBUlDZA3dLhuKIaqtGLnou78ojY2gZuIF8+xX9HSS+qdixoZ1pDWGm2kb4dh7hLY77EC39SbKjBRmRNGzp+1bUsAbLjWuibAmlW7sZ/Jh78ieRmIhvHhr9nIGKuuEWfSXGfOp3GM0PNUchyx5Pyee1u79tUdSyUKPMvLMj7aPp/9jSAOzVesKVqNN3TJZk4cKfH5MIw82PJ4IofVOUQq/GpdC/gyf8zxKoIDRDrJa0/vPpMtZin4pre9RVS0h5ffejD1RU40Obr82RVu+6lgRFn53XkK0L9T/49vgZAyPVwo7FKaLexiUrg+Go9BpmMWPfHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by AM6PR04MB4262.eurprd04.prod.outlook.com (2603:10a6:209:4a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.11; Mon, 17 Jan 2022 13:51:29 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::5951:a489:1cf0:19fe]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::5951:a489:1cf0:19fe%6]) with mapi id 15.20.4888.013; Mon, 17 Jan 2022 13:51:29 +0000 Message-ID: <62989164-2784-07f0-ea30-9000c9c9eb6f@suse.com> Date: Mon, 17 Jan 2022 14:51:26 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] ld: Require GCC 8.0 for p_align-1.c tests Content-Language: en-US To: "H.J. Lu" Cc: Binutils References: <20211229193949.146079-1-hjl.tools@gmail.com> <11e134a2-1ee7-bec4-fa03-1d76609923f7@suse.com> <5843914b-e666-3c55-2e5b-5b320d55cf51@suse.com> <1d8309a8-434c-f4e5-1c48-b16229b16489@suse.com> From: Jan Beulich In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AS9PR06CA0130.eurprd06.prod.outlook.com (2603:10a6:20b:467::17) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1b3f5c0-e3f4-4510-03c7-08d9d9c07644 X-MS-TrafficTypeDiagnostic: AM6PR04MB4262:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cUC071RUr1GsFkFdB9YKygpzaUUGoATzGNuC3KDQMml//4ZsB6n4KjJxomDeZUk+nq8eqzY7sXUp0j+XjCWg4h06v7kmgdlVlJmIqvN5pqkNGxhdoKILHKQuj5kkZDhTRDPi8QeZL+W6ne6naX0hDJV8hOjFgFUQfLqZic/l7d722JYOBltrubWhonY/ET7EK/MBSPFx7DP6lX2B2Eek1AM8wtxGPPsKd9kQorT9pdBC2+hTIpzwMPbeF/afOihYr5s1yHcOQfaWTymu7gpZzggVIU3QrH6jWGFdd9Y091TPjiYpahhqqlpq6+0ijHIOz9FPsDcg5jW5eO8B0sfGEoZXXjE8jxdAhdh5BBcsj1P0SFcOjBhqiTGUCqAOiLE42s2XL7Lag6L1ksOAzXGDUoLhDpcs6fPqJ/+XYmiULNQMZCPLQhkqjvxRz2NevDRY+Olg6PG7x5XsJDXrqGFtnzq/L6M3hkbG+zhnT0uaAyC1Eqty5cBlNLf/HWdK7IFfevSerJEhrhssghl2hxBrvl/0KjLvGfpeYHIG/rpVc7WH4BtC6n/luY2ZbGSnCC1KrkV0L45xE4JJFUopEdZExA5dQdBIOv5JCQeP8qbE2HYG798oSQOymjrWPQ9oxt2rFsCbPcLynu19l8ZbbXbVW6yu08zkAgGyI3BAXGYY/rAMIDXflZjACVRw7vlQTlHUjKaHt7wvI0RYrMF3m0PO8/acdfTIQV/uTyKqwnk3IRU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5600.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(36756003)(66476007)(6916009)(66556008)(31696002)(6666004)(4326008)(66946007)(38100700002)(83380400001)(86362001)(316002)(8676002)(2616005)(26005)(8936002)(53546011)(508600001)(6506007)(186003)(6486002)(31686004)(2906002)(6512007)(5660300002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SGlWK0hxcld6NFRQT1J2Qmh3NFNXSWFBTTExVUtBNVRja080SXVpVHhFWGZa?= =?utf-8?B?Y2tOM2drdUQ1Z0lIZ0dvTlRXd2xpbkpkaHhqQzN3QXJ6MWY1eEdBbWpWbk1J?= =?utf-8?B?YWRJS3BjUmkrSURXMTlhYW93YjFMWFVTa09RNitwQzlHRnplRGlUQyt4Q0V0?= =?utf-8?B?U0dtRXoxeGxGY0h2ME5YMkdNUmdEbTh4TE5kODZBbVdvWjhsUzdNajA5S3p5?= =?utf-8?B?SlpSRGN0eTBqU25lNGpmVCtxd3o3Q2Z2czliamp4bUNTZStlaU9JQTcrcnRZ?= =?utf-8?B?dE9FVlR0UG90a2tsM3R5SG1aRy9rcHRaM1M1WE1vSzBGdnRPaGlUTlZGaUFu?= =?utf-8?B?SE5xNnc3aFVKZmRnOHlWdjF4VjNBK0VzMk5uZzZZNzNUS1pzWVZyU2JnNDR0?= =?utf-8?B?Zm4yblFObWR2bzY0eFoxVUtOSlpHT3JVdzhtRjZrU3pOcGFwcXVhbDNvcU40?= =?utf-8?B?V2VDeU50NEdacEpTRFczTStsY2JUWGRjQk9DZGlWbkh2UEN6ZHhOVVBUR3Ji?= =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lwRXJC?= =?utf-8?B?aytMS0hlQnlPbjBzM1hyNjZvVEF4d24xNCtoS2luc283amtkYjUzL0xieHIy?= =?utf-8?B?S2dydW1MZkRmYkNlVUFaN2Mwcm5HUnlxb1JEc2lUd3dYbTI4WUtQeUNJMWEz?= =?utf-8?B?QkVXVDJ6THdDc2plYkY3dEpBLy8vOFB2bGdhUTZsdVlSZHExZ0FYb1JhY0lX?= =?utf-8?B?R3Q4U0xNSmZ5S29TMGFvbGhZNDdvUmFCeDdoZ0hrUnNMT2l3V2I2czU4S1hH?= =?utf-8?B?c2lqMkRIQ2VWdUpzRmt6ZXd5eVB0QXJoeHBpU1ZXS3poNWVFU3hqTTZUTHJY?= =?utf-8?B?RWtuK0M3OVc0N1RMenlPRmpQYVRZU2ZWRzIvK1NMYUhGdmg3cTlVNCtnZWZK?= =?utf-8?B?QUFBL3RrbURQK1d1RDF0Vzh1ZHdUU0MwQy9TcDdqNXpiZ0NhTy9qM0VOcFIw?= =?utf-8?B?em9lRXUrb0xvVzhVSy9pcGJlN1pSUndrRHoxSDhzZmtpdHRqU2hqWFg2MWZn?= =?utf-8?B?RDVkaEdZM0ZCNjJrcVdXbVJ1bGt2WHpHbFh5alM2eHNLeFZhaEZYYWtPbncv?= =?utf-8?B?bXAvSS91d0ZMOFRvdlNleXh3NGtjTEtrYXRpSDJlMTRWRTArcGtSNGdHQWdZ?= =?utf-8?B?VW1iT1N2L2lVN0FOSDd4K2VuTWpFRXJVVDNEcGsrTnR0OVc5Rkd0VnphWUNI?= =?utf-8?B?dzJ2SjJVZGNIR3dYbnQvTGczQ2lHSklBNmhSdCtUdlVjbk9La1RKOVJGbTJn?= =?utf-8?Q?s0MCKemznX68zHQYrycRVHk=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1b3f5c0-e3f4-4510-03c7-08d9d9c07644 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2022 13:51:29.1902 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BmEH4uefm/Nf7sGbSWiEyde2te2HRmrPTYw2NFaG3I6a4p54trbRep+cfJNZoqah+sl4qhXvYi3P5zixVpq5Ig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4262 X-Spam-Status: No, score=-3033.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2022 13:51:37 -0000 On 17.01.2022 14:44, H.J. Lu wrote: > On Mon, Jan 17, 2022 at 2:38 AM Jan Beulich wrote: >> >> On 14.01.2022 15:14, H.J. Lu wrote: >>> On Fri, Jan 14, 2022 at 6:08 AM Jan Beulich wrote: >>>> >>>> On 14.01.2022 15:02, H.J. Lu wrote: >>>>> On Fri, Jan 14, 2022 at 5:40 AM Jan Beulich wrote: >>>>>> >>>>>> On 14.01.2022 14:03, H.J. Lu wrote: >>>>>>> On Fri, Jan 14, 2022 at 12:27 AM Jan Beulich wrote: >>>>>>>> >>>>>>>> On 29.12.2021 20:39, H.J. Lu via Binutils wrote: >>>>>>>>> --- a/ld/testsuite/ld-elf/linux-x86.exp >>>>>>>>> +++ b/ld/testsuite/ld-elf/linux-x86.exp >>>>>>>>> @@ -185,6 +185,42 @@ run_ld_link_exec_tests [list \ >>>>>>>>> "" \ >>>>>>>>> "tmpdir/indirect-extern-access-2.so" \ >>>>>>>>> ] \ >>>>>>>>> + [list \ >>>>>>>>> + "Run p_align-1a without PIE" \ >>>>>>>>> + "$NOPIE_LDFLAGS" \ >>>>>>>>> + "" \ >>>>>>>>> + { p_align-1.c } \ >>>>>>>>> + "p_align-1a" \ >>>>>>>>> + "pass.out" \ >>>>>>>>> + "$NOPIE_CFLAGS" \ >>>>>>>>> + ] \ >>>>>>>>> + [list \ >>>>>>>>> + "Run p_align-1b with PIE" \ >>>>>>>>> + "-pie" \ >>>>>>>>> + "" \ >>>>>>>>> + { p_align-1.c } \ >>>>>>>>> + "p_align-1b" \ >>>>>>>>> + "pass.out" \ >>>>>>>>> + "-fpie" \ >>>>>>>>> + ] \ >>>>>>>>> + [list \ >>>>>>>>> + "Run p_align-1c with -Wl,-z,max-page-size=0x1000 without PIE" \ >>>>>>>>> + "$NOPIE_LDFLAGS -Wl,-z,max-page-size=0x1000" \ >>>>>>>>> + "" \ >>>>>>>>> + { p_align-1.c } \ >>>>>>>>> + "p_align-1c" \ >>>>>>>>> + "pass.out" \ >>>>>>>>> + "$NOPIE_CFLAGS" \ >>>>>>>>> + ] \ >>>>>>>>> + [list \ >>>>>>>>> + "Run p_align-1d with -Wl,-z,max-page-size=0x1000 with PIE" \ >>>>>>>>> + "-pie -Wl,-z,max-page-size=0x1000" \ >>>>>>>>> + "" \ >>>>>>>>> + { p_align-1.c } \ >>>>>>>>> + "p_align-1d" \ >>>>>>>>> + "pass.out" \ >>>>>>>>> + "-fpie" \ >>>>>>>>> + ] \ >>>>>>>>> ] >>>>>>>> >>>>>>>> The two PIE variants of this also fail for me on glibc 2.26. Looks >>>>>>>> like LOAD segments' alignment isn't being honored there, at least >>>>>>>> not if it's as big as it is here. >>>>>>>> >>>>>>> >>>>>>> The PIE alignment needs the kernel fix: >>>>>>> >>>>>>> commit ce81bb256a224259ab686742a6284930cbe4f1fa >>>>>>> Author: Chris Kennelly >>>>>>> Date: Thu Oct 15 20:12:32 2020 -0700 >>>>>>> >>>>>>> fs/binfmt_elf: use PT_LOAD p_align values for suitable start address >>>>>> >>>>>> Well, then the test needs to be skipped if that fix is not in place. >>>>>> After all you're testing binutils behavior here, not kernel or libc one. >>>>>> I'm running a variety of (largely up-to-date) kernels on all of my >>>>>> systems. But it looks like our kernel folks decided against backporting >>>>>> this particular change. And I don't think you expect people to remember >>>>>> to run the testsuite only on top of "certain" kernels? >>>>> >>>>> Care to submit a patch? >>>> >>>> I have no idea what to check for. I would really expect you to fix such >>>> an issue (or really two of them, considering the other problem) recently >>>> introduced by you. >>> >>> What compiler are you using on the broken kernel? >> >> gcc 7.4.1 >> >> No idea how that matters, though. > > Try this. I can see that this might help with the other problem I did report, but I don't see how gcc version and kernel in use would correlate. I guess I could build binutils on that box with gcc 11, and then the kernel still wouldn't do what you expect it to do. Much like I could continue using gcc 7 and use a newer kernel, and then the test would be skipped for no reason. What I don't understand is why this needs to be a "run" test in the first place. You're only after checking that the produced binary is correct, aren't you? Jan