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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 51FB1C19F4E for ; Thu, 25 Apr 2024 17:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4Bg07PtVobx/UQBd81KMTJCkTLm7WbMCjb7uqaEVTNo=; b=EmfBx8+ebWkw15 2ZFnsdV+2Kh4SDcbYxetQveBPzUglf6AMV8ElFrDTJC2j5O2R73GoDef4otUmcmiiI0DYAAAGzhoD sX7FWZSD/GdYnnXP2fC6Aw07kva0o6+/3nMrlhc5TjDpAHMHIa4xIVegseBaB4uGQR71mDmEDRRjf x+6iVrl/ATqT77JkchEfx5jgdTF+lGJEQ3X9kkVywDPlw63/pLxA+QsLj0Qmaij+fCy6VfvaCE8OV 9EcQuRXpiy0TArtvOJcPuzH1DkIVPq8atHHAMS5HDCl1qWWJ6fnZIizFfjuZXTVA2wALwjW/etDq7 ZAR7ONzsZl0kES5pMSNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s02kr-00000009Z93-0ydf; Thu, 25 Apr 2024 17:19:29 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s02kp-00000009Z8A-0ZNR for linux-arm-kernel@lists.infradead.org; Thu, 25 Apr 2024 17:19:28 +0000 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6f28bb6d747so1164081b3a.3 for ; Thu, 25 Apr 2024 10:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714065565; x=1714670365; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=aEArpaPdCkeLMM8e+oCYdabZOyUvDXBNvCNCU3D6sx8=; b=kjcl2zF2VuBoj/E2TC/UGkKwW8QScab1okidk/F+LE+7WWHeVa+4Ojb/knrpTQcUIV BHdRROIc0Ey1gYmPxXs88NBJVZDQcXIjyaoLnzmi2aqbFcVB+RwP/7zk6SIvFIpKK5cs GRkqxfbsWI6lyIYJeQ2yV24PjMmz5U1oHEBXE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714065565; x=1714670365; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aEArpaPdCkeLMM8e+oCYdabZOyUvDXBNvCNCU3D6sx8=; b=beMQZ1N7eahxXsrOr1kf9Azflm0q/rnlJrdM1edE44Tq6Wp+e121f2wqw3OfFG6s4r kmF90/QlSOmk6XQbhvfYrLen1wHpzvWXA63825hgvIEVMkpXY2DOBzcQzE31dirp0+HT r1evm6xiVWxn78vW95woZykv5ho4lcn5Gize0BMSJ0AqPEah+AAbLguya1tJP7qKSDR2 F560LFt7qrtq9tD0hyarcLEmFoV23gmZcCUHpMvrzyQZvDzVoRAvX7EpRAv7gvBFve/E ZBfQBie3tTrEh4ICTjX1m6MnoDtS78ibS3VFqHheMONNg2q0iFxLkTLaj4y4tvLGm1Tr GibQ== X-Forwarded-Encrypted: i=1; AJvYcCVG1IdiUd2T5RU5IEXgPOQz/IqCP4O5WnizvIPUSXOo1YUfMg60rMX7WZsmLpmN+06A4xB+qIXVgGtDh+fsX++TD7MHmDIskVWHnOAMJsTsXY3xRv4= X-Gm-Message-State: AOJu0YyFz5uDfvgsbLjx7L0WSToEO273KRpIFR/h9pT818SBSd6hmbOC cEyg5zreMw2cL12xYHO1VYe5merVUqiILhUKaQ/LU3qaW5Ym9HxMHR9lwY080w== X-Google-Smtp-Source: AGHT+IGSQtc03FJYmN67TcOlJEb4jjwUjOrO3E0QvJYydq58tzeFvCMVkx0opll0cr92togJ9vRyLg== X-Received: by 2002:a05:6a00:1941:b0:6ea:f05d:d2e9 with SMTP id s1-20020a056a00194100b006eaf05dd2e9mr507849pfk.15.1714065565180; Thu, 25 Apr 2024 10:19:25 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id n56-20020a056a000d7800b006e6b7124b33sm13379389pfv.209.2024.04.25.10.19.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 10:19:24 -0700 (PDT) Date: Thu, 25 Apr 2024 10:19:24 -0700 From: Kees Cook To: Mark Rutland Cc: Peter Zijlstra , Will Deacon , Boqun Feng , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Jakub Kicinski , Catalin Marinas , Arnd Bergmann , Andrew Morton , "David S. Miller" , David Ahern , Eric Dumazet , Paolo Abeni , "Paul E. McKenney" , Uros Bizjak , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, netdev@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH 1/4] locking/atomic/x86: Silence intentional wrapping addition Message-ID: <202404251018.C12E9F23@keescook> References: <20240424191225.work.780-kees@kernel.org> <20240424191740.3088894-1-keescook@chromium.org> <20240424224141.GX40213@noisy.programming.kicks-ass.net> <202404241542.6AFC3042C1@keescook> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240425_101927_183887_BAEDB6EB X-CRM114-Status: GOOD ( 15.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Apr 25, 2024 at 11:15:17AM +0100, Mark Rutland wrote: > To be clear, I dislike the function annotation because then it applies to > *everything* within the function, which is overly broad and the intent becomes > unclear. That makes it painful to refactor the code (since e.g. if we want to > add another operation to the function which *should not* wrap, that gets > silenced too). Yeah, I find that a convincing argument for larger functions, but it seemed to me that for these 1-line implementations it was okay. But regardless, yup, no function-level annotation here. > I'm happy with something that applies to specific types/variables or specific > operations (which is what these patches do). Thanks! -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel