Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp369931ybl; Fri, 9 Aug 2019 07:15:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEIA+OkjuIxYJxEX+DDRPRajFBbOxMPgtIoV909ww0kfSRK+VL8/GANf4gOFiq4cOFv+D8 X-Received: by 2002:a17:902:e4:: with SMTP id a91mr19183021pla.150.1565360111221; Fri, 09 Aug 2019 07:15:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565360111; cv=none; d=google.com; s=arc-20160816; b=lc8/Bxa6KdIRryWkcbUKQZn3RyyWBl2hF3uLocI4R9MU9KkdA30QZGeGklla885d2m +kSevYlaFvCplHGnFU8a94LE+8D+d2L9cUMzF+2zRKBvajVu9IlFq0bucTTDqmxaCELQ i0jbjuCMP/bfwBA+qrFEQ3w3LrE6tSoDZDLL1XAeVhE6MZU94qByidmRXbjGdUhXlL7R axcrTT7hckQ/igxJY8KoRbZnJU8UOMIzvqP3W3BblBySnvavDun6VX5DfKKdzKzQ3Sqx PBuCggrKkO0z+vEoQkKf3exC3J75PoxsYErhX6GFNyHNmU8D+97ANXOambfptfVI1jOZ IrJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=c+3bCqxJo39DpqIWFRjrtINk477xyXEJPFLQQV7GifQ=; b=rXTQGEUoiZOmxlUmO9jfY8riY15FKCwz9s8JZHoRXptgHqlCXB3Gr9HDZWMp33d/L1 hka9DBCFeGfrB9bJ6CsQYrqNHOYzxXnhDteY5qNlHNXL6h+qCE/7ylYxqEp5h+if6tei /pjrRNbl9FbkTfZBtPM/dF2kSf+V1n07Q5b82PrIh/NYp3FGUbCX1N6K3JrS1whQ1EVd eH1LBE1srqcLOOWy6Xl3QWRTK2baRCN6iJDvJoZIc3WWy/ZmxKpZ2PUgnq4tv//gcZpN hzI+et0oT0O3GeiNbOJuILxwEQEgbljgkP/c17uDUGqUgGC+LREsXZWHzLrbg/0/FToN JTeg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x22si51459700pln.150.2019.08.09.07.14.55; Fri, 09 Aug 2019 07:15:11 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406646AbfHIOMH (ORCPT + 99 others); Fri, 9 Aug 2019 10:12:07 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:60215 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726157AbfHIOMH (ORCPT ); Fri, 9 Aug 2019 10:12:07 -0400 X-UUID: 725620696fd34fab965989687eb53529-20190809 X-UUID: 725620696fd34fab965989687eb53529-20190809 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0707 with TLS) with ESMTP id 735304464; Fri, 09 Aug 2019 22:11:58 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 9 Aug 2019 22:11:58 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Fri, 9 Aug 2019 22:11:58 +0800 Message-ID: <1565359918.12824.20.camel@mtkswgap22> Subject: Re: [RFC PATCH v2] mm: slub: print kernel addresses in slub debug messages From: Miles Chen To: Matthew Wilcox CC: Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , , , , , "Tobin C . Harding" , Kees Cook Date: Fri, 9 Aug 2019 22:11:58 +0800 In-Reply-To: <20190809024644.GL5482@bombadil.infradead.org> References: <20190809010837.24166-1-miles.chen@mediatek.com> <20190809024644.GL5482@bombadil.infradead.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-08-08 at 19:46 -0700, Matthew Wilcox wrote: > On Fri, Aug 09, 2019 at 09:08:37AM +0800, miles.chen@mediatek.com wrote: > > Possible approaches are: > > 1. stop printing kernel addresses > > 2. print with %pK, > > 3. print with %px. > > No. The point of obscuring kernel addresses is that if the attacker manages to find a way to get the kernel to spit out some debug messages that we shouldn't > leak all this extra information. got it. > > > 4. do nothing > > 5. Find something more useful to print. agree > > > INFO: Slab 0x(____ptrval____) objects=25 used=10 fp=0x(____ptrval____) > > ... you don't have any randomness on your platform? We have randomized base on our platforms. > But if you have randomness, at least some of these "pointers" are valuable > because you can compare them against "pointers" printed by other parts > of the kernel. Understood. Keep current %p, do not leak kernel addresses. I'll collect more cases and see if we really need some extra information. (maybe the @offset in current message is enough) thanks for your comments!