Message ID | 1510701753.4087.24.camel@cavium.com |
---|---|
State | New, archived |
Headers |
Received: (qmail 21411 invoked by alias); 14 Nov 2017 23:22:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 21399 invoked by uid 89); 14 Nov 2017 23:22:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-25.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KB_WAM_FROM_NAME_SINGLEWORD, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=multi, in=c2?= X-HELO: NAM02-BL2-obe.outbound.protection.outlook.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Steve.Ellcey@cavium.com; Message-ID: <1510701753.4087.24.camel@cavium.com> Subject: Re: [PATCH] add attribute nonstring From: Steve Ellcey <sellcey@cavium.com> Reply-To: sellcey@cavium.com To: Florian Weimer <fweimer@redhat.com>, Joseph Myers <joseph@codesourcery.com> Cc: Andreas Schwab <schwab@linux-m68k.org>, Martin Sebor <msebor@gmail.com>, Paul Eggert <eggert@cs.ucla.edu>, GNU C Library <libc-alpha@sourceware.org>, Hannes Sowa <hsowa@redhat.com> Date: Tue, 14 Nov 2017 15:22:33 -0800 In-Reply-To: <5ac1ad5b-e929-e5b7-9167-87d60c592ce6@redhat.com> References: <06e1ee69-bb30-ff95-42db-2d4b2d7eba7d@gmail.com> <1510594506.5755.119.camel@cavium.com> <57b536ce-fd7d-aa04-3475-1fd34afaf1be@redhat.com> <alpine.DEB.2.20.1711141704140.2574@digraph.polyomino.org.uk> <871sl0agp6.fsf@linux-m68k.org> <dc57207b-d4ae-6e16-4723-334288a9399d@redhat.com> <alpine.DEB.2.20.1711141824120.2574@digraph.polyomino.org.uk> <5ac1ad5b-e929-e5b7-9167-87d60c592ce6@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: BN6PR1201CA0022.namprd12.prod.outlook.com (10.174.238.32) To BN6PR07MB3540.namprd07.prod.outlook.com (10.161.153.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 803ae99d-6c02-450b-28f3-08d52bb697f1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603258); SRVR:BN6PR07MB3540; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3540; 3:JXUE6ZVw6kNsHeteAA6a98LmFE3corrj9IG/8uW0vzL0d8IJr4sY0cNjCmZ46y56aLSkrIY9o2+wVkI5xHlOhFvwDgsdCSM/AJGOdBIHI4UZmjQhR4uYfbGebFJZqJ2QweQ4sWvz4bZbDPwMhFuv41B0dHLwD3VYsOcVqFmt1SGIhXGKOjnE4mHAsNuku1R343E/9ne0pqEVtGt/6vvpjEd/GuTUBdjeHaGtbL1nj/gkkvpN5x6fBgPUJ+y19LaS; 25:i1kI3TuaCtGC/L31CUhbO4WifdC4zTFZUQuXiicy4PVDTvRB7bgQKhqcCPgBe9bWnBu4GVwo15Q7oaJjoML+/V6UWH6y6i9tQjrBtJxq4OUb70kSZd1ZeiC7QEb4n6JezZOSO0J4NtJBMFhNBuZwjM0ttzVgOEihs+tHEdkdzKQxVENW5bI41Q1/J5yV4NGzWdwCpN4OXWxJV5b2P5oX/jOovBF8JwuHMfKitQ/0y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uUgouFdaud1iz48oSmwPF4YI825t6QVlogOBu4gNOkMwOVski39UAq2MuDqk/iMuQAQIz9U8rMKXZIL6mzixRxict61cQui3ANcE3SNN1cwqHiuadpAfyAph1SOCJteITu41sTQ== X-Microsoft-Antispam-PRVS: <BN6PR07MB354021314451D20F38465116F5280@BN6PR07MB3540.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231022)(93006095)(93001095)(100000703101)(100105400095)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123562025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3540; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3540; X-Forefront-PRVS: 04916EA04C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(199003)(189002)(24454002)(377424004)(81156014)(6116002)(8676002)(3846002)(50466002)(16526018)(50226002)(25786009)(72206003)(4326008)(6246003)(8936002)(106356001)(39060400002)(68736007)(6512007)(81166006)(50986999)(76176999)(53936002)(5660300001)(478600001)(6506006)(2950100002)(33646002)(105586002)(6666003)(66066001)(6486002)(305945005)(43066004)(97736004)(36756003)(69596002)(189998001)(101416001)(110136005)(54906003)(3450700001)(23676003)(47776003)(5820100001)(316002)(103116003)(2870700001)(4001150100001)(93886005)(7736002)(53416004)(229853002)(2906002)(99106002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3540; H:sellcey-dt.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjA3TUIzNTQwOzIzOktwQzN4c21YRFpBMHZsQWtKeUhpOTRJQ1BE?= =?utf-8?B?MkVNZThZczFoZTg1dU5ESCtsaHkwcDBRQUl4TmNxRXdkNndNczlRSkR6Rkw1?= =?utf-8?B?YWNIRmNseGlPRForSXgyM2FWRGpiOVNrcllkMytnUjZWcU9PZnc3am9mZXA1?= =?utf-8?B?MWJuQ2x5WnBDOEFvNERUb3A5QnFkQk1SRjZFc0krTlpzSXFjY21mVk5vWklT?= =?utf-8?B?aENZcXRYMGp1aU8yWVRpcno0L05zSnJMK0M2ZzYzaHN2L3BMaTNocGN2S1Vj?= =?utf-8?B?a1l0Rmo3a1VQT2pIK3lHZVNHSmxFUlJwOFFLaHRYZEIzK1cyZm1xaW9QS0FL?= =?utf-8?B?SjhnYkNYTWt2M2Exdmk4dkRvVWV4T0ZmcEtFNGZsZks5eHFvZjY4T2FtcU4z?= =?utf-8?B?bDI5MG9aNXJTY2ZUTmtRaWxzVzZRd2F0YjZQTkxKQXFyN05XdUl3SndFNHFi?= =?utf-8?B?M3dVZW9LR0hVT0tXd0hGUmM3cmhyckFXeVZPRFoxcE81TnFUUmMvc05aU3JG?= =?utf-8?B?a2MvRWplK1p1UDRYYmpOOFlkUFJHWmU3WWk3S0kyY2FkVkRzcGp3S1NaTjJX?= =?utf-8?B?amJEYWg2Sys1cXVlRWdZamcwUVhjNG9mNWJnQWZsbCtHVkJZK0xVVld4Ymsy?= =?utf-8?B?YVR1NDZpMXY0emJPalhmZWJaOEVhWmxpWkdCUENWY1k3MUhTS1BiL05MK1A5?= =?utf-8?B?VFR6ZkxyaksyMFd5TVFsNVI2OGI3OEtHYStCRFhGV0FyN3hROGo1UVZwbWpF?= =?utf-8?B?R1VlTTB3VmRreDEzUVBnY0l6VVIzMDhLb0hlK3g3bDFNWnpMVnF2Y1c0K0JW?= =?utf-8?B?OUlL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9Jj8/TpU/g6kqVxGoCFdoP8D0wMOa9Mu0k+rrNc64/IxxybKkQC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2017 23:22:36.8970 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 803ae99d-6c02-450b-28f3-08d52bb697f1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3540 |
Commit Message
Steve Ellcey
Nov. 14, 2017, 11:22 p.m. UTC
On Tue, 2017-11-14 at 19:29 +0100, Florian Weimer wrote: > > So the only thing that's missing is the __set_errno (ENODEV); call, I > think. (It's what the ioctl should fail with for an unknown interface > name.) > > Thanks, > Florian OK, here is a new version of the patch that sets errno to ENODEV. I tested it (Thanks to Joseph for fixing the tests that would not compile due to the new GCC warning) and got three failures that I think are all unrelated to this change: FAIL: crypt/badsalttest FAIL: nptl/tst-thread_local1 FAIL: nss/tst-nss-files-hosts-multi tst-thread_local1 is a failure I have seen before, tst-nss-files-hosts- multi is a new test, and I am not sure what is happening with badsalttest but it does not seem to be related to this change. I also have the not-checked-in __NONSTRING changes in utmp.h in my tree in order to get this to build. OK to checkin? Steve Ellcey 2017-11-14 Steve Ellcey <sellcey@cavium.com> * sysdeps/unix/sysv/linux/if_index.c (__if_nametoindex): Check if ifname is too long.
Comments
On 11/15/2017 12:22 AM, Steve Ellcey wrote: > On Tue, 2017-11-14 at 19:29 +0100, Florian Weimer wrote: >> >> So the only thing that's missing is the __set_errno (ENODEV); call, I >> think. (It's what the ioctl should fail with for an unknown interface >> name.) >> >> Thanks, >> Florian > > OK, here is a new version of the patch that sets errno to ENODEV. I > tested it (Thanks to Joseph for fixing the tests that would not compile > due to the new GCC warning) and got three failures that I think are all > unrelated to this change: > > FAIL: crypt/badsalttest > FAIL: nptl/tst-thread_local1 > FAIL: nss/tst-nss-files-hosts-multi Can you provide more details (such as .out file contents)? Even if these failures are unrelated, they might point to something we need to fix. > tst-thread_local1 is a failure I have seen before, tst-nss-files-hosts- > multi is a new test, and I am not sure what is happening with > badsalttest but it does not seem to be related to this change. I also > have the not-checked-in __NONSTRING changes in utmp.h in my tree in > order to get this to build. > > OK to checkin? Patch looks good to me. Please add [BZ #22442] to both the ChangeLog entry and the commit message because it is a user-visible bug. Thanks, Florian
On Wed, 2017-11-15 at 11:48 +0100, Florian Weimer wrote: > > > FAIL: crypt/badsalttest > > FAIL: nptl/tst-thread_local1 > > FAIL: nss/tst-nss-files-hosts-multi > Can you provide more details (such as .out file contents)? Even if > these failures are unrelated, they might point to something we need > to fix. bassalttest.out: Didn't expect signal from child: got `Segmentation fault' tst-thread_local1.out is empty, tst-thread_local1.test-result has: FAIL: nptl/tst-thread_local1 original exit status 1 tst-nss-files-hosts-multi.out: Timed out: killed the child process Steve Ellcey sellcey@cavium.com
On 15/11/2017 15:58, Steve Ellcey wrote: > On Wed, 2017-11-15 at 11:48 +0100, Florian Weimer wrote: >> >>> FAIL: crypt/badsalttest >>> FAIL: nptl/tst-thread_local1 >>> FAIL: nss/tst-nss-files-hosts-multi >> Can you provide more details (such as .out file contents)? Even if >> these failures are unrelated, they might point to something we need >> to fix. > > bassalttest.out: > > Didn't expect signal from child: got `Segmentation fault' This is something we should investigate. > > > tst-thread_local1.out is empty, tst-thread_local1.test-result has: > > FAIL: nptl/tst-thread_local1 > original exit status 1 I usually see it when I try with a toolchain that requires a GLIBCXX_* version higher than then one installed on the system (for instance the one generated by build-many-glibcs.py). The test should ran without issues if you pass the path of built libstdc++ with the usual paths in testrun.sh. > > tst-nss-files-hosts-multi.out: > > Timed out: killed the child process > > > > Steve Ellcey > sellcey@cavium.com >
On 15/11/17 17:58, Steve Ellcey wrote: > tst-nss-files-hosts-multi.out: > > Timed out: killed the child process > i've seen this timeout too (in virtual machine), it does 1.5M syscalls a third of which is slow socket syscalls. i think that's a bit too much, less iterations should be enough.
On 11/17/2017 01:49 PM, Szabolcs Nagy wrote: > On 15/11/17 17:58, Steve Ellcey wrote: >> tst-nss-files-hosts-multi.out: >> >> Timed out: killed the child process >> > > i've seen this timeout too (in virtual machine), > it does 1.5M syscalls a third of which is slow socket syscalls. > > i think that's a bit too much, less iterations should be enough. The buffer code in nss_files (and nss_db) is really sensitive to input sizes, and we have seen bugs which are triggered with very specific result sizes only, hence the the first loop with the small counts. The 22222 count is arbitrary, but a fairly large value is needed to make the super-linear behavior of the old implementation immediately obvious. An alternative would be to reduce the RLIMIT_AS limit considerably, but that might unduly affect architectures which are wasteful with address space. Thanks, Florian
diff --git a/sysdeps/unix/sysv/linux/if_index.c b/sysdeps/unix/sysv/linux/if_index.c index 56f3f13..e7ca27b 100644 --- a/sysdeps/unix/sysv/linux/if_index.c +++ b/sysdeps/unix/sysv/linux/if_index.c @@ -43,6 +43,12 @@ __if_nametoindex (const char *ifname) Â Â Â if (fd < 0) Â Â Â Â Â return 0; Â +Â Â if (strlen (ifname) >= IFNAMSIZ) +Â Â Â Â { +Â Â Â Â Â Â __set_errno (ENODEV); +Â Â Â Â Â Â return 0; +Â Â Â Â } + Â Â Â strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); Â Â Â if (__ioctl (fd, SIOCGIFINDEX, &ifr) < 0) Â Â Â Â Â {