From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76E7EC433E0 for ; Thu, 25 Jun 2020 21:56:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2FBDE20768 for ; Thu, 25 Jun 2020 21:56:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ijpRbZi5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FBDE20768 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 324666B0005; Thu, 25 Jun 2020 17:56:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 25C776B0006; Thu, 25 Jun 2020 17:56:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 129256B0007; Thu, 25 Jun 2020 17:56:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0199.hostedemail.com [216.40.44.199]) by kanga.kvack.org (Postfix) with ESMTP id DDE5F6B0005 for ; Thu, 25 Jun 2020 17:56:00 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9AC041EF1 for ; Thu, 25 Jun 2020 21:56:00 +0000 (UTC) X-FDA: 76969092480.07.ink51_4b0e33926e50 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 740D11803FD61 for ; Thu, 25 Jun 2020 21:56:00 +0000 (UTC) X-HE-Tag: ink51_4b0e33926e50 X-Filterd-Recvd-Size: 3702 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Thu, 25 Jun 2020 21:55:59 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id u8so3731100pje.4 for ; Thu, 25 Jun 2020 14:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0m/FjnJjhgS6jJ3qtD918zPfVsmhOjKw+gYA5VHiyF8=; b=ijpRbZi5KWXy1QJfiK+kH/xmCCdXzkyMtiBcMDE8+0t2IRtgthrC21C5qS4cttL01A 3i3MliAcoduo97dXTSQx5vWXZNi1PhQSuiBkD60JAuRJKcwo7gEy/CA5qzWuyzfgF8zs F4tyjhy6HZ2ru1OcRfl7lifzHGEtksolhc5EA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0m/FjnJjhgS6jJ3qtD918zPfVsmhOjKw+gYA5VHiyF8=; b=d66hqJJAgHbN+uCLfyaunNYlV0hVStLzK/CbP3LlNSI7vtiNrsNpT3fs76PyIzIUp5 uYZq1tyYmVtIYuTlKwmQ0j5grd/BHkRpGjkby2FW/SqsT/YL/avswOCpuXWsJTDIqfts DJjOwYfItE/JIZKJF2GhIlb8DgOAYPBt4O5LoLqtk1FqsVassvZmvZCGsdwdiO/jZcf/ 2KeYeSwUYf+MdH++czG9hyu8roTGskx3G/2Yscx/fThDp1VpuV1HPvHtj85F4XkBs+fn obGQF+/MTEB4ET9s8z3JPevkIWf9RNKg5L7iFfLI/YEIQ1lHjfXspsTUJT1QUDOcxB03 B9dA== X-Gm-Message-State: AOAM533ZobcQbga7GhfsBGrI2uv7Rr8FrmoDn84NKOYzGTjtt8qgOB1G F1YawlFJvucU0Ny+Bp0Ivt4g0w== X-Google-Smtp-Source: ABdhPJxi/2Ma6HSILRYA7Y1E/CT0c1EJHDOltwfRrPCpupY/Zo7Fl065ULNhVeZT5wFT7tzA2VCQvA== X-Received: by 2002:a17:90a:898a:: with SMTP id v10mr32887pjn.95.1593122159009; Thu, 25 Jun 2020 14:55:59 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id m136sm9584245pfd.218.2020.06.25.14.55.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2020 14:55:56 -0700 (PDT) From: Kees Cook To: akpm@linux-foundation.org Cc: Kees Cook , Vlastimil Babka , Roman Gushchin , Christoph Lameter , Alexander Popov , Pekka Enberg , David Rientjes , Joonsoo Kim , vinmenon@codeaurora.org, Matthew Garrett , Jann Horn , Vijayanand Jitta , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/2] mm: Expand CONFIG_SLAB_FREELIST_HARDENED to include SLAB Date: Thu, 25 Jun 2020 14:55:46 -0700 Message-Id: <20200625215548.389774-1-keescook@chromium.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Rspamd-Queue-Id: 740D11803FD61 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, In reviewing Vlastimil Babka's latest slub debug series, I realized[1] that several checks under CONFIG_SLAB_FREELIST_HARDENED weren't being applied to SLAB. Fix this by expanding the Kconfig coverage, and adding a simple double-free test for SLAB. v2: - rebase to -mmots - drop SLOB support (willy) v1: https://lore.kernel.org/lkml/20200617195349.3471794-1-keescook@chromi= um.org/ Thanks! -Kees [1] https://lore.kernel.org/lkml/202006171039.FBDF2D7F4A@keescook/ Kees Cook (2): mm: Expand CONFIG_SLAB_FREELIST_HARDENED to include SLAB slab: Add naive detection of double free init/Kconfig | 9 +++++---- mm/slab.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 6 deletions(-) --=20 2.25.1