Message ID | 20240621113706.315500-15-iii@linux.ibm.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 93EF8C27C4F for <linux-mm@archiver.kernel.org>; Fri, 21 Jun 2024 11:37:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 091B28D0158; Fri, 21 Jun 2024 07:37:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F32AB8D00DB; Fri, 21 Jun 2024 07:37:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C26EE8D0158; Fri, 21 Jun 2024 07:37:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 8E1F78D00DB for <linux-mm@kvack.org>; Fri, 21 Jun 2024 07:37:34 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 0DC00C0CC6 for <linux-mm@kvack.org>; Fri, 21 Jun 2024 11:37:34 +0000 (UTC) X-FDA: 82254695628.18.367B58C Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf14.hostedemail.com (Postfix) with ESMTP id D39DE100009 for <linux-mm@kvack.org>; Fri, 21 Jun 2024 11:37:31 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=BBq8CXP7; spf=pass (imf14.hostedemail.com: domain of iii@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=iii@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1718969838; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=fhyNLk4BgDYNJAsfSc8ftWCxz9OlL/4RiKPE6HJFalY=; b=IwIvT4IDpec9SVSgmwA6V5QDGx6MWPlDkZ/73HHHlF+lx+RV9iyv+pIm8wzKyoyGKf7XCu cjFtuw5Bxi+Zn9rrEUDULmIQhEYzqPRHGCAIiipTKNcpY2U/1gTWmVePtEPgVxKNf4oNk3 m/JRhC3uV4YPwNdZD2IG9L9+Q5B5e5M= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=BBq8CXP7; spf=pass (imf14.hostedemail.com: domain of iii@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=iii@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1718969838; a=rsa-sha256; cv=none; b=Mhj5vmWljXoaSfrMFj9YnMEA8Lb41uwnLkXSn5BXI5P7a/IrP/pB7hcFrc5Y9Jr9rzGYtk sw7tfzK3CrnWKFFDqaP4Qvv4SCajTMcMh/NFBnHYlPFV0l7j1AWrNMqInDizs/sXRooxFD oMLn0SVsfnmWD76o6zpr/k28hVPmago= Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45L9amU5018280; Fri, 21 Jun 2024 11:37:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=pp1; bh=fhyNLk4BgDYNJ AsfSc8ftWCxz9OlL/4RiKPE6HJFalY=; b=BBq8CXP70n/1p4j3af3cxv3A6JPRa JJRtQlbazTXmP/tMWrjcHhzj1H+bVvaaCkGoRDKQTmyAK+NrUyrasVGJ5CSBtbpb XKhQ7od+lT9C8TAKA7jc6SNwCoubn/9M+UBFXmko+O75K4uIHStP8zh1rScSmtLL x6ZXQMIf8/0sJ3ubEX/krvY3PsOd2zB4ck5QSeCdUhQD2XRT/X0bfjzJK85aF5Pi SXhQ8ugZciIpkES5vm5YgK3QKkbm0E/z6W4k+QostUsAeaM8MofLApbgiJ4AZ6O8 NbTAlIInkAchYeQvkB1/0gbmJbjK3OlxoGIvvQg6ikiM2ymY3UgXtRKCQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yw5ksrguj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jun 2024 11:37:25 +0000 (GMT) Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 45LBbOj0011150; Fri, 21 Jun 2024 11:37:24 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yw5ksrgue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jun 2024 11:37:24 +0000 (GMT) Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 45L9FiFL019922; Fri, 21 Jun 2024 11:37:23 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3yvrqupvyw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jun 2024 11:37:23 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 45LBbHIG44433720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Jun 2024 11:37:19 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA9482004D; Fri, 21 Jun 2024 11:37:17 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 313892004E; Fri, 21 Jun 2024 11:37:17 +0000 (GMT) Received: from black.boeblingen.de.ibm.com (unknown [9.155.200.166]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 21 Jun 2024 11:37:17 +0000 (GMT) From: Ilya Leoshkevich <iii@linux.ibm.com> To: Alexander Gordeev <agordeev@linux.ibm.com>, Alexander Potapenko <glider@google.com>, Andrew Morton <akpm@linux-foundation.org>, Christoph Lameter <cl@linux.com>, David Rientjes <rientjes@google.com>, Heiko Carstens <hca@linux.ibm.com>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Marco Elver <elver@google.com>, Masami Hiramatsu <mhiramat@kernel.org>, Pekka Enberg <penberg@kernel.org>, Steven Rostedt <rostedt@goodmis.org>, Vasily Gorbik <gor@linux.ibm.com>, Vlastimil Babka <vbabka@suse.cz> Cc: Christian Borntraeger <borntraeger@linux.ibm.com>, Dmitry Vyukov <dvyukov@google.com>, Hyeonggon Yoo <42.hyeyoo@gmail.com>, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>, Roman Gushchin <roman.gushchin@linux.dev>, Sven Schnelle <svens@linux.ibm.com>, Ilya Leoshkevich <iii@linux.ibm.com> Subject: [PATCH v7 14/38] kmsan: Use ALIGN_DOWN() in kmsan_get_metadata() Date: Fri, 21 Jun 2024 13:34:58 +0200 Message-ID: <20240621113706.315500-15-iii@linux.ibm.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240621113706.315500-1-iii@linux.ibm.com> References: <20240621113706.315500-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: ZTHy7hzZX807u1u4MnUH3zt6Mpu1beHD X-Proofpoint-GUID: 6UW_Ok9wX5ovm0vK7_GLpJnRXxKeJn5E X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-21_04,2024-06-21_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 bulkscore=0 adultscore=0 mlxlogscore=999 priorityscore=1501 spamscore=0 clxscore=1015 mlxscore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2406140001 definitions=main-2406210084 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: D39DE100009 X-Stat-Signature: yxwi676sniu7weixezssn1gbei5tuhzj X-Rspam-User: X-HE-Tag: 1718969851-774964 X-HE-Meta: U2FsdGVkX19pzwIYJBt1aOzcotxF/zouqczUoWCOkpmm4bXsEveOjK5YkyXyCgws3XYoprZu2JT5d6NIei2zemJz/T6wXWI26Y9KTuht86uEx8z/zDaWGQGH+KzIHtoOQkEBWNSAb207y2Tp/52dRvQtZ7MZRRviV77dvADZpFp3nmlGTGCncU1IJMX1ni4QLv/dnjBit57kcXft8HkpwLwewx7Uc715bHDaS26ftZbVhwtZghVaGRFoU8PzYsaImLNok/xwJ7PhSI5frB7JJnecPcW/hX6DHoOxXTk0X7bXVt4qaU/n6ahqRYEE2n+l/L8MiVGSTjdLk4cUjT6FUnOcn2w+0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version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
kmsan: Enable on s390
|
expand
|
diff --git a/mm/kmsan/shadow.c b/mm/kmsan/shadow.c index 2d57408c78ae..9c58f081d84f 100644 --- a/mm/kmsan/shadow.c +++ b/mm/kmsan/shadow.c @@ -123,14 +123,12 @@ struct shadow_origin_ptr kmsan_get_shadow_origin_ptr(void *address, u64 size, */ void *kmsan_get_metadata(void *address, bool is_origin) { - u64 addr = (u64)address, pad, off; + u64 addr = (u64)address, off; struct page *page; void *ret; - if (is_origin && !IS_ALIGNED(addr, KMSAN_ORIGIN_SIZE)) { - pad = addr % KMSAN_ORIGIN_SIZE; - addr -= pad; - } + if (is_origin) + addr = ALIGN_DOWN(addr, KMSAN_ORIGIN_SIZE); address = (void *)addr; if (kmsan_internal_is_vmalloc_addr(address) || kmsan_internal_is_module_addr(address))