Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp488432lqb; Wed, 17 Apr 2024 02:24:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUbKNJfSkXFYtTWr8MXTMyJhKSQeJ/v01MjXD5QxCLyZjlnseGFzpuTVYPAOg5rgJqVkBum8YAdUIzYSKj1iBBTREhj/ioNC3D7mmb5EA== X-Google-Smtp-Source: AGHT+IECysFFSKg9WG8DNcAiuQ9mGxoGhet5CLJMFoi4RA2wP3MmMq2oIAqj19iHzf5GBA6E/26j X-Received: by 2002:a05:6a21:2d87:b0:1aa:583e:15b0 with SMTP id ty7-20020a056a212d8700b001aa583e15b0mr4881754pzb.8.1713345848499; Wed, 17 Apr 2024 02:24:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713345848; cv=pass; d=google.com; s=arc-20160816; b=DvmPENT+XGn39lQYHn5pbJLPIamOhHe/3PvUZp2jUwjUUiTx4M7gbJhc2UhOrF9bWo U+bI36LexirsZEgbNtUhOWj6YFwt27Czh+wZKR7l66YR9eM29D6uyIG/xAULLu7QTNkh G3RBfyeH3rXKJ9v2vWRToTf1zk7KCbz6NhidildABAWM2YiOUaH3HiPytWfpQ/hEZBFF G3Qarbo/cPkpvs63VjNNsM/KSuDfsVc7kfJwH/dVmsf2gUJ4CK6hYe3GphVu7qyDe/HA KKR5IOQ0Wd/jj6z+cRyPov8pJ77x7mrC6kqeiuLcOBO6YV9qNphpIu3jCYgmbDPjK59e ssaw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=uelsdtYZLBKL7jGIyaP3EG/BKK0QSDVCAZyC+ZgTgWI=; fh=sjv70pvzQ/ALtByXhcKD8xL31OEToBHv1BbB5tdfUTs=; b=AptuiwFIvgS3x8+Gfk9YKR9e+CixkqtJ7m9AQwXyp86/JL+Jsbi8hfMQvPKF11RYjY JnwVXOlHSpvrdW42xdhtcQAaeIsotiG+M9q5mfk1k3zmWxTd+hBG1smNKS4ZS0YRp1Z4 C4pah3KuK9HqD+BpYlSZ/kMqljFfkSUGs157Ztu52KmmVxM4PqRAL93sgDg41VIrRKEF oH+5rqLD6L3KqdxGLIlUEvrzzNdAUII4PpzPuO11AeEPhbLydua5pIfqXnBmoZCxaWd0 GtpXflJSx4ZYrN0u/+pEe/0WT8t/w0LczMdByn4d+S4mJDrAP1m8xMKktbCNlSBPIseP 3kdw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="N/oFTzHF"; 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-148223-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148223-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id gd7-20020a056a00830700b006efbc373833si6381140pfb.399.2024.04.17.02.24.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 02:24:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148223-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="N/oFTzHF"; 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-148223-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148223-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 113F6B22241 for ; Wed, 17 Apr 2024 09:22:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD7E812AAE3; Wed, 17 Apr 2024 09:22:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="N/oFTzHF"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="n7wpRnph" 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 9B061F516 for ; Wed, 17 Apr 2024 09:21:58 +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=1713345720; cv=none; b=BU3HtilwY2PpNNOUb0Xyht9XW7T8q36t+nE9KSICRR/ryzTPnzxQvOc6/48yEu3A1CzJaYBKzRi2UIpMixS4JO1tcy/xDRnxkZi9kmzel4HRaLkF8SfO87GOaiPcAberdK2BFVNyFLXqfuIf45bYv4j99tFjpK9+JEzFLZFIak4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713345720; c=relaxed/simple; bh=YQCssONq63bP0qOSXogsdrqWe5WQi1xzVV+1t1nonpE=; h=From:To:Cc:Subject:In-Reply-To:Date:Message-ID:MIME-Version: Content-Type; b=qnlbTeOL+shGpVH+MSFt71fPAk9kkXveCu4eDPKFMzD/4aiBKcyTqoePMgEXnjkHCqLDZEah9WfaHjsNQDhMaEcKz4zk02ObqBW1zLg59zGf6e44twJCS5N+0KLszXGSpHxUZyXoAnYBcOsEGotkXmHvLZavwo3TCs9mAy8lAEw= 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=N/oFTzHF; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=n7wpRnph; 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: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1713345713; 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: in-reply-to:in-reply-to; bh=uelsdtYZLBKL7jGIyaP3EG/BKK0QSDVCAZyC+ZgTgWI=; b=N/oFTzHF4bDb8QRgjaC7Z6Po4wDANptnApdUW0jDwapj4DwVsdil6wL/wbDu9qN139oeWJ m9QDrepaKxAjp89hm6WbRfHfRAyvMJQRnQE+NztkslFjtXq+o53shI9qpLZPeabz6+EQAM cW5ERdPm2fDlJxTjSgpJH1jp63DN9/LkO3PnKHjLStDRjSdk5GZDwxZUv5YiNeeuVx6nU+ TfdcdtPuRBEF2KHdmOKHEYgIDDYudqYOej+wXAo4ZXy/cGD3OI4i/9QzxOx3AFzNIslPeM P7LexVPri3b1i1cGiHE3I7OyIhi2uYsqAWsjUV0h85Bx0s3Dpbjd9AlgoWO5ag== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1713345713; 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: in-reply-to:in-reply-to; bh=uelsdtYZLBKL7jGIyaP3EG/BKK0QSDVCAZyC+ZgTgWI=; b=n7wpRnphfQAtG0IBBYh3kxYXjf4HSao3BQ+sNkaQO8ahI2LNp0bALMNVuimOVsF1QHgGQm /cjhI3zKt1xxxwBA== To: Oleg Nesterov , Thomas Gleixner Cc: LKML , Frederic Weisbecker , John Stultz , Peter Zijlstra , Ingo Molnar , Stephen Boyd , Eric Biederman Subject: Re: [patch V2 07/50] posix-cpu-timers: Split up posix_cpu_timer_get() In-Reply-To: <20240416144438.GA17990@redhat.com> Date: Wed, 17 Apr 2024 11:21:52 +0200 Message-ID: <87o7a8wdhr.fsf@somnus> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Oleg Nesterov writes: > On 04/11, Thomas Gleixner wrote: >> >> In preparation for addressing issues in the timer_get() and timer_set() >> functions of posix CPU timers. > > Cough... I must have missed something, but posix_cpu_timer_get() > doesn't look right with or without this trivial patch. > > It doesn't initialize itp->it_value if cpu_timer_getexpires() == 0, > this means that sys_timer_gettime() will copy the uninitialized > cur_setting->it_value on the stack to userspace? The initialization of itp is already done by the callsites. do_timer_settime() in posix-timers.c as well as do_cpu_nanosleep() in posix-cpu-timers.c execute a memset before calling posix_cpu_timer_get(). So this should be fine - or did I miss something here? Thanks, Anna-Maria