From patchwork Sun Jun 4 08:12:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 101347 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp439721qgd; Sun, 4 Jun 2017 01:13:03 -0700 (PDT) X-Received: by 10.84.133.132 with SMTP id f4mr8585816plf.94.1496563983662; Sun, 04 Jun 2017 01:13:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496563983; cv=none; d=google.com; s=arc-20160816; b=XfH4VCwa3cgQSNA06AoYty67EDiXkpOYIcRqKmRmfFQpsymSmV6PbGTyP7aKvOoQBF q2NunNuzSW8bQOzI7zYqU2TGG/QR7u0vihzVKswsRyoyM4trEUewsKO0/Z1u7JGwWsBK xvtUmuxxKP5ztAoFbKtm2zA/fu5Jj6BpBvXh3QKfTAdOYOYgVsaateX6ufEX0ypQNmvp D/c+P6txu7NbpvswJ0Er6HGETB9KFOzH2aFWC/9FNQPw0OM1ll73ZjLxJ5YqsUgPwjfy OntpICp/qCdeb9O/NXAf5CUwqVO08VbA2lp9JwCh+p5/qMjYBgcPR6H2POK9lNYpScCS p6Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:dkim-signature:cc:from :dkim-signature:arc-authentication-results; bh=Mr14ecAqSskL7rMHt84gcZCPJ/QysPLn++ttGcQrX6Q=; b=Pa1HayR5BcjBdyMsYvhXsrhN544NIjx1dJIjXSX55rx0C/XEnhM2mNKc+KoCcftNZv UDn87qrb4LhsuNtftIO8yvXqzkJQjbazoWUlM4UfeWwS8VQPkwCoSj01LLZBfWWdC41N 5ijpb+ZD9VR2zVzGy0+KlAaFD8Xoy8+huDBwxAT/nDeZEK4FSfuSHLKEP5Ufj5vuMv6c MbA7eIA9HAH6IJfWLn8JzpLzEx93z6KYGBWybtEgNc+Io/gr2tCCEVgh9MH/381ff5HM FS0G5cuAy04b6VBQz1WgpMdb2J1OC6PuahCRjKFFnbK9xXLufcxVSNHafyIAYqy8MqGL +I8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com; dkim=fail header.i=@verizon.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n185si3589015pgn.333.2017.06.04.01.13.03; Sun, 04 Jun 2017 01:13:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@verizon.com; dkim=fail header.i=@verizon.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751238AbdFDIM4 (ORCPT + 6 others); Sun, 4 Jun 2017 04:12:56 -0400 Received: from omzsmtpe02.verizonbusiness.com ([199.249.25.209]:7967 "EHLO omzsmtpe02.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751157AbdFDIMs (ORCPT ); Sun, 4 Jun 2017 04:12:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1496563968; x=1528099968; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=jQ0bXvV2hj6fzPbPdnOBmFHbbfI/DMlMw/IcydGewN4=; b=hAOwM1+rWz73SM38Tpja3QAdx4QQT0Sch2XMVfZ8/0DdQoc08ZfxoHEp slAx5yF+en7GN9ljnYKSqino1Dt1855V/wYHV8wvd3fK8fnfo1sqCmSIr dFr52A86aHXjYxHNSZLuJlk1r0LT3epPNPb9LNOSIwzpyMfl3/hEpWxKd E=; X-IronPort-Anti-Spam-Filtered: false Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by omzsmtpe02.verizonbusiness.com with ESMTP; 04 Jun 2017 08:12:44 +0000 From: "Levin, Alexander (Sasha Levin)" Cc: Arnd Bergmann , "Levin, Alexander (Sasha Levin)" X-IronPort-AV: E=Sophos;i="5.39,295,1493683200"; d="scan'208";a="214179328" Received: from nord.tdc.vzwcorp.com (HELO Nord.verizonwireless.com) ([10.254.88.187]) by fldsmtpi01.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Jun 2017 08:12:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1496563927; x=1528099927; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=jQ0bXvV2hj6fzPbPdnOBmFHbbfI/DMlMw/IcydGewN4=; b=genWgwqUSbN74M/dzxsLM/KMCZOsuiY0MuP2ndzFbEwllrm3p9s5AnJG JVentYZow9kF9H21b8I5YEnhQEKQjFlRj8gHoiUOJAaLTk01C4PjI4Yjq l0O9PItJkn9HzYWPJdnrvK9mLhQh2A16pSIucJ1HIkYag81AaYirAImlC s=; Received: from gaalpexhub3.uswin.ad.vzwcorp.com ([10.191.138.112]) by Nord.verizonwireless.com with ESMTP/TLS/AES256-SHA; 04 Jun 2017 04:12:06 -0400 Received: from OMZP1LUMXCA11.uswin.ad.vzwcorp.com (144.8.22.186) by gaalpexhub3.uswin.ad.vzwcorp.com (10.191.138.112) with Microsoft SMTP Server (TLS) id 8.3.406.0; Sun, 4 Jun 2017 04:12:06 -0400 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA11.uswin.ad.vzwcorp.com (144.8.22.186) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sun, 4 Jun 2017 03:12:04 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Sun, 4 Jun 2017 03:12:04 -0500 To: "stable@vger.kernel.org" Subject: [PATCH for v4.9 LTS 028/111] ARM: defconfigs: make NF_CT_PROTO_SCTP and NF_CT_PROTO_UDPLITE built-in Thread-Topic: [PATCH for v4.9 LTS 028/111] ARM: defconfigs: make NF_CT_PROTO_SCTP and NF_CT_PROTO_UDPLITE built-in Thread-Index: AQHS3QpAUEeVkhk1MkCB5N9mw4+JNg== Date: Sun, 4 Jun 2017 08:12:04 +0000 Message-ID: <20170604081123.19462-28-alexander.levin@verizon.com> References: <20170604081123.19462-1-alexander.levin@verizon.com> In-Reply-To: <20170604081123.19462-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit 5aff1d245e8cc1ab5c4517d916edaed9e3f7f973 ] The symbols can no longer be used as loadable modules, leading to a harmless Kconfig warning: arch/arm/configs/imote2_defconfig:60:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE arch/arm/configs/imote2_defconfig:59:warning: symbol value 'm' invalid for NF_CT_PROTO_SCTP arch/arm/configs/ezx_defconfig:68:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE arch/arm/configs/ezx_defconfig:67:warning: symbol value 'm' invalid for NF_CT_PROTO_SCTP Let's make them built-in. Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- arch/arm/configs/ezx_defconfig | 4 ++-- arch/arm/configs/imote2_defconfig | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.11.0 diff --git a/arch/arm/configs/ezx_defconfig b/arch/arm/configs/ezx_defconfig index ea316c4b890e..d3f1768840e2 100644 --- a/arch/arm/configs/ezx_defconfig +++ b/arch/arm/configs/ezx_defconfig @@ -64,8 +64,8 @@ CONFIG_NETFILTER=y CONFIG_NETFILTER_NETLINK_QUEUE=m CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK_EVENTS=y -CONFIG_NF_CT_PROTO_SCTP=m -CONFIG_NF_CT_PROTO_UDPLITE=m +CONFIG_NF_CT_PROTO_SCTP=y +CONFIG_NF_CT_PROTO_UDPLITE=y CONFIG_NF_CONNTRACK_AMANDA=m CONFIG_NF_CONNTRACK_FTP=m CONFIG_NF_CONNTRACK_H323=m diff --git a/arch/arm/configs/imote2_defconfig b/arch/arm/configs/imote2_defconfig index 18e59feaa307..7f479cdb3479 100644 --- a/arch/arm/configs/imote2_defconfig +++ b/arch/arm/configs/imote2_defconfig @@ -56,8 +56,8 @@ CONFIG_NETFILTER=y CONFIG_NETFILTER_NETLINK_QUEUE=m CONFIG_NF_CONNTRACK=m CONFIG_NF_CONNTRACK_EVENTS=y -CONFIG_NF_CT_PROTO_SCTP=m -CONFIG_NF_CT_PROTO_UDPLITE=m +CONFIG_NF_CT_PROTO_SCTP=y +CONFIG_NF_CT_PROTO_UDPLITE=y CONFIG_NF_CONNTRACK_AMANDA=m CONFIG_NF_CONNTRACK_FTP=m CONFIG_NF_CONNTRACK_H323=m From patchwork Sun Jun 4 08:12:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 101348 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp439844qgd; Sun, 4 Jun 2017 01:13:31 -0700 (PDT) X-Received: by 10.84.231.16 with SMTP id f16mr8465374plk.259.1496564011140; Sun, 04 Jun 2017 01:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496564011; cv=none; d=google.com; s=arc-20160816; b=t7HdeqSAMOCnMCQbyz48pzCtj6mXH2JKhLeFGb7prBAPmoIDpk+4dKEVdU/bona96S BPjfhAwP5Ka0TAszkFDhGYc6jovzkMjipRXsx+cBf4P5YqNVyFRzZNBT91AJHHRJhcCY Hz3tqSlRwCqZK+ohFo7PH0ZXK04jw0s2thcWeYmaYmhTTBxlZRO3sVINiwUYXXSimy4r yVf+4B34ufAVNTaCnUd90j3IKS7nRh8Mh9cIlFNL0TaObbLa3s+X0uRDUtRmXrZhLe+Q h/k4DismMUNYWOPF+K5f6I0v3hilv6j2m9l6GfEaKfR6y/LOzyb+PtBKwRw4MgHbiv/z 6JAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:dkim-signature:cc:from :dkim-signature:arc-authentication-results; bh=FecJ+OBXfirWyUjNX/yMTspJ9cTYxYijisTOjh97bl4=; b=tU4mpyqZdUK/wQn96Otp16JYNmHsfYUwe/jTwiUxbFuuzq01CaHbCvK1xKeaYp9bj9 Zt8qXNn26iG1WjP6Fkc69ibdQigOnt6cba7X+A4v0jOFnjGH+XkEH1jClRb4nmEBRLsl kHplyIij5MqUl3Doo7ADRzTm85fc9CPRasdSLJwVXOt05c23EnVz0BzW+4o6Ffr5D67b f73RUwb1gMmePw78u9GCjNHyGjORCs3FqdeOWmzNOjwkm4Uh2MUKB+S0mvslvEN4u0Nu hzENSHjkgr8xy0K/MZHcZ5HGK8xnNEVPGCbWmgYLGKOB6olCYO9VL1B7GIxb9QNICptP ORDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com; dkim=fail header.i=@verizon.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j17si27669684pfj.239.2017.06.04.01.13.30; Sun, 04 Jun 2017 01:13:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@verizon.com; dkim=fail header.i=@verizon.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751258AbdFDINa (ORCPT + 6 others); Sun, 4 Jun 2017 04:13:30 -0400 Received: from omzsmtpe02.verizonbusiness.com ([199.249.25.209]:40917 "EHLO omzsmtpe02.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751213AbdFDINM (ORCPT ); Sun, 4 Jun 2017 04:13:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1496563992; x=1528099992; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=U6PeU6FB2gA2USq6uChQHLsZd5iTk8wVh8RLiQFW5Dk=; b=n9uGVeqeykyYLq7OPdxgrZRhRqGd/NANHIYeErMvJBNYlSkI0MBJ/eY7 S27aj+tF0t0BY/dWV9Sq89UZRFkpl3sL5OPW5qEcs6dzTszK6ck3O3Zqa uH9syEqjIpLFvQUKBsAKugEy3daaNvqq0Lexn4kqNARGXbB/O0ywjVuxh g=; X-IronPort-Anti-Spam-Filtered: false Received: from unknown (HELO fldsmtpi03.verizon.com) ([166.68.71.145]) by omzsmtpe02.verizonbusiness.com with ESMTP; 04 Jun 2017 08:13:00 +0000 From: "Levin, Alexander (Sasha Levin)" Cc: Ard Biesheuvel , Linus Torvalds , "Levin, Alexander (Sasha Levin)" X-IronPort-AV: E=Sophos;i="5.39,295,1493683200"; d="scan'208";a="364211578" Received: from nord.tdc.vzwcorp.com (HELO Nord.verizonwireless.com) ([10.254.88.187]) by fldsmtpi03.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Jun 2017 08:12:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1496563961; x=1528099961; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=U6PeU6FB2gA2USq6uChQHLsZd5iTk8wVh8RLiQFW5Dk=; b=ogZGBcB4V+39YcM/OYE/AyerryU1/NwRzgIT1dqK8t1+QsChsrXOeqYf Oduko25sevhLGAcpQBfhuH2FYAJzo+RY0rdzT2nJJ83j8T4KIiDgc7R49 l0pfemXN/Vp3BtEaSxJsVcDC6atrH4oIrEPmpxWkI1/WijGSRoI845fuF E=; Received: from gaalpexhub4.uswin.ad.vzwcorp.com ([10.191.138.113]) by Nord.verizonwireless.com with ESMTP/TLS/AES256-SHA; 04 Jun 2017 04:12:40 -0400 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by gaalpexhub4.uswin.ad.vzwcorp.com (10.191.138.113) with Microsoft SMTP Server (TLS) id 8.3.406.0; Sun, 4 Jun 2017 04:12:40 -0400 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Sun, 4 Jun 2017 03:12:38 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Sun, 4 Jun 2017 03:12:38 -0500 To: "stable@vger.kernel.org" Subject: [PATCH for v4.9 LTS 033/111] log2: make order_base_2() behave correctly on const input value zero Thread-Topic: [PATCH for v4.9 LTS 033/111] log2: make order_base_2() behave correctly on const input value zero Thread-Index: AQHS3QpCM7uDYJwyBE6gckDfYqKQkA== Date: Sun, 4 Jun 2017 08:12:08 +0000 Message-ID: <20170604081123.19462-33-alexander.levin@verizon.com> References: <20170604081123.19462-1-alexander.levin@verizon.com> In-Reply-To: <20170604081123.19462-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Ard Biesheuvel [ Upstream commit 29905b52fad0854351f57bab867647e4982285bf ] The function order_base_2() is defined (according to the comment block) as returning zero on input zero, but subsequently passes the input into roundup_pow_of_two(), which is explicitly undefined for input zero. This has gone unnoticed until now, but optimization passes in GCC 7 may produce constant folded function instances where a constant value of zero is passed into order_base_2(), resulting in link errors against the deliberately undefined '____ilog2_NaN'. So update order_base_2() to adhere to its own documented interface. [ See http://marc.info/?l=linux-kernel&m=147672952517795&w=2 and follow-up discussion for more background. The gcc "optimization pass" is really just broken, but now the GCC trunk problem seems to have escaped out of just specially built daily images, so we need to work around it in mainline. - Linus ] Signed-off-by: Ard Biesheuvel Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- include/linux/log2.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) -- 2.11.0 diff --git a/include/linux/log2.h b/include/linux/log2.h index f38fae23bdac..c373295f359f 100644 --- a/include/linux/log2.h +++ b/include/linux/log2.h @@ -194,6 +194,17 @@ unsigned long __rounddown_pow_of_two(unsigned long n) * ... and so on. */ -#define order_base_2(n) ilog2(roundup_pow_of_two(n)) +static inline __attribute_const__ +int __order_base_2(unsigned long n) +{ + return n > 1 ? ilog2(n - 1) + 1 : 0; +} +#define order_base_2(n) \ +( \ + __builtin_constant_p(n) ? ( \ + ((n) == 0 || (n) == 1) ? 0 : \ + ilog2((n) - 1) + 1) : \ + __order_base_2(n) \ +) #endif /* _LINUX_LOG2_H */