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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1DCCC432C0 for ; Tue, 3 Dec 2019 13:07:40 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E3212068E for ; Tue, 3 Dec 2019 13:07:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="VBhQwAU2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E3212068E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47S2MX138nzDqKP for ; Wed, 4 Dec 2019 00:07:36 +1100 (AEDT) Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47S2J04VlyzDqTm for ; Wed, 4 Dec 2019 00:04:32 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="VBhQwAU2"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 47S2Hy2kcFz9sP6; Wed, 4 Dec 2019 00:04:30 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1575378271; bh=Nb1I9Pw4Szleb7pQzOoCNntR4NmjasZkWR6215KZoeI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=VBhQwAU2RS2Ewhqy2KlM6E10NtjSthPAasmSLU+RkJFX7//4mrqv74pUM4/ofqNQ3 ZC9ISHXUQHIFFbZQeN5i0fYnKIh+13l8bjQR3xLYJUJdSuoe+9yZvzWHwZCcdOoKdA //KzKkt1OJ/2PorwwFq8mq3p6cROt5yG1wKgrhynNsHYXTh9ZPbltfeCf+J7rnG+w9 0T3A+Na9X68SH2/KQYzKdPJqQbFNFKh9hy+05OL+7Vv14arO1NF0bECZ42dh378jzF VZ+2teRZoErfmscL+xbTCpPYutJP1cehQE158vObnpL1ON2Y6SVoXK7FUg9WRW42Wx TaerOje4++O5A== From: Michael Ellerman To: Marco Elver , Daniel Axtens Subject: Re: [PATCH v2 1/2] kasan: support instrumented bitops combined with generic bitops In-Reply-To: References: <20190820024941.12640-1-dja@axtens.net> <877e6vutiu.fsf@dja-thinkpad.axtens.net> <878sp57z44.fsf@dja-thinkpad.axtens.net> <87a78xgu8o.fsf@dja-thinkpad.axtens.net> <87y2wbf0xx.fsf@dja-thinkpad.axtens.net> Date: Wed, 04 Dec 2019 00:04:23 +1100 Message-ID: <87r21lef1k.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch , linux-s390@vger.kernel.org, the arch/x86 maintainers , linuxppc-dev@lists.ozlabs.org, kasan-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Marco Elver writes: > On Wed, 20 Nov 2019 at 08:42, Daniel Axtens wrote: >> >> > But the docs do seem to indicate that it's atomic (for whatever that >> > means for a single read operation?), so you are right, it should live in >> > instrumented-atomic.h. >> >> Actually, on further inspection, test_bit has lived in >> bitops/non-atomic.h since it was added in 4117b02132d1 ("[PATCH] bitops: >> generic __{,test_and_}{set,clear,change}_bit() and test_bit()") >> >> So to match that, the wrapper should live in instrumented-non-atomic.h >> too. >> >> If test_bit should move, that would need to be a different patch. But I >> don't really know if it makes too much sense to stress about a read >> operation, as opposed to a read/modify/write... > > That's fair enough. I suppose this can stay where it is because it's > not hurting anyone per-se, but the only bad thing about it is that > kernel-api documentation will present test_bit() in non-atomic > operations. I only just noticed this thread as I was about to send a pull request for these two commits. I think I agree that test_bit() shouldn't move (yet), but I dislike that the documentation ends up being confusing due to this patch. So I'm inclined to append or squash in the patch below, which removes the new headers from the documentation. The end result is the docs look more or less the same, just the ordering of some of the functions changes. But we don't end up with test_bit() under the "Non-atomic" header, and then also documented in Documentation/atomic_bitops.txt. Thoughts? cheers diff --git a/Documentation/core-api/kernel-api.rst b/Documentation/core-api/kernel-api.rst index 2caaeb55e8dd..4ac53a1363f6 100644 --- a/Documentation/core-api/kernel-api.rst +++ b/Documentation/core-api/kernel-api.rst @@ -57,21 +57,12 @@ The Linux kernel provides more basic utility functions. Bit Operations -------------- -Atomic Operations -~~~~~~~~~~~~~~~~~ - .. kernel-doc:: include/asm-generic/bitops/instrumented-atomic.h :internal: -Non-atomic Operations -~~~~~~~~~~~~~~~~~~~~~ - .. kernel-doc:: include/asm-generic/bitops/instrumented-non-atomic.h :internal: -Locking Operations -~~~~~~~~~~~~~~~~~~ - .. kernel-doc:: include/asm-generic/bitops/instrumented-lock.h :internal: