From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752144Ab2GZCB0 (ORCPT ); Wed, 25 Jul 2012 22:01:26 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:56083 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751521Ab2GZCBY (ORCPT ); Wed, 25 Jul 2012 22:01:24 -0400 Message-ID: <1343268072.5132.194.camel@deadeye.wl.decadent.org.uk> Subject: Re: [PATCH] posix_types.h: Cleanup stale __NFDBITS and related definitions From: Ben Hutchings To: Josh Boyer Cc: Linus Torvalds , Andrew Morton , law@redhat.com, stable@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 26 Jul 2012 03:01:12 +0100 In-Reply-To: <20120726012713.GA2356@zod.bos.redhat.com> References: <20120725144033.GK10534@zod.bos.redhat.com> <1343258796.5132.164.camel@deadeye.wl.decadent.org.uk> <20120726012713.GA2356@zod.bos.redhat.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-r5FwtFtSjh/S3ET2eYzm" X-Mailer: Evolution 3.4.3-1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 2001:470:1f08:1539:21c:bfff:fe03:f805 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-r5FwtFtSjh/S3ET2eYzm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2012-07-25 at 21:27 -0400, Josh Boyer wrote: > On Thu, Jul 26, 2012 at 12:26:36AM +0100, Ben Hutchings wrote: > > On Wed, 2012-07-25 at 10:40 -0400, Josh Boyer wrote: > > > Recently, glibc made a change to suppress sign-conversion warnings in= FD_SET > > > (glibc commit ceb9e56b3d1). This uncovered an issue with the kernel'= s > > > definition of __NFDBITS if applications #include afte= r > > > including . A build failure would be seen when passing= the > > > -Werror=3Dsign-compare and -D_FORTIFY_SOURCE=3D2 flags to gcc. > > >=20 > > > It was suggested that the kernel should either match the glibc defini= tion of > > > __NFDBITS or remove that entirely. The current in-kernel uses of __N= FDBITS > > > can be replaced with BITS_PER_LONG, and there are no uses of the rela= ted > > > __FDELT and __FDMASK defines. Given that, we'll continue the cleanup= that > > > was started with commit 8b3d1cda4f5f ("posix_types: Remove fd_set mac= ros") > > > and drop the remaining unused macros. > > >=20 > > > Additionally, linux/time.h has similar macros defined that expand to = nothing > > > so we'll remove those at the same time. > > >=20 > > > Reported-by: Jeff Law > > > Suggested-by: Linus Torvalds > > > CC: > >=20 > > # v3.4+ > >=20 > > (as 8b3d1cda4f5f went into 3.4) > > >=20 > Indeed. However, I believe Linus pointed out that even before > 8b3d1cda4f5f the macros that were removed weren't actually used. > It's likely safe to go back further than just 3.4. >=20 > I'll verify again in the morning and include the furthest back we could > remove these. For now, let's go with what you suggest to be safe. Yes, on reflection, this is mostly independent of commit 8b3d1cda4f5f. The problem is that userland might accidentally be depending on getting the definitions of NFDBITS and FD_SETSIZE from . But, having now read Linus's history of the rotting of these particular bits , I agree this is very unlikely. So, I withdraw my request to restrict the target stable versions. Ben. --=20 Ben Hutchings Humans are not rational beings; they are rationalising beings. --=-r5FwtFtSjh/S3ET2eYzm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIVAwUAUBCk6Oe/yOyVhhEJAQoMMw//eWvC803kut6pFpS+FoYHXcJgjZ4PFn9K RUHr660KCdC9EcvsJW8gBPfzin4Uyzs7NDsEgod3JjxQcxZMSn6W4/GZzzKPZ/NI MBQNKmb16t5uXgzjCDmzbuFZHxvz7xc7P5l1/pQW9cFPdSdHHNwcLn2Nledav73e x+u2nHKotAhnICSB3nLrsW5vUBUUDLvsQlyxcDpYaeXX1ArRZQtDgL02Gs2i8CAB gyOV7dOZ0NmLJ5TEsEhgctwVL5A4dssiSt18pbz4Kr48i13yCdBxo/6DUeOFsbvo yftK+Th75Sl+CJfyQtivDI+9HxVJSMBGmmynRsYS/bFbMtKfh8g73Siz1CuDSl5w JyNV1TqeJFEUFQWRf7iujqBZe2Aj8skETffOoESF9z1suEOuRK9CB+L+PXQDigu3 MNS/ja/tltQF1hsM2X+NLhLVLIwTKu7/Z775ryaGnFAOcmuZj0bVx3jPNeuOpNbK wuFey4Vs3LRpBwdtBXWbucK0XxrsNgiypWE9PbeT7PW2e26jPONJAJbcDetmtw/4 3AK2BHiFHNzTQbbr800N8QuYUqeVegmrv1DM7AXKtuMRTtZLeXkol5ft1azAElej WJhM97/IESsSolaPwbPkIsR+xno258ZuL65Qy/mHvt1Jou4DtCuP0oJYemj82Oxs Gw66bZR0NRE= =CO7s -----END PGP SIGNATURE----- --=-r5FwtFtSjh/S3ET2eYzm--