Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2290419ybl; Thu, 19 Dec 2019 11:05:13 -0800 (PST) X-Google-Smtp-Source: APXvYqyoAqabC013/M4oYInXa02iW9f9gK+F91WJWGDA1Hg3rQY5mgRAzbrZ36xbE7Mw5pfK6QRO X-Received: by 2002:a05:6830:18f1:: with SMTP id d17mr5251191otf.298.1576782313832; Thu, 19 Dec 2019 11:05:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576782313; cv=none; d=google.com; s=arc-20160816; b=yPE0Ws0cIaksg/TwauSWZYfs7rKfJJfL68DQD2bLIUUWSMgLXJnpb5CdNF/H1fQf6b OkWyH/F1ruxX25WRD/07nuDK3GFlUoPauA8qh3a73lZW912gpfZqURj1gPkK000fXexS OC6Mb+oa+yd8onIefBZ9LiVlmF82Eo9kFIv/DIJv893FtCNtcvzHV9hoEdh7EHoKE3BJ l6sWkf6aDZsXroZ90anIYwxwAQKTLrnqv3f4Q+vvLMbAJ9RRKwRSqFSNiuOEr5TIgN0Q Ckpe+n4k8m0VKXm9MO9fZSJNceM7AZ13+ZgN/XS8rWkrpHoPtwoO3t3VKKtlJHZSKF8+ YcRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=QvAStn8TBlGPLBczTd25Iv1mJFk80FYATk+vMJdp0y4=; b=w2vRrV7nUkJQJpdV6ybrisxuLkA6l3TY8n5g0x7L9TBHRIxOHkbrlwT9wP+znsurtM Ysy58xUANFD/V8LBWcBtdwZAZE8jnhdgsKT3u2XYhK9dGQ4uXeORgVWx/cvD2AYeR3vR JrGBe3bvKhpVT4UchQDWekNoiPSN3m3yhZ7JkFeKeallKemwH25iKPhv9yUfI5sy9c7W j3AxxBzPMmIsmgzAyL8m+gXN29V4op80Fu1/GYcbOebILQL2g04gt1uD/IfmqIFSgc3a GCrIMofPfq4UBTazxKQ2ByChHD3pyCw/CaUZ5dxNOcLDqJWOWzoDT4ZAjzcthwRsA5P0 8ZDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CzwiUU2Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1si3910826otq.21.2019.12.19.11.05.00; Thu, 19 Dec 2019 11:05:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@google.com header.s=20161025 header.b=CzwiUU2Z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728832AbfLSTC3 (ORCPT + 99 others); Thu, 19 Dec 2019 14:02:29 -0500 Received: from mail-qk1-f202.google.com ([209.85.222.202]:43012 "EHLO mail-qk1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729793AbfLSSt3 (ORCPT ); Thu, 19 Dec 2019 13:49:29 -0500 Received: by mail-qk1-f202.google.com with SMTP id f22so1196549qka.10 for ; Thu, 19 Dec 2019 10:49:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=QvAStn8TBlGPLBczTd25Iv1mJFk80FYATk+vMJdp0y4=; b=CzwiUU2ZMCKcLRSu8XQzid0mJM78vsAjP8tuqj0HQuCCmaASulyFwyNDJlWGoosroj 1fO4Wsaycbb3TicTzXWqFtSTqPoPoQOm26MamsOm4rg+esbFEOwyWlE6IV14U8O5Wg10 PQyGxDvrxQ1EbcJD21HPrL6wSCYqbpnFGOIv0SBuo2QZgvuD4KpgNKTdgUZ3SnQ8Wd8r /gRd8R7oRg1ZmgfxBWtzuhIJJmWzYKEha1r6aJeZho6rnSfDBRoDGH/WzXFSalQ0XCho mHFn2l3155HhsgpwCqyyxeSM852qC9D3IOYqQO9YE8ob5K78vAlpDct/eM67LDYDBjRu pjCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=QvAStn8TBlGPLBczTd25Iv1mJFk80FYATk+vMJdp0y4=; b=Zb2bytNiC1WY4w8HHLQQQu60gpfxWaNVww9/vXrXdDOGok0U+ShwQePZo+HZJs8Vif utP64Mcl6ygCpMA3mXGW9IgriknPOWTDCUJ5p8chelV7PhS+K4kLkGK/kG0xQ7nEfbyu uCr4tMlSLnFVohDJgQaN2IYa8wa3BdDd04wCiN+RHOj/tq0N9QF+1NFGaKY85FS9jdXy +rD5Bcl70n2W80FQY/gCbNnLa2xMqLnV7NGv5WwLTDeksjJ2GSU42N+/28HiaK8XKJVQ sEUE5ZpPNMhgxcOQDDxKX3U1RlZ7meA9cIMygWwEHxfqLW/Ax1AU8c2f3KxzCk16uVyd oIQA== X-Gm-Message-State: APjAAAVmecLkhqyNVuXPgRS14uQLNvzJ/0U/WUQmiY6Tb7eY8on0vXHl hQ52i5r/DfVXvKHd2KNPkn6TbnzFU4+x+Nr2Zz8= X-Received: by 2002:ae9:e304:: with SMTP id v4mr9534945qkf.399.1576781368073; Thu, 19 Dec 2019 10:49:28 -0800 (PST) Date: Thu, 19 Dec 2019 10:49:24 -0800 In-Reply-To: <20190808123942.19592-1-dsterba@suse.com> Message-Id: <20191219184924.105306-1-ndesaulniers@google.com> Mime-Version: 1.0 References: <20190808123942.19592-1-dsterba@suse.com> X-Mailer: git-send-email 2.24.1.735.g03f4e72817-goog Subject: Re: [PATCH RESEND] fs: use UB-safe check for signed addition overflow in remap_verify_area From: Nick Desaulniers To: dsterba@suse.com Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk, natechancellor@gmail.com, clang-built-linux@googlegroups.com, Nick Desaulniers Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yeah, looks like this kills two birds with one stone; both observed signed integer overflow and -Wmisleading-indentation. Reviewed-by: Nick Desaulniers