Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp389010rdb; Thu, 21 Dec 2023 12:05:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVoQFGo3kWBIysdWqLj4HxmjpY7sq3HY6pU2CyMjt97rGa4oikayR/LpGkbAK5F3XwVE34 X-Received: by 2002:a05:6808:13ca:b0:3bb:73b0:a462 with SMTP id d10-20020a05680813ca00b003bb73b0a462mr312787oiw.47.1703189155962; Thu, 21 Dec 2023 12:05:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703189155; cv=none; d=google.com; s=arc-20160816; b=Szzi9QUZAGKlW71Q3OBsSCtpgkiZsvKBJ4XjkpdoTOrrpAeYF97POurQbcA7QdrLuc tAJCuZBHo9OIJ3D3+TxdTcxBt3jDRFPQIYthWTMx0coW6orbZguNOweipzeRpDEABcLM BFepoQJpITkQjPO0hsT5vAK3B13BxmLpzRnGjlntCnzekIZqFxGHTOZhVLrHRbUM2qOF 10cn82XEc4zlQ04FXpRXMS9+5zjCj/WRKWSc6RpZw3V1uEH84qQE8K67loWa7Y5zizPz gQm83jFmAPJJNVDGYQz+6vhxE1YCHXuabgD9S+WwcqojfRt5Y+09yqWlugTEv0xxXaDV 55Fw== ARC-Message-Signature: i=1; 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=yJpT5npX9+Mi4/2vKIXBMX5Zb3QcQCwOWJP1qz8pE0M=; fh=GyTEpUCUNPwsl1pqA0jDPXgvja+iZTM9USlQd9sQtQg=; b=MO9bKWdwf2+U+2NyEyOpUDKIOdbwFluUUqTWPV2o9Jd4PIy5SnKFtNHl1haRMAp4kx XSfN59XttpNGVx9XUB9nwZr2tUS5AfcRGh2+b6ZjIrl8EZ4oYho+hpZYwJuwzg69u3ZG y5LJdDV1FycqZfoAmUYoVXTDq1FONPz432S2RhWE7nHJYfAnliquTwoDb9V3hnJio3bK Fhwoc4w3Ut3s7EPvtFJTPf4HAXPMgLilgA7TanyuNfF4cM6vPvTqqrMbwgQ4UWfRH1LH dfVtCqcH76RSpijxe00dCO4Y6zdlVsgECm6YJ3Xl9Ks/mfPG5txNCnVXQs5bH3Jbfz9E bWpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=D1d+7ZX8; spf=pass (google.com: domain of linux-kernel+bounces-9023-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9023-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v19-20020a67af13000000b00466955010a5si544921vsl.585.2023.12.21.12.05.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 12:05:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9023-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=D1d+7ZX8; spf=pass (google.com: domain of linux-kernel+bounces-9023-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9023-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AFD0B1C214DF for ; Thu, 21 Dec 2023 20:05:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29D2176DA6; Thu, 21 Dec 2023 20:05:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="D1d+7ZX8" X-Original-To: linux-kernel@vger.kernel.org Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D1D56EB77 for ; Thu, 21 Dec 2023 20:05:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1703189101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yJpT5npX9+Mi4/2vKIXBMX5Zb3QcQCwOWJP1qz8pE0M=; b=D1d+7ZX8K/5XJRivQkOs08EDlsgfMyw9smPDLE+z0+/A5XJO1xiUqRuZmE0KKjzXfCVjOl B9Re2Z/G6jvedBYwergcLq/h7gQe6/xiCIpFFxCDZnzStwThLFWfJDZzzYMVmxbBjsmc1F kpPC6wGFc7aq4172XBiDkq6JKDgFx/0= From: andrey.konovalov@linux.dev To: Marco Elver Cc: Andrey Konovalov , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH mm 05/11] kasan: update kasan_poison documentation comment Date: Thu, 21 Dec 2023 21:04:47 +0100 Message-Id: <992a302542059fc40d86ea560eac413ecb31b6a1.1703188911.git.andreyknvl@google.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Andrey Konovalov The comment for kasan_poison says that the size argument gets aligned by the function to KASAN_GRANULE_SIZE, which is wrong: the argument must be already aligned when it is passed to the function. Remove the invalid part of the comment. Signed-off-by: Andrey Konovalov --- mm/kasan/kasan.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h index 38af25b9c89c..1c34511090d7 100644 --- a/mm/kasan/kasan.h +++ b/mm/kasan/kasan.h @@ -513,8 +513,6 @@ static inline bool kasan_byte_accessible(const void *addr) * @size - range size, must be aligned to KASAN_GRANULE_SIZE * @value - value that's written to metadata for the range * @init - whether to initialize the memory range (only for hardware tag-based) - * - * The size gets aligned to KASAN_GRANULE_SIZE before marking the range. */ void kasan_poison(const void *addr, size_t size, u8 value, bool init); -- 2.25.1