From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D7F533C53F for ; Fri, 5 Jun 2026 08:20:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780647656; cv=none; b=ILPc+5GjOpXuYOcXS1NwzoOn+kN2/F2RoVGFgmnBoR1kEjrnnJZ1hGWL+K/qzUo3pa0Ni3ZhMg1IF4jqycqTBk36AgNRLgMlvheyAC8sFKmUNL3uKv+8mtbgSV0EXcAClxLOsGnJz8Gt8KeJnkZMBfh21uPWkgBdcBh8vYmeK+Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780647656; c=relaxed/simple; bh=xrcSx9jsTJoT3LXep/9EQa5TdM8Cywzqgj+hU2mhHCE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AC1SwmD/bmfPbbnFUSFuyUsl7lIUkaDxWfjRJCOR+RXp0dXgaBEg6YuZAs/8tPvRwVqwzvU9aZKS+AK5oUz2T49v18yNaJ7Hug+PO8Fsv6onT978ehci5P/pSj10kym25Ym5TqbFn7aiLPFpRxVFtQVtqZ1e0O4ZyVYLmoRG+xA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PEwVfJPa; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PEwVfJPa" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-490a76757e5so11071875e9.2 for ; Fri, 05 Jun 2026 01:20:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780647654; x=1781252454; darn=vger.kernel.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=0A5fM23LfGPgodEA6dhsm+rAze8S6m3/FbdBbc4G5so=; b=PEwVfJPaIuOYz5lelAbhxguUw6OAcOCb9G7mb3b+xRnAhmkRc8+2SxJXOvP9XgenFA 85fvmZ0heTWTM5ln4AzY6452wJJTF873cb+6gPp8TEQ8qVhVT5XS61VdegS6x6qFo/2+ 36jpbHY9Jp8jx9wdJMHVD4VWpukiM2K23qK22RkO6V/ME7+9Ivu9pHRsnyDLAkTAdqxW 6+l6aj6oL+GduJVJzWcNZvL2P6V8iZzAGR4p7f/SmMXrQAzYZhIAsZAn8uYDaNQMZK+s NMwr0u1cLnX4Z4V0EJkoMX4UDTT1mGIqlPLRIrBdBtmTMH4AR5H3aAJKm1sVI0XvpuVQ IFYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780647654; x=1781252454; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=0A5fM23LfGPgodEA6dhsm+rAze8S6m3/FbdBbc4G5so=; b=XVK3AKd+MPsQPCcK6PPD+2MG8v4Ihua3Ql3EFLbkxhBv3RqwnHzPFCptEkqMNqb4tm 1FxABZ+1PxPamgTeMhasedK0v6VgKdZszmQpNrOBUy9i5T/IewzS/YB7wEOfiIzlXwx/ S4U1qFiBLpHzRjwtoY0sPv42CVHhbrlzKNtZ61O50rSuUJUmZglvr+0PFd6Ks2RNOZgI cWOVk/tlQJZyMTLfH42AdaG33IBqiv0MYgYTITEvutuE6krT7OHp+nGYlWanclRUj0ei uReWbXO6E7yrfUrtFrABd+TSQsFA+ZbBSSo8TPKsFwUTbbgLY8i1FCAfmFLg2cpSf4iC VotA== X-Gm-Message-State: AOJu0Yw++3txOWBELaUwvdZeUrKhYQNaoB8j+5wZ0cvLvTyrG2e6STwE 44jL9+XDhr+ivLFzXGhddKff1OE+HJxHE/y7WDFhsQ3roJrQsYRmqto4BJkCd386 X-Gm-Gg: Acq92OHvFuVgXzZG1rVHArepjhRW4iOtffvlMco8NeF5V0DUvJS9Uf/lnJeCNe5BxAs EqgZx3Hdn3kZ5tYEga4mjLSHdWOLFWFN96Mp+t8c+skgzxzu3akssImFWrQGN2+gi6e4mVxgfls BcLSUVCA9Hi3WuzcPivCgfm9fUv6bQi1l13nwXaeB74ty6lpOCI+JSQP8G4znnTALJCKwpbGaQP UFt9vFeF1/HySSqQ63kGF0pvz1Dc2kMbzPenXcqXdT6vfuzrSWQO7krYh1m9Ep3BeD5e+f+rTfa p25bgTBOp8Dd9JthBcRvf6owsZKXddJOsKyHHnf1CjRYmC14jIA82GtRNa0UjfpEjCB7l/s3MCD +NGYIncw28tDpG6w7yqMfmftG6IZyujguKrXW/LL2pWaxYvsl0WBdku9FbbUni+/YCEWCysELey fBSL/aK4hW7zNQ1ouIgAQdPWbSY66ZZOC1mAm3zTeLOQ6ZRAlRdZNJWyiM/xP8oRs= X-Received: by 2002:a05:600c:4e14:b0:490:4e3e:b483 with SMTP id 5b1f17b1804b1-490c2600ebdmr34857885e9.22.1780647653575; Fri, 05 Jun 2026 01:20:53 -0700 (PDT) Received: from ramin-pc ([178.19.210.170]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490bc39def5sm127955605e9.5.2026.06.05.01.20.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2026 01:20:52 -0700 (PDT) From: Ramin Moussavi To: Michal Simek Cc: linux-kernel@vger.kernel.org, Ramin Moussavi Subject: [PATCH v2 0/2] microblaze: fix signal-frame handling for NPTL Date: Fri, 5 Jun 2026 10:20:48 +0200 Message-ID: X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Two independent fixes to the microblaze signal-delivery path, both found while bringing the uClibc-ng NPTL test suite up on microblazeel under qemu-system (petalogix-s3adsp1800). Patch 1 wires up sigaltstack(), which is currently routed to sys_ni_syscall even though the signal code fully supports an alternate stack - microblaze is the only architecture leaving it unimplemented. Patch 2 reserves the ABI argument-home area at the top of the signal frame. The MicroBlaze calling convention reserves [r1+0] for the return address and lets a handler store its incoming register arguments r5..r10 into [r1+4]..[r1+24]; since r1 points at struct rt_sigframe on entry, those stores land in siginfo/ucontext and corrupt the signal state. A seven-word leading gap moves them into scratch space. Both were tested with the uClibc-ng NPTL tests; the affected tests (tst-cancel20/21, tst-cancelx20/21, tst-signal6, tst-timer4/5, tst-mqueue5) pass. checkpatch --strict is clean and both apply to current linux-next. Changes since v1 [1]: - Patch 2: shrink the gap from eight to seven words. Michal pointed out that the home area is exactly seven words (r15 at r1+0, r5..r10 at r1+4..r1+24); the eighth word was never written by the ABI. Retested on qemu - tst-timer4/5, tst-mqueue5, tst-signal6 still pass. - Patch 2: fix the offset range in the commit message and the in-code comment ([r1+4]..[r1+24], not [r1+28]). - Patch 1: unchanged. [1] https://lore.kernel.org/all/cover.1780587199.git.lordrasmus@gmail.com/ Ramin Moussavi (2): microblaze: wire up sigaltstack microblaze: reserve the ABI argument-home area in the signal frame arch/microblaze/kernel/signal.c | 8 ++++++++ arch/microblaze/kernel/syscalls/syscall.tbl | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) -- 2.53.0