From patchwork Tue Nov 26 17:21:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 13886256 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9D4AD65532 for ; Tue, 26 Nov 2024 17:23:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4820F6B0092; Tue, 26 Nov 2024 12:23:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 40A896B008C; Tue, 26 Nov 2024 12:23:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 283176B0092; Tue, 26 Nov 2024 12:23:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 053746B0088 for ; Tue, 26 Nov 2024 12:23:58 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 3FD03AE6F3 for ; Tue, 26 Nov 2024 17:23:58 +0000 (UTC) X-FDA: 82828918746.08.84739AE Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by imf03.hostedemail.com (Postfix) with ESMTP id 25D432000F for ; Tue, 26 Nov 2024 17:23:53 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=YC40IouI; spf=pass (imf03.hostedemail.com: domain of ubizjak@gmail.com designates 209.85.167.44 as permitted sender) smtp.mailfrom=ubizjak@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732641831; 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=n5NofcZHiN/mPTufbVMAYbTQYvMqATiuy7cs+7+mqOw=; b=FfUh779c9bF71xhpoRHFzpCFpwWxNH/zNRwovMXso/EBWqA1dWJ7hhv8N6ywBSIoS+7ZWC BlnYqH7s91wi7T9QIU1mCFtV2thR6LRtc1QbBMj5nBQ0AHn1Q2vUH/PmBAfIxpNSis6ymk 83JgKa3NiU7NqYzcjBv3GbQwehOBLtg= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=YC40IouI; spf=pass (imf03.hostedemail.com: domain of ubizjak@gmail.com designates 209.85.167.44 as permitted sender) smtp.mailfrom=ubizjak@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732641831; a=rsa-sha256; cv=none; b=ifPkSZbr7ZwjjwT0QRi6J2+KjAoEAp4AbsTCX0Md39qpxGwvjtggzZ2ocTbQiUAhd4Y3fL LaJFTNczUKRRGmplGnIeuXEnvTkAAKgyRP3wAkm0HS70tppOXZpcyuws4PkcnyQQcXtF2B uHg5GwdY5F2y6gdzF7wZlISmEHruyC8= Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-53de79c2be4so2146075e87.2 for ; Tue, 26 Nov 2024 09:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732641834; x=1733246634; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n5NofcZHiN/mPTufbVMAYbTQYvMqATiuy7cs+7+mqOw=; b=YC40IouIPj/EQH11jPkaJ6GcIdHvAn4+qujoFjohA/KWdUr2lmOCN7jx7XB9FTzHzu +tsYqSJp6Q+gUxG1sP4VGqhDCFzh3npwXP0pHLJ60VWe/lCEqyaW0D43N0K0MfB64oZ+ aG2LKSITiXpxY/P8QgdnO/EkLrgJZnHUBRtfLqZarArep0Oc+kP1Np3y4ZFowdHzQ2rl gZGCcaXFod1bgI2jJqMFjNRVlienMBf23FUhzAHWMijdhCF10/ghTrFgzza4d1dLATm+ m6ATaVj0h8+I0bZJ5LViA3nkxVBPOhvfBO2Kd6uOoiZJQ6Ti41vf3/RJAOozJPxd5D8g sCJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732641834; x=1733246634; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n5NofcZHiN/mPTufbVMAYbTQYvMqATiuy7cs+7+mqOw=; b=K0efsRLmFKFnC5hfCYPZIfOv+YBMw0LMaCFpeNigZ0yvMqHA/Xr5DAfUJBMEvNMr2f mwhUHTJo+8o3b8Y7b79X/EtxW+uTuCFcMtEbbV1cDGDe6hbDYbdIdzaKQKye88vyvBOV hNQ+RVtK+NP2lQ2etf6JxLaR6cJD39LtAjvMtP0ictWoXFQ3x/0831Szmh/iselsljoP kVw8QGntSHVIFeMSU5PlqEnFSpH1nZnDF2I6YtvbEzDQ2Ke0LswEW3keLU7z4OsYD5jl 14Y3jAKRAhmJkLxp7Db5OUf7x1hqDCpzza+xxUAzQDlW47sXNlt0vAOSezPSE1RukadU +h5Q== X-Forwarded-Encrypted: i=1; AJvYcCXu58cLkl6rNXhS7LTQFx+xaNfy3pQYskDbWTKxsP7dTb2rb4+lLX1FXg0Z1+4VH+XySDtjENZoDw==@kvack.org X-Gm-Message-State: AOJu0YzRz6T5Ew6atTaoP+IT9uu92SUHZ+DC92y41z+wQjVvc/sQbYRr VVvWR+ExdmSJ4Rm0N6lx17M1CWnljHCIgVIrEtLLcyux3Y+iEmPP X-Gm-Gg: ASbGncuXE5E3Xkm6R88ofzkTq5YYNVaMS9o5sewi88f3It5trN/Gihx7QBRh/uNj81K z/ci8PMp+ZmrC/c2SQ2ESPFz52wAegm86/DhKk0xB3vKAgfqu9vhu9Fs9wL7pHmo8tNQj6a54N7 KN2uYQsmAdOnD5cAGlDSXrsDD+jtwZ1uZ3IM7pfsdKihnBIuVH3idFG+cXIyO1SVjadLA0qH0pa ycpLP/HTq9yRiPBJBWsU0fAWvXA1cX6L4cEjdFUK2vRea3YpEidx8TAKdk= X-Google-Smtp-Source: AGHT+IFIkpku7uKl9KKAwOvhvPeOWflgDevT092ovp6tlkSzp8pl+CUkXBrRACuxkb0yqjHw9Xdg0g== X-Received: by 2002:a05:6512:3ba2:b0:53d:a012:efe3 with SMTP id 2adb3069b0e04-53dd35a4ccemr9018215e87.11.1732641834066; Tue, 26 Nov 2024 09:23:54 -0800 (PST) Received: from localhost.localdomain ([46.248.82.114]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa534232086sm473832866b.42.2024.11.26.09.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 09:23:53 -0800 (PST) From: Uros Bizjak To: x86@kernel.org, linux-sparse@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-arch@vger.kernel.org, netdev@vger.kernel.org Cc: Uros Bizjak , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Dennis Zhou , Tejun Heo , Christoph Lameter , Linus Torvalds , Andy Lutomirski , Luc Van Oostenryck , Nadav Amit , Brian Gerst , Peter Zijlstra Subject: [PATCH 1/6] x86/kgdb: Use IS_ERR_PCPU() macro Date: Tue, 26 Nov 2024 18:21:18 +0100 Message-ID: <20241126172332.112212-2-ubizjak@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20241126172332.112212-1-ubizjak@gmail.com> References: <20241126172332.112212-1-ubizjak@gmail.com> MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 25D432000F X-Stat-Signature: bnohcnmsomx3a5s65m3bxx5imnx95kn4 X-Rspam-User: X-HE-Tag: 1732641833-871111 X-HE-Meta: U2FsdGVkX19ldoF5wTvXdbVR3pVVgwEM8/FzZu4KualRXWBpjVfTnB9AOdwiq5X2HQVy/potYqMdXqARsuKLUiF7KS+Cyw8wySE6TAELbso6GU+N1AOKSpA+IeKpCnKGZwF3yISxa9nTtT2dzm4LkWJULnLfdnS8AB+SIsOQF0nK21Re6VaPeoRTc2Lm7EodNC9reNmnbD8yomG+VzpDsaRyJH4o3MDNP2uHGjoe4BJBINMlughfgvkvvukOGhCpdCQxXffn+SVrT1D6IF4NXM1y+/xOb7v/wQQS719Us23M2rixffVKu8Rtf/5BFnYKuMfSaHMe5biOETNhZ/9+4KCH57j639ZnV82QVrzXCC+V7KFoH0pwjYWVLN/b3EPLY1McXe6FoScQDQTvyQypUgq0hDkbpblAu/CvtV7k9jLxgV2bavNTBjQJsXCdb0rAcvw8wU4NqD1d//Yym9Zv5n/K3sOFXL/LOasLPx1dlcjxJFVEtFVHoZFvovjjJuUiNS53OPGDGFLJgFXLV9aGP91hWlnK83bJdVww/whJeliBuJ2ZDlhgOcw71+0r3IdYZ8WoupeOgjuPBw9JFTJhqi3c1d1qGwpVodV/rLSpPLKZ/MbenaI35+UgnM0syCns4m6vgEbchsbyzQlAjhhp7ybpBA+Xd4K3OcJrhzCle3xd3sRE606BD1H7Fzm963j/ws0B6yvGtUOHHPH4hHRrnC+IVlQn/KtpVjqS6bY+7rIaD463MIkk+NEZghGXte8lKr3oSxxQLEKNt+tEP/JdD0takatm0pVCMNyoNcjNGiGMV8KJ6/DshZsnkM4NBFBbAErHG9CE6+IN7FCvN32quDU8gWP6j/LZspAWBE51ljk8AH/Y5R8SsuvJ+cqHmWPDD6tpTjh07H63E9Bcf5PYrEdrFyfmTpOByeIlQi6YvgKxh//jMAXEyr6HKSOCERxiUlQTLZf7M63e7b9pAjM x4HGxkvQ vrk3fziGKBKjeLvcdb5e5FytLdrGYfPK4JPUAFhMDYZxBfl6PvYx8lHBJkkjLb4+0sZXIE3vQ3syKGj70vG3T4wfZaFljKNkuuunSGz//BYp1GunRxTydyS/jpYx3s5hFJUVH/CFUGpYLLzR8jJ6akdyvrOVbfR2Y9g/9AATGuJ9PS3wJT87/NCsv+118j+AHVj9zu+CTMi7l7sJIadRJaxfBdu72SHykOTAvEKYelIks5okvORG/tD75iMCnWgcEiIbciQisu8tnFHndoQEsrUB89UsQfMsntjKIv3jjy5CXXo6pOuUPQJPllWWV9br8dX7S9eazCmy5nvklvHPCWI4Cq7nMyy7AERh0EupRe32T2EX83UA6Ew52xSj7Cm9WMC9DFty9mbWA8f/ckLnTevhZYVsiWzgt9ztiAw9Yrwum6HGHWgJMx9kNc2oAUaQYub6KV0sdiMymyqDvywO03TCpEt+txf4AkBE8Pn7b1tw7EjjAydo5nYZuxTQKOG9z+dPChKim9On7z12UpkCF7+uT7/sBM9sGZ5kEexgUJx/n/+cMHnW8FVrPhbj/KAWnsObutnTU3C7iUNi33oJmDyPPQgk6YwdESCKXnCoMKyX20jeeKrNFxgSpZBzA3vHWRUdho8D0WjhxPPRdyRn/GfWSoFa5IEcRaGOtNFYAfdn8FxHTO8uaUicJjruKrcQFGFKxx3LTFczWh19qs/fIeS/6c9QPmoSOig2SfEFtdT9jBQDtY22YeAX2JuQyN5m8HhtfTyNKC6k7VBKH2FHrxfT/GA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Use IS_ERR_PCPU() when checking the error pointer in the percpu address space. This macro adds intermediate cast to unsigned long when switching named address spaces. The patch will avoid future build errors due to pointer address space mismatch with enabled strict percpu address space checks. Signed-off-by: Uros Bizjak Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Dennis Zhou Cc: Tejun Heo Cc: Christoph Lameter Cc: Linus Torvalds Cc: Andy Lutomirski Cc: Luc Van Oostenryck Cc: Nadav Amit Cc: Brian Gerst Cc: Peter Zijlstra --- arch/x86/kernel/kgdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c index 9c9faa1634fb..102641fd2172 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c @@ -655,7 +655,7 @@ void kgdb_arch_late(void) if (breakinfo[i].pev) continue; breakinfo[i].pev = register_wide_hw_breakpoint(&attr, NULL, NULL); - if (IS_ERR((void * __force)breakinfo[i].pev)) { + if (IS_ERR_PCPU(breakinfo[i].pev)) { printk(KERN_ERR "kgdb: Could not allocate hw" "breakpoints\nDisabling the kernel debugger\n"); breakinfo[i].pev = NULL;