Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp568858ybg; Tue, 28 Jul 2020 13:03:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEH7NQovcw8aksUuk0L9F3DMPNMbW+dBQxL9pM2p4LqHFGynisquxqPbGXu8XZirhFoP0g X-Received: by 2002:a05:6402:b45:: with SMTP id bx5mr12066732edb.22.1595966592109; Tue, 28 Jul 2020 13:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595966592; cv=none; d=google.com; s=arc-20160816; b=AQSXQm6lvEGpuOelG7Cn1j+SgPFiAHCVeD4rMIkq3Vmk7piUMuCQVA/8E/f0c9mfyf tXURngNtb5k3NzXl3vZk291PtffUbufIEeRWnhseeC92Dp8b7O2gjxTivWGdN7ToLJoT +UWSYV6H3yaOfY/o4WPVl2cP3QGOVl3LPKJs7u2XXCG8YwjHpAAs97Vh8me6BSgbVI+0 QYM2CJdjJF0dhBxqpVtIsSnXicKQTcZpfIg1LXcS2Lh9ehdRFp8DK8Aa2CJqQ+QJPWKL BARk7EjyG4n8pWT94bzU4T/lrXzX0nx4Dwi1pmseVvvUjAhdM/PbqnQt97zgLdaWCRxv y71A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=b0bvL7mYBtpI0A92lPILKZVdGEqF4BRMR7WB6iJB6T0=; b=fjQEDdWrCpwhlmC6BnFnyjUh8NAhY7vhcFtf25pC0VW0I80xL4EsjfVvIqgVhC6ZXR F7vM80mbbGb3NFLmR4Vu3g3cIAO2OJqumEfuH0xurlwwrOIPvY/KZoYTSYDyLdKi88EV 6HvbZhWl4aI0ICmfRYup3ymo4VLd+OdJG+jP8f16BIfWpu/OoB3zfXV6UST6b9t/r8Jq eJCLGDSO454HQHwJSsc4UyV4lTlBOOpEnVkrnMbgqqxOK8DBk8GFpqOA1JMNQpVkxAmx 376bBcGYtgnQpHdl8HHjdC4DC+Ft3xsA8TVDQCn12rDBO6APNLUVuUuEWINwf2M3wArV YhWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="ci9/YpXY"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id co19si7766262edb.605.2020.07.28.13.02.49; Tue, 28 Jul 2020 13:03:12 -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=@chromium.org header.s=google header.b="ci9/YpXY"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729316AbgG1S0Z (ORCPT + 99 others); Tue, 28 Jul 2020 14:26:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728401AbgG1S0Z (ORCPT ); Tue, 28 Jul 2020 14:26:25 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CF25C061794 for ; Tue, 28 Jul 2020 11:26:25 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id d1so10351627plr.8 for ; Tue, 28 Jul 2020 11:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=b0bvL7mYBtpI0A92lPILKZVdGEqF4BRMR7WB6iJB6T0=; b=ci9/YpXYz2M3DpT6RjQz7XXrezR8ClecCbEqW0bFP3YJsWxu/QvZu0Mcv1CmWGg0lm QohjPfKLhiXOEeFTNEsAzvSGzOxfiXDP+Nv8Y2tcqkgrf6Q8IbUvI1MsCxjXC0iBc0EL eDupJZQyIACuL/Brt7lJ8P+oOrtOn96m94B6c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=b0bvL7mYBtpI0A92lPILKZVdGEqF4BRMR7WB6iJB6T0=; b=kc52DlYmTSjARa8pdDYZw26OwvPGMBMj7OSf3+JxaHwTwzADxUShq07uOVsC/oumNY MB/vCYzxGX59vI6E8B9hY2e/onodWLZOkZam4Qj0dm21A8XTE+jukwRlGhdy/wP/JtPM ukr+OT4wCvP4Zz7RuD7euIjgT/vTfH28F3iPCZiB0nAY/lg+lyHhanRfXdSXFshNzNtZ QijgxW3cUb8jLAtl6P1ubb4lZkB87s4wCj1bxgbvKTFQK2ADR5utoBV1iBJ1bQEO2FLi DK8DikpLk8tITmyNLG3JJrNegCjXaiX+rVuHafaSXa9F6hgTAI8/CI41fJSubboUzTnh lIfg== X-Gm-Message-State: AOAM5303Xd2NdEYPPgDExkG725B+fHGAP/eSo4oLfEJFPBNjjY9ix+GF qhmzADdWRNNBx2bgRhFfJiDRt2Jpps8= X-Received: by 2002:a17:90a:178e:: with SMTP id q14mr5570643pja.80.1595960784615; Tue, 28 Jul 2020 11:26:24 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y6sm2725195pfr.61.2020.07.28.11.26.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2020 11:26:23 -0700 (PDT) Date: Tue, 28 Jul 2020 11:26:22 -0700 From: Kees Cook To: Arvind Sankar Cc: x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/8] x86/kaslr: Make command line handling safer Message-ID: <202007281126.46C0C30C1@keescook> References: <20200727215047.3341098-1-nivedita@alum.mit.edu> <20200727230801.3468620-2-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200727230801.3468620-2-nivedita@alum.mit.edu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 27, 2020 at 07:07:54PM -0400, Arvind Sankar wrote: > Handle the possibility that the command line is NULL. > > Replace open-coded strlen with a function call. > > Signed-off-by: Arvind Sankar Reviewed-by: Kees Cook -- Kees Cook