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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE2A6C433FE for ; Thu, 10 Nov 2022 16:20:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 13C196B0071; Thu, 10 Nov 2022 11:20:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0ECFE6B0072; Thu, 10 Nov 2022 11:20:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F1E0E6B0074; Thu, 10 Nov 2022 11:20:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id E50DA6B0071 for ; Thu, 10 Nov 2022 11:20:18 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B0C721605C8 for ; Thu, 10 Nov 2022 16:20:18 +0000 (UTC) X-FDA: 80118044916.30.EB9919D Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP id 4502280007 for ; Thu, 10 Nov 2022 16:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=x+QCdRZ/JfoXhX+rWKt8rf0Poetyt6zzg0FgqSCk/4E=; b=rW1N/RwPBsMIKgFZJxtvG9cGpW 3LC2lY5EWKeVQIrq03W5q23NQDuNi4ggOO9Bi9h15RwmePBdhWG1BqMTNa2rdt0jGuEwWCEq//MsS CQzT9T6xaaqpfVmQuInWqWSIpgKctL+tfaPqX+lFNqhkWLIlhc3wdSaRFYM92GKsKgcZmKo/0ATo3 2qCb2HDLQT4+Fm2Ir5Esv22W8jqx7LWlcx1QB2RN/97vA6is3BaTCcbu6SvHBcypZiFyHmdSW+Dtr UanCdz7ie7xULs8Khg1NzQr4mvun+wd654tBXHbFJKdwIEN/jxJRz0f9KgNGy8iAGZe8CfZnviZ5p rpSiw04A==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1otAHc-00CCgi-Q0; Thu, 10 Nov 2022 16:20:04 +0000 Date: Thu, 10 Nov 2022 16:20:04 +0000 From: Matthew Wilcox To: Vlastimil Babka Cc: Theodore Ts'o , Aaro Koskinen , Linus Torvalds , Paul Cercueil , 42.hyeyoo@gmail.com, akpm@linux-foundation.org, catalin.marinas@arm.com, cl@linux.com, iamjoonsoo.kim@lge.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, penberg@kernel.org, rientjes@google.com, rkovhaev@gmail.com, roman.gushchin@linux.dev, Feng Tang Subject: Re: Deprecating and removing SLOB Message-ID: References: <20221109234832.GE307514@darkstar.musicnaut.iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668097217; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=x+QCdRZ/JfoXhX+rWKt8rf0Poetyt6zzg0FgqSCk/4E=; b=WWBuqObLHHLy9sgsB0ZGT8bsf9V3tarYbMWGM0DVOVyrpuSmCd3F5AnuLaXq5pAir65+r8 g37otL2Hmur7YF6iWbZPEhTejQoThgawxIVZhduGGUkAC1n2gBR+EbBsw7Evyd385t5uGl NoW3vX9Gf6VghyFQlAfdxFa5XmmvRYY= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="rW1N/RwP"; spf=none (imf30.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668097217; a=rsa-sha256; cv=none; b=iSTWVOeQg3UkwkClYSVE5vfXSdr9QbaaJd+W2/CnG3W7/NLVBWN8d6T/qIQ4NtvlswYgsO kBCdMa1QT7jLil64uht8J+x32eElB+D8OV6ZQrDIYwQLweDzgADfrGb7BVQZLx4hDjEnur zClYPfKAyf29xqzCUI6QbWWN84oAaFI= X-Rspamd-Queue-Id: 4502280007 X-Rspam-User: X-Rspamd-Server: rspam08 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="rW1N/RwP"; spf=none (imf30.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Stat-Signature: jdqxdaitcrmejdffwdfrjjnwjmjkbzba X-HE-Tag: 1668097216-544177 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: On Thu, Nov 10, 2022 at 08:31:31AM +0100, Vlastimil Babka wrote: > > octeon-hcd will crash the kernel when SLOB is used. This usually happens > > after the 18-byte control transfer when a device descriptor is read. > > The DMA engine is always transfering full 32-bit words and if the > > transfer is shorter, some random garbage appears after the buffer. > > The problem is not visible with SLUB since it rounds up the allocations > > to word boundary, and the extra bytes will go undetected. > > Ah, actually it wouldn't *now* as SLUB would make the allocation fall into > kmalloc-32 cache and only add redzone beyond 32 bytes. But with upcoming > changes by Feng Tang, this should work. This is kind of "if a bug stings a tree in a forest, does it hurt" problem. If all allocations of 18 bytes are rounded up to 20 or more bytes, then it doesn't matter that the device has this bug. Sure, it may end up hurting in the future if we decide to create 18-byte slab caches, but it's not actually going to affect anything today (and we seem to be moving towards less precision in order to get more performance)