From nobody Mon Feb 9 12:45:44 2026 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 BDE6F3A267 for ; Mon, 19 Feb 2024 15:40:05 +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=1708357207; cv=none; b=FtvH0w65rds4/JzZumY5yVnGl2DYwzDAI9XzqoDicH2KMBEOQqVhq4ge+/sGhoi6xm/yb/bhbGE8w/J+ThiwcYeTQ2INxZrYwppAshCKot2jLkGVYqPxv9554k6EXZialRkISGKAHWqqNNS7tcMX0axTF+uBXGbbNPykD76Uyi4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708357207; c=relaxed/simple; bh=/FzeKqaG0j2mmEV30Lj3oWwxV021Lej+8GfyOXwTkJg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ltPIYOirBp9Zn0pW5G9O3z55ntiLfHz4dmsqyCOXsVah5kWSCGGhXGtaa+zOyyS4CcbAhZ4+jMK7OHWGAXwII1qbVoY9XoOp7Gvv96txMpMEB3Um2FS+foOz3Xsiwyuv1n1OSsc8ovTv43dpg1rfrI5YvAPDULllVhs5deg0mqc= 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=I0m32Lb6; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=SjXnqLKO; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="I0m32Lb6"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="SjXnqLKO" From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708357204; 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=2THOEnwAJiXgtrKYZPFtdOpgH3pVV/ELbGPBq/l2joE=; b=I0m32Lb6T/ObtZKMnhjIHn4MwbFOMtybRMuAVEWI9k/eJvcHdm4qGkmYaxccoxK3r84qIw bfHTltqdWu2hR8sF8DlqiJKqhreFB3O79TUxlBJdIgsQgY6gDunzDYSw2Pjnpd0vSzyjBo 97K4qJkMRsRuXMxNcYocS+P8Laab76ZrWv1XD/SClO29CjtNdKPGLszNNi6I3BymGHg54w hguzTh5Ew8uTbgoxdHjBKjMynA2OaoHuOIfYvp5BSZGymt13B0tQkgMYigPJC7TikiOW9z 8MjumUxi6P1VZwmGnyh5fDo19Yb27+Q3mpCqpZjG+oA17gXzLJO+DegrpQhhaQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708357204; 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=2THOEnwAJiXgtrKYZPFtdOpgH3pVV/ELbGPBq/l2joE=; b=SjXnqLKO7XBqm2sC7xJY+X1D3xKVo9NNT3JTkgrn/es1HLWwFPqzMh5KEPPIA5Lgq0FrHq Ms3/yiU7V5Dt6kDg== To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Anna-Maria Behnsen Subject: [PATCH 01/10] vdso/helpers: Fix grammar in comments Date: Mon, 19 Feb 2024 16:39:30 +0100 Message-Id: <20240219153939.75719-2-anna-maria@linutronix.de> In-Reply-To: <20240219153939.75719-1-anna-maria@linutronix.de> References: <20240219153939.75719-1-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Anna-Maria Behnsen Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino --- include/vdso/helpers.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/vdso/helpers.h b/include/vdso/helpers.h index 9a2af9fca45e..73501149439d 100644 --- a/include/vdso/helpers.h +++ b/include/vdso/helpers.h @@ -30,9 +30,9 @@ static __always_inline u32 vdso_read_retry(const struct v= dso_data *vd, static __always_inline void vdso_write_begin(struct vdso_data *vd) { /* - * WRITE_ONCE it is required otherwise the compiler can validly tear + * WRITE_ONCE() is required otherwise the compiler can validly tear * updates to vd[x].seq and it is possible that the value seen by the - * reader it is inconsistent. + * reader is inconsistent. */ WRITE_ONCE(vd[CS_HRES_COARSE].seq, vd[CS_HRES_COARSE].seq + 1); WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1); @@ -43,9 +43,9 @@ static __always_inline void vdso_write_end(struct vdso_da= ta *vd) { smp_wmb(); /* - * WRITE_ONCE it is required otherwise the compiler can validly tear + * WRITE_ONCE() is required otherwise the compiler can validly tear * updates to vd[x].seq and it is possible that the value seen by the - * reader it is inconsistent. + * reader is inconsistent. */ WRITE_ONCE(vd[CS_HRES_COARSE].seq, vd[CS_HRES_COARSE].seq + 1); WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1); --=20 2.39.2 From nobody Mon Feb 9 12:45:44 2026 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 014893A297; Mon, 19 Feb 2024 15:40:05 +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=1708357207; cv=none; b=LW+mdZiMaQTbehfTFDQbsVrk2bHD8CP8uaTraejfqavNSOx4REh0UiOG5FZcpiZm5apEgkQY410CtiTtRgLEtxtbwrCkGAyG0Oz2dR7PRtL7tRWyyCEGuC9B0sufOzMi/2jLOyPXcD2Yd/r0EVxPxMJa41MEeVzmvw8c4NYavBo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708357207; c=relaxed/simple; bh=4h8ofa9qIf+CH6w8b3X1CVwcM9lNaj4SGvAAsc8wGck=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kXZ37EqF/ScnB/o0l5w+IrRKRfktIvW8IFLa98zklcJHYRr0wvWTTYj1KZnCj+ziGAZnBa+5ke4K4ZUlS+biDIenEBjsSaukmwnjl8s7/PC7Loal/PY1xanxkdsg8DoWuno3U7XnkEYXqw6F9UeHNlpp2tw4kMaf9v2QEWzJGwk= 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=Zg1JoeF2; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=TvbUIcYq; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Zg1JoeF2"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="TvbUIcYq" From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708357204; 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=RZRHjbrAHlMpISwMWg/IDeX5g8kU9D+wZnJXRxM/GjY=; b=Zg1JoeF2lTsifOPN88i8wUjYoB88l/6mCCv9aHFT+TzPxy/CV3SPYQNvhM+2ufjNHCHyUt iZXNwPH1UjuztQUIa//DE8fhH7vykwNXWoohGYEi88SYKMyp7mgc0at0Ic1bwIdR7MVqrz 6jfEIzqP0kcoK9je52kJqkyPijkxyewL+xIgo9HLNfbV56vQaViP6tvgiixJruyuuyo5d2 MWr/a8z+VPReiC1yHJHYhgPzx4DRu5WV860OCQvSBIRhAV1mT/Duv4yuBQIV+JtzijsjG/ xven8rQTU35zdqKST9Xxdo9A3n58iLWWIvDgQD0Z8MFYchjZuwEtiSocAl9Stw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708357204; 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=RZRHjbrAHlMpISwMWg/IDeX5g8kU9D+wZnJXRxM/GjY=; b=TvbUIcYqXbpYl4fQVCUcaDFFoRnbUNlRp9JUsTOVB9QFnaPjSxwoQ+7CN/XxxfJnDHoaoy Nwsdf4h1ti0R0qCg== To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Anna-Maria Behnsen , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , linux-s390@vger.kernel.org Subject: [PATCH 02/10] s390/vdso/data: Drop unnecessary header include Date: Mon, 19 Feb 2024 16:39:31 +0100 Message-Id: <20240219153939.75719-3-anna-maria@linutronix.de> In-Reply-To: <20240219153939.75719-1-anna-maria@linutronix.de> References: <20240219153939.75719-1-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" vdso/datapage.h includes the arch specific vdso/data.h file. So there is no need to do it also the other way round and including the generic vdso/datapage.h file inside the arch specific data.h file. Signed-off-by: Anna-Maria Behnsen Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: linux-s390@vger.kernel.org Acked-by: Heiko Carstens Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino --- arch/s390/include/asm/vdso/data.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/s390/include/asm/vdso/data.h b/arch/s390/include/asm/vdso= /data.h index 73ee89142666..0e2b40ef69b0 100644 --- a/arch/s390/include/asm/vdso/data.h +++ b/arch/s390/include/asm/vdso/data.h @@ -3,7 +3,6 @@ #define __S390_ASM_VDSO_DATA_H =20 #include -#include =20 struct arch_vdso_data { __s64 tod_steering_delta; --=20 2.39.2 From nobody Mon Feb 9 12:45:44 2026 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 5FE0B3A8F4; Mon, 19 Feb 2024 15:40:06 +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=1708357207; cv=none; b=OCyFbSGT2xt80hP+ARIp9e/3P6ckOgMkQmfZuudQrloQYGmgW/cEpj1+Gd0dLVTOF+9q8p5X7yXuEgciF4k/TRt5KZrBmvQ1NwfIZseLpDebJ9nZaSCHzmycxQhcB6HyqBXI0oVuu1P5MOXgR1Wfm6KTDi59w5uXKozXd9jXpho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708357207; c=relaxed/simple; bh=58CUWxVlxm2mlSFdFUvdFxekmd2xImPEn9ABAjDBWok=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=tpVdCLzgOeWE0CCAKRTnO/cu2l5Fc4ULel9RUaFK64gq5OxqZcs0esYYWFE0jSmw8em13o+qWV34Q4Zhob1tjF5+YBd7IvEZC5pV8mZw1DzbpfGB2/MhtS8sw1B8qPW21JGTrm2GIZoNZTZx6AJpzfoYvq2XeXpRixHFWPCGyOo= 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=d0qhxuxn; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Z/DDyv+g; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="d0qhxuxn"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Z/DDyv+g" From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708357204; 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=U51NQ0C/sqG0k3Ofsflj974vXvNUKI5iq+y1fWYWuoA=; b=d0qhxuxnsSpYGsOeZ4U81H1DlPOa3vx6VYhqqfzkE16V+mu361hQ64QzxmFKtIbGhNhQXr VSDKAL/F4qd91grgCFQSWZCwW4ltGq3dXvP5xDKep7Hy7LZknzUFGBwhv+3FprUdCmvqRD SX/oDNX1uR2BgMca28mK0pUxqoh2xLAqi3DTKH4nYS696Q7dmDSJr4w9BuAzNmZP9f6psc yZsaTC3SX/M2ovROraSnk2MB1aEjVIo5KvbO5dCXYupXdxhXyJkcVqyFE6iuIaA44z9Bf9 qSZ4rCrE6OY1cIbh3kfzXkKassnS4S47ssmWQhkIITzNqzBtNzEAbqnMTHLLfA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708357204; 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=U51NQ0C/sqG0k3Ofsflj974vXvNUKI5iq+y1fWYWuoA=; b=Z/DDyv+guMTwbx7NrIiiBC4hv7+btme15HBUJiJWRwGhFZ2vEP6hlOu7SsG2HnwffOt3kJ qPPi7YU5Qg/zmhAg== To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Anna-Maria Behnsen , Guo Ren , linux-csky@vger.kernel.org Subject: [PATCH 03/10] csky/vdso: Remove superfluous ifdeffery Date: Mon, 19 Feb 2024 16:39:32 +0100 Message-Id: <20240219153939.75719-4-anna-maria@linutronix.de> In-Reply-To: <20240219153939.75719-1-anna-maria@linutronix.de> References: <20240219153939.75719-1-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" CSKY selects GENERIC_TIME_VSYSCALL. GENERIC_TIME_VSYSCALL dependent ifdeffery is superfluous. Clean it up. Signed-off-by: Anna-Maria Behnsen Cc: Guo Ren Cc: linux-csky@vger.kernel.org Acked-by: Guo Ren Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino --- arch/csky/include/asm/vdso.h | 5 ----- arch/csky/kernel/vdso.c | 4 ---- 2 files changed, 9 deletions(-) diff --git a/arch/csky/include/asm/vdso.h b/arch/csky/include/asm/vdso.h index bdce581b5fcb..181a15edafe8 100644 --- a/arch/csky/include/asm/vdso.h +++ b/arch/csky/include/asm/vdso.h @@ -5,11 +5,6 @@ =20 #include =20 -#ifndef GENERIC_TIME_VSYSCALL -struct vdso_data { -}; -#endif - /* * The VDSO symbols are mapped into Linux so we can just use regular symbol * addressing to get their offsets in userspace. The symbols are mapped a= t an diff --git a/arch/csky/kernel/vdso.c b/arch/csky/kernel/vdso.c index 16c20d64d165..e74a2504d331 100644 --- a/arch/csky/kernel/vdso.c +++ b/arch/csky/kernel/vdso.c @@ -8,11 +8,7 @@ #include =20 #include -#ifdef GENERIC_TIME_VSYSCALL #include -#else -#include -#endif =20 extern char vdso_start[], vdso_end[]; =20 --=20 2.39.2 From nobody Mon Feb 9 12:45:44 2026 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 D24AF3AC08 for ; Mon, 19 Feb 2024 15:40:06 +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=1708357208; cv=none; b=kVxbiACk2j8tdSpq0kV7kG+aHcQR4ZPlfdaLrLOlKFTCRz2HZll+AYOjGcLv9oKGaIhEOhFL5VQESBuwpyA/K0bqdrS1n9sn1AvWYOJ+qOocdi9d7htuKMkZmigwhx8bzr4OO9Cp2X1p9aUQiGfyXQOyQWvk/RAi6tMc+aQjR1I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708357208; c=relaxed/simple; bh=4nSPlxQK2Qa4EXTdhd2aosfODHzGKDI3DJ3vUm8YPFE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lg8GAzo3eP/ZeIcvnvWbdpkmEcR3tBD4rRz1X5OwlwkJvrRVot1N1DNbQHBqr5Um028OYXRHy03O1qwD7Q46FfOcU9NfC5AHBqBbuVM9cojTk4DGN1/fWAMOQeAjzDC70SJAZ5ygjhe1qcUmwmHxh6yeyNbIt8PBtClBvivoRXk= 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=DQVndt3p; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=znuj+4xx; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DQVndt3p"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="znuj+4xx" From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708357205; 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=QlKcGbQq5n1Lw3ANMVFZoMmufVy08yz4U/pR4YBIv6o=; b=DQVndt3p0yfttx5AUPeZCN3iTtdWAV24hcFQuNtKUGHDfWkmTmFOzBwJ4tX79ZpwmjQqlo wsPmcs6vqvJKWsSFuoHbpNZFIBeMUIyKj8ntew1GN8JErgcphPgfCzSBjXIRVnkRuvh00b 3U7UjOc9gWh78q87i+720c5EaQDtDSmfqsqibDcmLbYUmEjYhfpJ3v/IUgZ9nkm9TA4czC rzJjPBcvSHRkv3zGbOzlOmEhJsH3SlIyGHObDLQy1LHy84ud7HDnQ+KIym5dKFkKnBuUr0 gtlWnwlHDN4wVXCuystRefqWOwCqZWRdd076BoftdfAE+sZOnUPycjEXnz/h6A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708357205; 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=QlKcGbQq5n1Lw3ANMVFZoMmufVy08yz4U/pR4YBIv6o=; b=znuj+4xxxhEIGTq4lLn9ezO0YtooAhxLQ7RA0DFKxuk+jNtat7QB8A5H1hpkVLW5Edcw52 0IGraAgMTD7ge5DQ== To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Anna-Maria Behnsen , Russell King , Eric Biederman , Kees Cook , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/10] vdso/arm: make union vdso_data_store available for all Date: Mon, 19 Feb 2024 16:39:33 +0100 Message-Id: <20240219153939.75719-5-anna-maria@linutronix.de> In-Reply-To: <20240219153939.75719-1-anna-maria@linutronix.de> References: <20240219153939.75719-1-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The vDSO data page "union vdso_data_store" is defined in an arm header file and also defined in several other places. Move the definition from arm header file into the generic vdso datapage header to make it also usable for others and to prevent code duplication. Signed-off-by: Anna-Maria Behnsen Cc: Russell King Cc: Eric Biederman Cc: Kees Cook Cc: linux-mm@kvack.org Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino --- arch/arm/include/asm/elf.h | 1 - arch/arm/include/asm/vdso_datapage.h | 26 -------------------------- arch/arm/kernel/asm-offsets.c | 4 +++- arch/arm/kernel/vdso.c | 4 ---- include/vdso/datapage.h | 10 ++++++++++ 5 files changed, 13 insertions(+), 32 deletions(-) delete mode 100644 arch/arm/include/asm/vdso_datapage.h diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index d68101655b74..9f21e170320f 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h @@ -4,7 +4,6 @@ =20 #include #include -#include =20 /* * ELF register definitions.. diff --git a/arch/arm/include/asm/vdso_datapage.h b/arch/arm/include/asm/vd= so_datapage.h deleted file mode 100644 index bef68f59928d..000000000000 --- a/arch/arm/include/asm/vdso_datapage.h +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Adapted from arm64 version. - * - * Copyright (C) 2012 ARM Limited - */ -#ifndef __ASM_VDSO_DATAPAGE_H -#define __ASM_VDSO_DATAPAGE_H - -#ifdef __KERNEL__ - -#ifndef __ASSEMBLY__ - -#include -#include - -union vdso_data_store { - struct vdso_data data[CS_BASES]; - u8 page[PAGE_SIZE]; -}; - -#endif /* !__ASSEMBLY__ */ - -#endif /* __KERNEL__ */ - -#endif /* __ASM_VDSO_DATAPAGE_H */ diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c index 219cbc7e5d13..4915662842ff 100644 --- a/arch/arm/kernel/asm-offsets.c +++ b/arch/arm/kernel/asm-offsets.c @@ -21,10 +21,12 @@ #include #include #include -#include #include #include #include + +#include + #include "signal.h" =20 /* diff --git a/arch/arm/kernel/vdso.c b/arch/arm/kernel/vdso.c index f297d66a8a76..d499ad461b00 100644 --- a/arch/arm/kernel/vdso.c +++ b/arch/arm/kernel/vdso.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -35,9 +34,6 @@ extern char vdso_start[], vdso_end[]; /* Total number of pages needed for the data and text portions of the VDSO= . */ unsigned int vdso_total_pages __ro_after_init; =20 -/* - * The VDSO data page. - */ static union vdso_data_store vdso_data_store __page_aligned_data; struct vdso_data *vdso_data =3D vdso_data_store.data; =20 diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h index 73eb622e7663..7ba44379a095 100644 --- a/include/vdso/datapage.h +++ b/include/vdso/datapage.h @@ -19,6 +19,8 @@ #include #include =20 +#include + #ifdef CONFIG_ARCH_HAS_VDSO_DATA #include #else @@ -121,6 +123,14 @@ struct vdso_data { extern struct vdso_data _vdso_data[CS_BASES] __attribute__((visibility("hi= dden"))); extern struct vdso_data _timens_data[CS_BASES] __attribute__((visibility("= hidden"))); =20 +/** + * union vdso_data_store - Generic vDSO data page + */ +union vdso_data_store { + struct vdso_data data[CS_BASES]; + u8 page[PAGE_SIZE]; +}; + /* * The generic vDSO implementation requires that gettimeofday.h * provides: --=20 2.39.2 From nobody Mon Feb 9 12:45:44 2026 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 7A7003C49A for ; Mon, 19 Feb 2024 15:40:08 +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=1708357210; cv=none; b=ss5td9S4EL/A3Z9mOknZc3B+EkUMTPA3C4qWsk8AleLcVulM1ziIRjdE7SDgCpAeOt7WsWaL837iKBoLpZXtaJCg7gQ3y72N6dihcUuAYivHao8fcyxE1TGQpht7Zr5/Pl30iHv89xi3EgX3C+zXwNlaebvNiEz7HcVhsfGiF9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708357210; c=relaxed/simple; bh=Egn/4loMwHErFaYxX3+cKQLZn6okX8CccVfeOzBn8aw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SinziMD8y46HRsCSwPz1xT4t1qdjQdJAkN51iNN1ofLbgFcVodez1YuHC7nLY9wab7h4JQDjI2Dos1nLDzmXZJeWYIm9nuhDLKLqqopvdq/xMMy/omw92KlB5grwNgM+4o2BIYtOSA5GoBeXy1CpUKlTtblHNTt9D5R7+YnISLU= 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=i0YoW3qr; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=eQSzwW4k; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="i0YoW3qr"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="eQSzwW4k" From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708357205; 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=TERCToEIU1g/eqQgTt1qdsHKnOD82z4H77Fq474fFqE=; b=i0YoW3qrOVk3P8xkqI05dmx7ulsyuLhIy4BdFWKLmt8S0vVUBGjAS9N/d7bdqZ3tBQ6cP4 IYgQ/JqjZgl5NvI/i3D0gfedBge8Hr+NiZxCJ68h828PLcyLIO4l4DKVQCH9qC+U/dHVC6 8v4+TDkrgclxK1p289PeCeY4rvh0VVAMCtbdilYydpoVS5y3eEr/cWJsjAGW4PL+k6XPgz TgA/OhyqF5SVMKEaHztiL+gHRdbAslL3pcod2JaLuT6pYZGGjALPxLq2pee6FZ9jAxZZY7 n6G6xf8WF2Sa6i7wlvFtnH+MmjFzxpVC80D894uI5IESwXYVCqcqL6VYU3bPpA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708357205; 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=TERCToEIU1g/eqQgTt1qdsHKnOD82z4H77Fq474fFqE=; b=eQSzwW4kfSJejLlyBll+AQLjET3Cra/9zvqyTsqucpJCt7NwSSKmemZRCwV35XOep+vfRY AukEQf4ZmrCFKMBg== To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Anna-Maria Behnsen , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: [PATCH 05/10] arm64/vdso: Use generic union vdso_data_store Date: Mon, 19 Feb 2024 16:39:34 +0100 Message-Id: <20240219153939.75719-6-anna-maria@linutronix.de> In-Reply-To: <20240219153939.75719-1-anna-maria@linutronix.de> References: <20240219153939.75719-1-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is already a generic union definition for vdso_data_store in vdso datapage header. Use this definition to prevent code duplication. Signed-off-by: Anna-Maria Behnsen Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Acked-by: Will Deacon Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino --- arch/arm64/kernel/vdso.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index 5562daf38a22..89b6e7840002 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c @@ -69,10 +69,7 @@ static struct vdso_abi_info vdso_info[] __ro_after_init = =3D { /* * The vDSO data page. */ -static union { - struct vdso_data data[CS_BASES]; - u8 page[PAGE_SIZE]; -} vdso_data_store __page_aligned_data; +static union vdso_data_store vdso_data_store __page_aligned_data; struct vdso_data *vdso_data =3D vdso_data_store.data; =20 static int vdso_mremap(const struct vm_special_mapping *sm, --=20 2.39.2 From nobody Mon Feb 9 12:45:44 2026 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 7A7343C49C for ; Mon, 19 Feb 2024 15:40:08 +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=1708357210; cv=none; b=HHfNONNeIFKtRSstN7pOYO4FVqdCcX8avaIZHTZZ0L0ax5MBkZdg7MokCB1EJwvV6B3N+8r9GUEiKK7CMf/G8o8H0HQ+G1yw3FGnVy4jxDyn3F/66c/ZXHe/tyKNs1x4FEA998VA8M8g9hYoJgkWrHuq6KD5snKg6N61q+0zDSo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708357210; c=relaxed/simple; bh=uwGKUudqINu/l2LS4UDnc84Sy7bVMtcbCFymgjZtMeI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fKj6gQQq0AyMv2Jc17r2iresi6F7MBpd4xH62iFbVN4TIyoqcGbJrMZkWhKVKfqY9MLrWvoN7lW7chR/zp8YNcSgNAOrRro4TjRXWsVrQnBb8A9iX3MhjKUBer/061jPZDYeTJ3BX6t2NTNLWHGmOhHzI/EjvqHa6FqMrYpC2BU= 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=e8ck0Fru; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=OUpLh70/; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="e8ck0Fru"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="OUpLh70/" From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708357205; 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=HSJH2Cy3AOqZmgikXh7qng6szl5HlWuz3PgXeKPeks4=; b=e8ck0FruzZ8Ag+/b5iHDLfIUxz9zmagc1f5rEiyK5hbbzj/S1I6gnFAFXaVxyBtsMkqHzF r3sco+vWtbdQfXMs/jAETq3/y9aizlcKB6nlpxeqssBVvNsHtpfgiak0jRhNchDVoGjYKq RZPEA3ub6REw1ibtUcbODrfwKIIwHzy60GRhDTtZ0y3wAORbzXwiK2V4vJ3zVWTB+L9Ky5 3ZV9koyLq5KoU80y9k6mp+yeksnv1k5N8zMCi65KDKTGZ+G0Y5ATW8+/nHgR91kIoE43T1 GIvca5Ues2wsqmpjhDoIhNEMY5vX7qfxmb3U9m4wISnoEoWZyJSTVNr2dPeqsw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708357205; 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=HSJH2Cy3AOqZmgikXh7qng6szl5HlWuz3PgXeKPeks4=; b=OUpLh70/kjYmndXYQ+Zlava3G4i+VeFfT1Xxc2MZrt7OW5qubKGDDj7Q3tgRl3hGOuaL6g Nbk18oNRr5ZzodBA== To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Anna-Maria Behnsen , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org Subject: [PATCH 06/10] riscv/vdso: Use generic union vdso_data_store Date: Mon, 19 Feb 2024 16:39:35 +0100 Message-Id: <20240219153939.75719-7-anna-maria@linutronix.de> In-Reply-To: <20240219153939.75719-1-anna-maria@linutronix.de> References: <20240219153939.75719-1-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is already a generic union definition for vdso_data_store in vdso datapage header. Use this definition to prevent code duplication. Signed-off-by: Anna-Maria Behnsen Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino --- arch/riscv/kernel/vdso.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c index 2cf76218a5bd..100cdea6d3e3 100644 --- a/arch/riscv/kernel/vdso.c +++ b/arch/riscv/kernel/vdso.c @@ -30,13 +30,7 @@ enum rv_vdso_map { =20 #define VVAR_SIZE (VVAR_NR_PAGES << PAGE_SHIFT) =20 -/* - * The vDSO data page. - */ -static union { - struct vdso_data data; - u8 page[PAGE_SIZE]; -} vdso_data_store __page_aligned_data; +static union vdso_data_store vdso_data_store __page_aligned_data; struct vdso_data *vdso_data =3D &vdso_data_store.data; =20 struct __vdso_info { --=20 2.39.2 From nobody Mon Feb 9 12:45:44 2026 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 DD7723CF67; Mon, 19 Feb 2024 15:40:08 +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=1708357210; cv=none; b=OT/TbxOwTS7tzk1joALoaPXWWAwOHhkY5mKS1zk0AwDScW0hXh607+LvGJPIR2iXie12q88d3E3vH1CGNN6zu4Ih/4zGO9CYH4NUCPXPazB6tEw3BvykTCX2Ik9cjBenCCQa6B6JSSUJ3wWKixXBwqdihdC8FGXoXo2m/JJ1lqI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708357210; c=relaxed/simple; bh=2xglRp24K0ngAsMpicpTrhgbwtum8XdpL/77bvNcnqA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=G5htdoh0DewkaHQ5hboba1pOUsQFzufU7vIbqzeaXwpkc+2taASsnSheJgEDugKEJaIwvjk4nUtxEvpayFakFafNxBsnLAITMWf6eRBkAbVt4BHE880NwZhBO20VP/P0vSjU4aMlbma7BNv/ZuQeYOWb0VoqFd2Ng17qyfkUWSA= 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=29uN5GrD; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MR81Dmyl; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="29uN5GrD"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MR81Dmyl" From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708357206; 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=jU+XjkvuIDGH4O48sip7TH7TW67eQu5qXALaeJfPZY8=; b=29uN5GrDPNQqpgJ6urrtY7kzwPWAi92vGvXafx330dxbY0YR3Yn14LU65fylLvyq8Tz51f C5gVCyufz7JDYc01w+Wb7PRLZGN8XY8h6gplAk1fO//tmnF1s/Gi4GzEvPhT3CXgGssbsz AKkbKUO6bzENLBURGD/BAkpEsEz0ietBYwjEYjHA+5DzRuw8XWof8eRYGrBo7HZU21m/Es vFVzVkv0qHGVyd7aoTZr8kUjgFEMTbW2TyWgJ0XdZV5GKJASekyu/dhpvkbEOpi8FZhsWr 1Trip6PB6kQ3yiuFItNNByUFyRamvRavMhPvUe3MPqSjjBD/CklW1kgpxbeeOA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708357206; 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=jU+XjkvuIDGH4O48sip7TH7TW67eQu5qXALaeJfPZY8=; b=MR81DmylMnhvEy0enrO6LQ6uCQ7K6zDF+DdNGdyuhMeJW9ljJHszQc91pKg7l/U5PgTHeJ UXOOpoe9Twp1YHDQ== To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Anna-Maria Behnsen , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , linux-s390@vger.kernel.org Subject: [PATCH 07/10] s390/vdso: Use generic union vdso_data_store Date: Mon, 19 Feb 2024 16:39:36 +0100 Message-Id: <20240219153939.75719-8-anna-maria@linutronix.de> In-Reply-To: <20240219153939.75719-1-anna-maria@linutronix.de> References: <20240219153939.75719-1-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is already a generic union definition for vdso_data_store in vdso datapage header. Use this definition to prevent code duplication. Signed-off-by: Anna-Maria Behnsen Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: linux-s390@vger.kernel.org Acked-by: Heiko Carstens Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino --- arch/s390/kernel/vdso.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c index bbaefd84f15e..a45b3a4c91db 100644 --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c @@ -25,10 +25,7 @@ extern char vdso32_start[], vdso32_end[]; =20 static struct vm_special_mapping vvar_mapping; =20 -static union { - struct vdso_data data[CS_BASES]; - u8 page[PAGE_SIZE]; -} vdso_data_store __page_aligned_data; +static union vdso_data_store vdso_data_store __page_aligned_data; =20 struct vdso_data *vdso_data =3D vdso_data_store.data; =20 --=20 2.39.2 From nobody Mon Feb 9 12:45:44 2026 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 C40E43CF53 for ; Mon, 19 Feb 2024 15:40:08 +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=1708357210; cv=none; b=dBJgAUV0ElnsXemL2K4fPZL1NWMZ+0rR2f7NIClOLQyRGxtpHj0LSfjgr4MpNHrV+Z15GXyeae7BkoDtCcSw6ZhJ9gLHJ36leMF7PVcV2RLq5VKr9L09cN79T7tp512L9friHbGQimydz3b7ooQqHAWEhoMx7gry7NeoN1A63d4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708357210; c=relaxed/simple; bh=2fbQDpTO4Tey39i4Yfg4XMK0iSzMhLQFeet5tLx71IY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VUxsXVGGX//b3Iwc0UzZPtJt76lbyA8/k0KtjQIZBEJ6Dj4FtomgOWbfsMYP/TxGYZ5MkUL6Kgvlww03OAXtSuLhCvfFO64T6ycRS9IRhrzKdOqO/SBor+BpURSpODlXeXI/nvV8jyiLP4P+oafgFyBCpF761HRjbbyf9cEqzM8= 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=gyzqlXGu; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=98MXiKOK; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gyzqlXGu"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="98MXiKOK" From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708357206; 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=lp+RzcryxMV8zaG1CzKINGmkFkhMVE/l8rdV67gjFt0=; b=gyzqlXGuzWp4QMqcPJo5aZYgAIRs0qFNLdXXEiXhtJi65M/ccdsGa8e0KaHDcDA1K2WZIp mCUtwyavQxP9ujmzKPuqrsiOJArtP+nA/jresToDIXNc6w5o2Uf8JJuxH+SYemvwp5Ot8O OyF7jnQm3LpTgWFv+DUJhmHEg9y0VH3fJXIfT5OYQz36rEXKCw0cUTW4Z+1c6HnBpj5zfK 6cJgYkqosyTi71L2vSZfrIx/fv51LSXR4H4zdtQLPsIepESzAVkr3e24dl5P5vj8ojFk2Z okDzTCfyt8fqBfnlHG+sXtqHgBHruzCX5JCrIC7FYpoJ2xiijxtQExx4OO1J1w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708357206; 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=lp+RzcryxMV8zaG1CzKINGmkFkhMVE/l8rdV67gjFt0=; b=98MXiKOKw1HG+Rcg0+36jc63lJvDkwgBP/Aoa8RFjRKVULn80umgrTa8zsCcVLTWf8rvyt Gp/WTg07f+n/0ECw== To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Anna-Maria Behnsen , Huacai Chen , loongarch@lists.linux.dev Subject: [PATCH 08/10] loongarch/vdso: Use generic union vdso_data_store Date: Mon, 19 Feb 2024 16:39:37 +0100 Message-Id: <20240219153939.75719-9-anna-maria@linutronix.de> In-Reply-To: <20240219153939.75719-1-anna-maria@linutronix.de> References: <20240219153939.75719-1-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is already a generic union definition for vdso_data_store in vdso datapage header. Use this definition to prevent code duplication. Signed-off-by: Anna-Maria Behnsen Cc: Huacai Chen Cc: loongarch@lists.linux.dev Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino --- arch/loongarch/kernel/vdso.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/loongarch/kernel/vdso.c b/arch/loongarch/kernel/vdso.c index 14941e4be66d..90dfccb41c14 100644 --- a/arch/loongarch/kernel/vdso.c +++ b/arch/loongarch/kernel/vdso.c @@ -21,15 +21,13 @@ #include #include #include +#include #include =20 extern char vdso_start[], vdso_end[]; =20 /* Kernel-provided data used by the VDSO. */ -static union { - u8 page[PAGE_SIZE]; - struct vdso_data data[CS_BASES]; -} generic_vdso_data __page_aligned_data; +static union vdso_data_store generic_vdso_data __page_aligned_data; =20 static union { u8 page[LOONGARCH_VDSO_DATA_SIZE]; --=20 2.39.2 From nobody Mon Feb 9 12:45:44 2026 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 427623D3A6; Mon, 19 Feb 2024 15:40:08 +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=1708357210; cv=none; b=n9Oig5dSyZLndSHXTjNIe5viFWMCN07Oo4C3JrBKbJT8wk/cVxa4NYZOszg0rw0UdAo6gGncrgp+47MKG6Y/4NXcKJr5q1duq4nAfDv/JaIo8aGcUiYMp+km/0yUK/0gzXAsKx+Jvq7g/ahjfk/wAeLjVMNtE+LE61F9xKc3ZPk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708357210; c=relaxed/simple; bh=Egt3w6vKpDeIpAiXo8C6D0ps5U8rKblI/NKKhpwZTB8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=k4s6GfogSiuYgEuEhIuRzZgtZm2QMvieFqMGxOrikUDrokoMez2vTRTV1li6hWP2vpcEkV79jag9K5ZVOicxBi4+Q6PYiG4iyo+4Gxf+PYaepAZSiyIijz14WvJuemfcy7FnNi/JzTTH7ZWWBzSsCOR+FbT8UTKYKkUtDQUCw0g= 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=RJ3a/vYz; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=H2nFv2f5; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="RJ3a/vYz"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="H2nFv2f5" From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708357206; 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=p9YNrD7tVQTrXaMc0HLx7Bog9I9Y+lcWW3PT+KiRz7g=; b=RJ3a/vYzw3wkv0lfjHWOSa3CQH7dtEAd1TsC2GWp6zruN6abfp84kgYTK1tOfgdD1DwORD Rodida/DODREXt5n6/TNYKea1SQifVc/5cLMdEQRveMD2Nw8H/M7SAVIdhvupthNgbkFxP 9kSMPEiLmverJWsp7bMt/cfJDAO6kMt+I5wIm4WZkr8lNHDcIGgRUEFDsFNDpzqjjvfpuG HjZDrKqAJJaqlZJ8DfzuObIdrdPV3WxO04sG50UFPvM2VHIMRYjFw39DyKUpxQQKOxy2SA 77fMzo1a1QxMcAXAFvNWlZa6fGwQRjQUf9STwBcs1im13Q9FRgc/J04tfWqCNw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708357206; 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=p9YNrD7tVQTrXaMc0HLx7Bog9I9Y+lcWW3PT+KiRz7g=; b=H2nFv2f5VzCxp5vwhmWZv4sSB+CxOkUflxB3/09HSK9yyjsJkr2/6UMNUpeu5OPNOcFu/p G48PpkvxupQND0BQ== To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Anna-Maria Behnsen , Thomas Bogendoerfer , linux-mips@vger.kernel.org Subject: [PATCH 09/10] mips/vdso: Use generic union vdso_data_store Date: Mon, 19 Feb 2024 16:39:38 +0100 Message-Id: <20240219153939.75719-10-anna-maria@linutronix.de> In-Reply-To: <20240219153939.75719-1-anna-maria@linutronix.de> References: <20240219153939.75719-1-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is already a generic union definition for vdso_data_store in vdso datapage header. Use this definition to prevent code duplication. Signed-off-by: Anna-Maria Behnsen Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino --- arch/mips/include/asm/vdso.h | 5 ----- arch/mips/kernel/vdso.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/mips/include/asm/vdso.h b/arch/mips/include/asm/vdso.h index cc7b516129a8..afb03d45bcd0 100644 --- a/arch/mips/include/asm/vdso.h +++ b/arch/mips/include/asm/vdso.h @@ -50,9 +50,4 @@ extern struct mips_vdso_image vdso_image_o32; extern struct mips_vdso_image vdso_image_n32; #endif =20 -union mips_vdso_data { - struct vdso_data data[CS_BASES]; - u8 page[PAGE_SIZE]; -}; - #endif /* __ASM_VDSO_H */ diff --git a/arch/mips/kernel/vdso.c b/arch/mips/kernel/vdso.c index f6d40e43f108..dda36fa26307 100644 --- a/arch/mips/kernel/vdso.c +++ b/arch/mips/kernel/vdso.c @@ -24,7 +24,7 @@ #include =20 /* Kernel-provided data used by the VDSO. */ -static union mips_vdso_data mips_vdso_data __page_aligned_data; +static union vdso_data_store mips_vdso_data __page_aligned_data; struct vdso_data *vdso_data =3D mips_vdso_data.data; =20 /* --=20 2.39.2 From nobody Mon Feb 9 12:45:44 2026 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 427373D3A3; Mon, 19 Feb 2024 15:40:09 +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=1708357210; cv=none; b=QdfDf5lkHCkDJFUMEWiVLb8JqTDvtRiI/5rcbzJBJaixpT8baWnADyJnPv35fJVbNNISps8TMHLy+vUapSgz7dyWtMYLAyuxYrQxRJa+u4tnXA+fZaaHcBpkdD1QASOzwOvDwyE/w2RP4ja9norn2JVE079+Mg8y+t8SFsQgrso= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708357210; c=relaxed/simple; bh=pWCDQWj1ZGKNeKtUkk10UnRUvitx2JkEKKGeUE/9QBo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cC8q10TjcEKf2kZ3AoMYqZLuUKALtclYc5jd8BASC/W7UTlwFCNBayRVX1sEvTLyBU9Dqg75sSMPCHO6KVVngNTEbo6exN+5umzEdBfrE7BUpCkvCsBSN9ogeBKuWLZEJa6PNahuNmm2joj7Zj+VzYX/vy4IWq0kJLl10qgvWvU= 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=3/UM9dNj; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VArxm8BU; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3/UM9dNj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VArxm8BU" From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708357207; 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=jTsHPIZ0ef28j3t4F2fpsa7oGTHGH9ta8CIKVXueM1c=; b=3/UM9dNj5/TaM9bUdHKQcc4OKv7ja6XkGFpf2YFpvEfr1XpudXG74nes6wwth2aXCf1p90 smHhAMqlq1RbZPkaEbFDJ36ydOS4dPPK829KHE8BmozcwkUTy3NNbZwPNSjQTLzdmI70cp zb1c/KBdeU05g6/PbpA4DXGttlh1rsOJEQ7Ei+R9wAE1li79sPX4vv5cgThYHA/yfw2rYV d1GO4k49vPKz8zgFsUL7fDKAdIINIqOGFTlZoXocRXZoV8kLquPvC3i5MAa4R4WXUJBJoN 5r6otuTsNVx2fnEULa4TUb+TioXDf/0Tem8ESW8NoOMbwokvxoOU5KH+J1CRLw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708357207; 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=jTsHPIZ0ef28j3t4F2fpsa7oGTHGH9ta8CIKVXueM1c=; b=VArxm8BUHFw/wNcOu6uyuCQuJOxxlgvOQN8+8bFiy7NcVxaY2v32b5mFu0FfhaSRY1AnBf EPQp4M6V5QF/AvBg== To: linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Anna-Maria Behnsen , Guo Ren , linux-csky@vger.kernel.org Subject: [PATCH 10/10] csky/vdso: Use generic union vdso_data_store Date: Mon, 19 Feb 2024 16:39:39 +0100 Message-Id: <20240219153939.75719-11-anna-maria@linutronix.de> In-Reply-To: <20240219153939.75719-1-anna-maria@linutronix.de> References: <20240219153939.75719-1-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is already a generic union definition for vdso_data_store in vdso datapage header. Use this definition to prevent code duplication. Signed-off-by: Anna-Maria Behnsen Cc: Guo Ren Cc: linux-csky@vger.kernel.org Acked-by: Guo Ren Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino --- arch/csky/kernel/vdso.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/csky/kernel/vdso.c b/arch/csky/kernel/vdso.c index e74a2504d331..2ca886e4a458 100644 --- a/arch/csky/kernel/vdso.c +++ b/arch/csky/kernel/vdso.c @@ -15,14 +15,8 @@ extern char vdso_start[], vdso_end[]; static unsigned int vdso_pages; static struct page **vdso_pagelist; =20 -/* - * The vDSO data page. - */ -static union { - struct vdso_data data; - u8 page[PAGE_SIZE]; -} vdso_data_store __page_aligned_data; -struct vdso_data *vdso_data =3D &vdso_data_store.data; +static union vdso_data_store vdso_data_store __page_aligned_data; +struct vdso_data *vdso_data =3D vdso_data_store.data; =20 static int __init vdso_init(void) { --=20 2.39.2