Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1480020lqg; Sun, 3 Mar 2024 12:11:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVcfM2V0rbA4qn2xyd7HTuPzMb4QEwcCi1m82JktP0rfnaoyh8+i/OgcH2qmlOkgmn5SHmc94nuJOmsZ4IXcxGJqUAyUCWQkPhxBgAqUQ== X-Google-Smtp-Source: AGHT+IEmcL4HOQGwO7Vs0fcBMZvpmHl26/AANfyFU6JenPRmtA5uGIbxJm4leJ7Q6a0+MEeO2tG6 X-Received: by 2002:a17:902:ce83:b0:1dc:b81c:809 with SMTP id f3-20020a170902ce8300b001dcb81c0809mr7504368plg.32.1709496661628; Sun, 03 Mar 2024 12:11:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709496661; cv=pass; d=google.com; s=arc-20160816; b=TVP80/cKkkWjwS9OWh6yoq5jtKCJHYSuR6L6ekFGmrIozAZTvbG+UQj0pc9ip/aGy6 iGiCluuBqUzL9FgFGlApyuWaMLFWia+3g3pHHUOYT6zGb++D53HEW+vekflmeWBepVlF opuEntumkz3QfVIMuZvtXpCNrkdhy+aYNnV399UhK4ifxRMOcX7RbxwSQCVQX5YlT8YP JBrmxGNHti/drmyLOlSrF62OMKxmCN7I2jlQrltVURpisf+J9kZMPKUw4x9SNBUcmGk/ TfFTGu6c0M/zqVvNEo8hLVDwZwCzKoDl7I3QcQ4pjJJlS0nQop32C5BLy2Tl7B9SB2Cc aD9g== ARC-Message-Signature: i=2; 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:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=Bn94CLT9/W7Sw9FixsWA934JJ4me1mWypVyVM1LhbOw=; fh=RTU7TgxKfUmRVp3DrCyDDE5KVBFG8r/7xSNUm9z/icc=; b=KR3bB1/lD2fxPTNBTuTbVf859AbIuWHiknlSYEXYG7K7JJrrI40oia40z1CwLBS7dK gDMwaNa0ShmIfYcSOI1eRLWVzUt02AAhZKQtZHEOzbUdRB1boHkIDmzvvZgiHltBPyOP xMVGn5N4TPBqkb+SODQl7aewzTefgr7moMfZyCQp5HmbKDqZdCIFSaR2qceDrlmTwZyz Y8/LS1JhrYFxqC2b508M6+Iu3dyOeVC/tmv/kVLbbAFTJl8bibPd9g+K4CUqXUjrb/kj Wo34kfz12rn8rM23kLwQ1b5q36G1S3N1n3QyGMp2GU0HrKdvvJySLM0MDKtJNgxbHbi7 mT4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rwR+HOEV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-89893-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89893-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p2-20020a170902b08200b001dca282000dsi6970222plr.433.2024.03.03.12.11.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 12:11:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89893-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rwR+HOEV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-89893-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89893-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4F4CF28178F for ; Sun, 3 Mar 2024 20:11:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7566D79DBF; Sun, 3 Mar 2024 20:10:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rwR+HOEV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="29Tr+bYO" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 0A22479DB1; Sun, 3 Mar 2024 20:10:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709496654; cv=none; b=uowhrU8p8oCT4bJk9MVUkhgklrF4tnu2O+38oMGGQqCfyjBMT+PK1H6o7bnR4gg3g3bmqCCPT97zhch6cuqGC/UkYEbBA4VaAQxunYFeL/IjgjFHX/EoHv4ab6JJSWULtaeoImKezxx2rNf8l26pJWtNUzU2GdMOOsNwGcJLAWg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709496654; c=relaxed/simple; bh=FzTndEO7lXg43Boxwns0aVbF9ykNu4K7zUCMZVjG2RM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Zi+eWCTfy7QhThqlKszajy7LMkGFxTjNJ1sMCulqoEJ139N6AmUzhu06AiEeUsviJni1weA+3FQ2Kk1GlJUD0NU1GaR8u+f5qlMQK2D7yEhF8L28C0BHBb576CuuDE/R2W9fvlYWwBEgIXFmSJHj+v3KtHsrPjrzhI+Gq2PAX9w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rwR+HOEV; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=29Tr+bYO; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709496651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bn94CLT9/W7Sw9FixsWA934JJ4me1mWypVyVM1LhbOw=; b=rwR+HOEVdk+qVaSLRQNrcjS4FplTQzEV0FKbZfyg4RKBHJGHIrsmbd2gbXL7GZyMHYfCYi bWqW25TRNP1GS+Me4hZZ7xLMyTN468zwQItcTvpssQO4VaXXgRrrmsWhs9EH6CHnW+y5i8 N4fyu2mmA+N7m4DDW0FXEkQl9jN12S6GSkiHBOXv/vqqsgPK6vyPlomCBcEKn8s1HsKQPl xAZqu2lj83CCR4U+04nz+1a0iJUOemOEKUpn+BfHTXg9T5JHZB84H2tri8WlK+a7gGtQ7S 1olicMrU6OgyKIkJDFyszppfhOxdIW9TeuWNaHMNhsQxY5heF73XBxaSsKS5cg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709496651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Bn94CLT9/W7Sw9FixsWA934JJ4me1mWypVyVM1LhbOw=; b=29Tr+bYOnRnxAupJFd0RrIO//c9mIZzwiMuhnV4t6piYd+AEQYrTSGpYQcIDaq1EygevVQ UwxjaR8fO5zuuVCA== To: Uros Bizjak Cc: Linus Torvalds , kernel test robot , oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Arjan van de Ven , x86@kernel.org, Luc Van Oostenryck , Sparse Mailing-list Subject: Re: arch/x86/include/asm/processor.h:698:16: sparse: sparse: incorrect type in initializer (different address spaces) In-Reply-To: References: <202403020457.RCJoQ3ts-lkp@intel.com> <87edctwr6y.ffs@tglx> <87a5nhwpus.ffs@tglx> <87y1b0vp8m.ffs@tglx> <87sf18vdsq.ffs@tglx> <87le70uwf0.ffs@tglx> <87edcruvja.ffs@tglx> Date: Sun, 03 Mar 2024 21:10:50 +0100 Message-ID: <87bk7vuldh.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sun, Mar 03 2024 at 20:03, Uros Bizjak wrote: > On Sun, Mar 3, 2024 at 5:31=E2=80=AFPM Thomas Gleixner wrote: >> I did not follow the __set_gs work closely, so I don't know whether Uros >> ever tried to actually mark the per CPU variable __set_gs right away, >> which would obviously catch the above 'foo' nonsense. > > No, because [1]: > > "gcc does not provide a way to remove segment qualifiers, which is needed > to use typeof() to create local instances of the per-cpu variable. For > this reason, do not use the segment qualifier for per-cpu variables, and > do casting using the segment qualifier instead." Right. I just figured that out myself when playing with it in user space. That's so sad because it would provide us compiler based __percpu validation. Right now this simply does not work and __verify_pcp_ptr(ptr) is not doing anything except when sparse looks at it. Sigh. tglx