From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932989AbcLHWaT (ORCPT ); Thu, 8 Dec 2016 17:30:19 -0500 Received: from mail-ua0-f178.google.com ([209.85.217.178]:33097 "EHLO mail-ua0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753207AbcLHWaP (ORCPT ); Thu, 8 Dec 2016 17:30:15 -0500 MIME-Version: 1.0 In-Reply-To: <20161208105602.GA11382@elgon.mountain> References: <20161208105602.GA11382@elgon.mountain> From: Andy Lutomirski Date: Thu, 8 Dec 2016 14:29:54 -0800 Message-ID: Subject: Re: [patch] x86/ldt: make a size variable unsigned To: Dan Carpenter Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , X86 ML , Dave Hansen , Andrew Morton , Andrey Ryabinin , Andy Lutomirski , "linux-kernel@vger.kernel.org" , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 8, 2016 at 2:56 AM, Dan Carpenter wrote: > My static checker complains that we put an upper bound on the "size" > variable but not a lower bound. The checker is not smart enough to know > the possible ranges of "old_mm->context.ldt->size" from > init_new_context_ldt() so it thinks maybe it could be negative. > > Let's make it unsigned to silence the warning and future proof the code > a bit. Acked-by: Andy Lutomirski