From patchwork Thu Dec 21 20:04:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 182435 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp659394dyi; Thu, 21 Dec 2023 12:06:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDTtxLVnGd1pIT0X/8B3qFK+ppzrXN2FlpsJrO5IbFWjHxN3ZSM53WrUuJ6HknKFI2ns63 X-Received: by 2002:a9d:73d1:0:b0:6da:56c1:18c2 with SMTP id m17-20020a9d73d1000000b006da56c118c2mr190115otk.51.1703189182230; Thu, 21 Dec 2023 12:06:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703189182; cv=none; d=google.com; s=arc-20160816; b=z6qXN7eVdsUxSKf4ZapjI87X/fRNdB/RIS2ZGsE7EiSosKdHKUodIHwUx/aO5Ljoa1 J8OOJUksTzlxHqqjI9HS0OzABUnoP2fV1edDQAEjq2liTQ4bYwp+eSNhg5Ywmf2u0gQL By7oNcrLNVodeTTBBhZkiRcNHVyhVDMlamXLimXZnjtP0ISHgAOIj0+2LrPOmGzK8nA0 GEPZO/4Zeo3y+IVRoUEFQ7LQ9Nqfg9smA2nrLQs2YzJ9qeZYkQY7SgSKejHZUeFCc5V1 C+WNJ9QFRNIuCRxeotENXCPunLT4ciKVwOriAbr1pUoSWVy3MBOdTvXHQ88NnzcOurVi 1Xmg== 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9023-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u22-20020a67cd16000000b0046681914a45si547456vsl.710.2023.12.21.12.06.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 12:06:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9023-ouuuleilei=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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9023-ouuuleilei=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 02B0A1C229F0 for ; Thu, 21 Dec 2023 20:06:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB7BA77642; Thu, 21 Dec 2023 20:05:07 +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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785923299952554460 X-GMAIL-MSGID: 1785923299952554460 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);