Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp44827pxj; Wed, 12 May 2021 22:05:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEYhoJWLtZQj/K+OvwQ2ARYi4EjhkejtdgWmHnAzqkhcF2BJRWcn76h7dTvPKBATxShwvC X-Received: by 2002:a17:906:1e44:: with SMTP id i4mr40864546ejj.61.1620882321750; Wed, 12 May 2021 22:05:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620882321; cv=none; d=google.com; s=arc-20160816; b=QaYq1V/BWvu+Owv+eiOgiiOjfbEDkNWMrf1mAlQq3fKefFCSKB0P2vDPyDuo4rFOvA /1t6omrgmdZ6EY8EWSudoxX2MYn4/tGmUhUulnFzuafBJTgIUBFX4+vWUT4X58/4lbn6 F0w2H0w0J7g/164PLZtoseCJpm5UQG8BhBRMwDvvTUkgYwXap7AzeiYo3r6bmmsTfiiv fytIl5I6x26td0tgXVRpUlGMB1MsF663QEOjZZ0yFjPqTpwNHwk75gzFCbfsvV7tKmPS GALIlv7UrKKzt466EtGGBCmGdctYlpTIh8Ffm+RRlA/8AlR92nlnBtUhlyoaFmrMmXjG 83bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=uRMBUjl6/vrG2aHYjuG4PJqVirIhMBCEUqRi98xb0gc=; b=T6TozzY3A5I4/rXItJTfKuaoJ3lHv9Zx93p7IZunEFpy4pR36Rr5pEzFjAev6uTsZG rLQv3h0CVc+hk76TZr16XClzdRU9jhLAkzbG4b9EOz/QtWlKFBMT62ApbKBFsLrPfUdn 88P8CZ57b9woWuFsyxfMj2QytHroO+GQuX9OGwCCKA1xb8QAldr1CFNedYJkU4qZR6RE m/4K32z39ChfCRA3JVIinhdxzEz9A33ve8c5hbNdIXVyT5ewU2xZHeIm7V7ouVNqP76p 0w1KyUF+sYKnWAY1D5EGjQOL5EQ17wrmH47Ikofw3npImr+NWAbb3+IFhOYWn2FBlJ1Y uh8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=l78r0KUe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m21si2030522ejo.633.2021.05.12.22.04.58; Wed, 12 May 2021 22:05:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=l78r0KUe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231201AbhEMFE6 (ORCPT + 99 others); Thu, 13 May 2021 01:04:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230176AbhEMFE4 (ORCPT ); Thu, 13 May 2021 01:04:56 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC457C061574 for ; Wed, 12 May 2021 22:03:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=uRMBUjl6/vrG2aHYjuG4PJqVirIhMBCEUqRi98xb0gc=; b=l78r0KUeWt1tr9jKX/D61vZ/Gk qSyrYMkRliIKsWw22de7ZP/C3kzr0hHr7UW8mz7o8C48VsqQTGcDjwHxMVYth8/RcSF90KMmjXDQZ U3C/gVX411gQIZSPCxKcx4vwIVewDXgIO1xpkyaWXc9a35Hpgx3Y4GIJzLW+eFci3BHtoT5p2wfyw PDCipRjQT5ew4XZ3nVHm5JadQ0LhLPowIh86vqxsRB1M6DIRCWyBE6LSlQEeif0isJt/VJCpMxdMa t7mltUS1/mgBgqpKTRyFn2ViyQ8CKb4nbdjjZsPge9/sWFlRbWvRtJTdhuf2glH7HbZy2giYjEWsw 8wkso12g==; Received: from [2601:1c0:6280:3f0::7376] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lh3Vi-00B15p-Co; Thu, 13 May 2021 05:03:46 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Kees Cook , Andrew Morton Subject: [PATCH] thread_info.h: include limits.h for INT_MAX Date: Wed, 12 May 2021 22:03:44 -0700 Message-Id: <20210513050344.28303-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add header file to make thread_info.h be self-contained. Fixes multiple occurrences of this error: ../include/linux/thread_info.h: In function ‘check_copy_size’: ../include/linux/thread_info.h:215:27: error: ‘INT_MAX’ undeclared (first use in this function) if (WARN_ON_ONCE(bytes > INT_MAX)) ^ Fixes: 6d13de1489b6 ("uaccess: disallow > INT_MAX copy sizes") Signed-off-by: Randy Dunlap Cc: Kees Cook Cc: Andrew Morton --- include/linux/thread_info.h | 1 + 1 file changed, 1 insertion(+) --- mmotm-2021-0512-2146.orig/include/linux/thread_info.h +++ mmotm-2021-0512-2146/include/linux/thread_info.h @@ -10,6 +10,7 @@ #include #include +#include #include #include