Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2994874lqz; Wed, 3 Apr 2024 15:01:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVcasDY+JmAFwMhfMOIqlOnEwyaFdEQJr9i8cvjwLIr2WuWp6C1izkv28/yQh4ZoJwj1JaclwbaS9e0Avh+wxZl0zNFTME2g/u8MW+OUA== X-Google-Smtp-Source: AGHT+IEOxPXuM75qSRqOhzxhzgE6KT3dNl8nQW6P05dOIWKdIN3+6PPkc+c2REdXvrLsRDAohxCh X-Received: by 2002:a05:6a20:9493:b0:1a7:294c:1a6b with SMTP id hs19-20020a056a20949300b001a7294c1a6bmr863191pzb.59.1712181667049; Wed, 03 Apr 2024 15:01:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712181667; cv=pass; d=google.com; s=arc-20160816; b=nCEJdRibWKa/Bbts/5qx47dHkhWUdVnE47DNPaNn9Jm2KgeUVgYmvEfj2TIHc/yJI9 /E56OPajg2OufIsQhby9E7x/0rBzCwhsXCCMFACRUJCkq7sLEbE0SNrJhNbDn14oHZnz HZqA/NYaz/dSa4EnRsKceNdR/7EgRDSxqMd2lvYIQmfQHxhJ9d8+5m596yQGJyfvyE5N Wd5fWHWcrCClMtGSNsraiTYqlCsa1fPpbSWLAmQ2oNNFVKfeWIxHpPLZQ8XhHsZjcy32 USZCrmeU2Mhriul4mSTJ+WsAiHamYFfB4TKYrLghsjfOgHFEbklXrKKO6+25+YCbXCC7 c3jA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=p9Rfo0GuMUhNW4rnyw2FKeITsblkzXdY57eMgq2brH0=; fh=2chJ272KgxvU5suJfHtYHlYYoboim6Vx/aer/yRx3bI=; b=l5EQCu9FYWLCBDlJahMzAH+ny3BZwCufPFmZc1+s/SccOltOTHMog+C4Ihe2aHBpzS n68vz6jdBioFhV0er6CRfleBfq/1fZdGsQtDWtofSnQYCY0VMxl0bHPyAux71NBpFvtD c4VZ76xYeihJAwETK46XiIWgFTAkD2pTOWoxiPJYLrFAzo9dGDjk2xqvhq840MKby/Fz 7Q/mOREoF0ZaTwLiCWPUZnq33t+GrDBUqaOXBSWrs6T+lxJNpPdnNO9tW0k86eO90vYx DNLCstCM6rPt20FtTinzf32mN/yPLyoIeccypfNJYHHfKlaBqUOqxfgmmzuSTTN1bnc8 /Frg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QAPAsgiX; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-130653-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130653-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id r19-20020a63d913000000b005be3683ec6asi13583065pgg.184.2024.04.03.15.01.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 15:01:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130653-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QAPAsgiX; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-130653-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130653-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5EC54B2553E for ; Wed, 3 Apr 2024 21:46:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 459D715687A; Wed, 3 Apr 2024 21:46:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="QAPAsgiX" Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11AF118AF9 for ; Wed, 3 Apr 2024 21:46:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712180763; cv=none; b=qF9bBikrjASUJYcOcG12CitNFeatqTSfxdwELZI9XyyH339dzIRwc2txw5Cf0tvjosbf9LAKmD1smcaLMR4i4pm5U+E5eToOSqQ5apMYOVga+t4stuWWmWB4j13UcVZvq/cZFrIi9khftCi/7cMKonXgKbDqDrNhnW6UXk41ahE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712180763; c=relaxed/simple; bh=k5u6LmE/KxCA46smReOIOiyt166x2BcM8K8CPNETK+8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=fPHVHdnUxQfd0tY1cLevGiNwHGTJVYEBKgJvaxcngBPoWiypnRW9R0TKV65vwyFP4FTkXGyfXHkdaCqQNAbtTiUrcRNsbyOa9bBVHNotHzIrkq9R66A7AvhpTYCo0Iea24MiaxWz760bp/1JqomBkzxR4SOBCrmUQZlczWYPcvI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=QAPAsgiX; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1e244c7cbf8so2757315ad.0 for ; Wed, 03 Apr 2024 14:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712180761; x=1712785561; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=p9Rfo0GuMUhNW4rnyw2FKeITsblkzXdY57eMgq2brH0=; b=QAPAsgiX0KETh+O1kEmxkOY5DlsMqwkPeGtzG0Vc7d46d42QpioPWdSp8hZDrz6ghp LW0ErAJ6/eKAKMgyJ3JAwVNaaJ+UmpmCnaW7iVE81Wj1oYYKKqER26VYt6678JyFqZcv ii0mjJ1Ppw77bhD2nJli8kkhOIeTeaz+8HOkk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712180761; x=1712785561; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p9Rfo0GuMUhNW4rnyw2FKeITsblkzXdY57eMgq2brH0=; b=BQs4Zk/tOZHLTeA+J6K8ze8Odr0vggBLDnFuatzvqrfHsv75qC+6JJVtVapRN20r65 aq3pO6geeU0S58+AEBffjsdioWoqFLrVxi1WAlQztugKDe51gm7eGQ4kj0quyjlmNQFC ZU6nEIQ/hj34shwNMN9iRBVoaFVFOeQQ4WVBz+l2SMHKuj6CiUB/2M5f/AnwJ2on8Emm MzJo1A9YCyHolVW4XChUcKiKajiDJiNaeLrW3lr75v/xeNeLpx5FZJeupw5PVN7KPRPM FCuvjqUbsd6+h5E3ZmwQvbQNWX/b338E2YMDNOBzJvwUg5uDYPl8NOsEFWKOCBGt4tal UsVQ== X-Forwarded-Encrypted: i=1; AJvYcCXc1ejMNasdkeik85laz/2sYr/OaGY8aBpzmdHZ94AfN8Yju2juyX/clE8HzMZmVPDWg5L95pCoKMhzutocNqNgw+dzWs5xbLHrpYvq X-Gm-Message-State: AOJu0YwcIwXw/O7gvaw1gOKFrneSAfIKJ+YnqN6r584wZnh/K0bNRwQp oaJriBPN4fhpMrtaIgZlmhDho8UOEreeme02n8kECo1eIosedUxZwQBkxeOPNY7JdQL5j11EOcE = X-Received: by 2002:a17:902:e885:b0:1e0:c824:2510 with SMTP id w5-20020a170902e88500b001e0c8242510mr663550plg.14.1712180761442; Wed, 03 Apr 2024 14:46:01 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id d9-20020a170902b70900b001db37fd26bcsm13828562pls.116.2024.04.03.14.46.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 14:46:00 -0700 (PDT) From: Kees Cook To: Jeremy Linton , Kees Cook Cc: Arnd Bergmann , "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org, Elena Reshetova , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH] randomize_kstack: Improve entropy diffusion Date: Wed, 3 Apr 2024 14:45:45 -0700 Message-Id: <171218074192.1346108.13742168050970266873.b4-ty@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240309202445.work.165-kees@kernel.org> References: <20240309202445.work.165-kees@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Sat, 09 Mar 2024 12:24:48 -0800, Kees Cook wrote: > The kstack_offset variable was really only ever using the low bits for > kernel stack offset entropy. Add a ror32() to increase bit diffusion. > > Applied to for-next/hardening: [1/1] randomize_kstack: Improve entropy diffusion https://git.kernel.org/kees/c/9c573cd31343 -- Kees Cook