can't find file to patch at input line 140 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |From patchwork Tue May 18 20:03:19 2021 |Content-Type: text/plain; charset="utf-8" |MIME-Version: 1.0 |Content-Transfer-Encoding: 7bit |X-Patchwork-Submitter: "Chang S. Bae" |X-Patchwork-Id: 43466 |Return-Path: |X-Original-To: patchwork@sourceware.org |Delivered-To: patchwork@sourceware.org |Received: from server2.sourceware.org (localhost [IPv6:::1]) | by sourceware.org (Postfix) with ESMTP id 65980395C415; | Tue, 18 May 2021 20:09:02 +0000 (GMT) |DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65980395C415 |DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; | s=default; t=1621368542; | bh=/gQFdpcsT02vPIP12d/+fcQ5Bf1NqDSb1GKk5qQFIUU=; | h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: | List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | From; | b=yjs6rtFTUlYYlVR9eCs8V8nj5oDVLw59IqOzXshdO3523Ru3hWR7VyiwjJG4HTT/f | 1IHz4mczpmwhn9hm7FLblVCKq1PUuq7ols85Yzx/HxbxYp3akVx24dG1zJ2MFa3eJy | CUayslZ+iyZRWVsBToGXe7TsYkkXj0kPQVHmKj60= |X-Original-To: libc-alpha@sourceware.org |Delivered-To: libc-alpha@sourceware.org |Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) | by sourceware.org (Postfix) with ESMTPS id E590D3858022 | for ; Tue, 18 May 2021 20:08:58 +0000 (GMT) |DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E590D3858022 |IronPort-SDR: | heO2TQeslq7U0/Jut6A1xmsOU0AC5SREPVeFSGvF2p4OKgm+bxKeVAJ16TLKMicegI48yDc8VG | 9SY6oYcW2FnA== |X-IronPort-AV: E=McAfee;i="6200,9189,9988"; a="200855052" |X-IronPort-AV: E=Sophos;i="5.82,310,1613462400"; d="scan'208";a="200855052" |Received: from orsmga006.jf.intel.com ([10.7.209.51]) | by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; | 18 May 2021 13:08:54 -0700 |IronPort-SDR: | mF6ESxtvGBwEPTLpSSVTm0Q5UUOfznKZFcuTFP9KoTnEtDTc3M2iW/0+gl8WcS0NjAGlaZkFFa | tix6mZ5h+/4w== |X-ExtLoop1: 1 |X-IronPort-AV: E=Sophos;i="5.82,310,1613462400"; d="scan'208";a="394993628" |Received: from chang-linux-3.sc.intel.com ([172.25.66.175]) | by orsmga006.jf.intel.com with ESMTP; 18 May 2021 13:08:53 -0700 |To: bp@suse.de, tglx@linutronix.de, mingo@kernel.org, luto@kernel.org, | x86@kernel.org |Subject: [PATCH v9 5/6] x86/signal: Detect and prevent an alternate signal | stack overflow |Date: Tue, 18 May 2021 13:03:19 -0700 |Message-Id: <20210518200320.17239-6-chang.seok.bae@intel.com> |X-Mailer: git-send-email 2.17.1 |In-Reply-To: <20210518200320.17239-1-chang.seok.bae@intel.com> |References: <20210518200320.17239-1-chang.seok.bae@intel.com> |X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, | KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, | SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 |X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on | server2.sourceware.org |X-BeenThere: libc-alpha@sourceware.org |X-Mailman-Version: 2.1.29 |Precedence: list |List-Id: Libc-alpha mailing list |List-Unsubscribe: , | |List-Archive: |List-Post: |List-Help: |List-Subscribe: , | |X-Patchwork-Original-From: "Chang S. Bae via Libc-alpha" | |From: "Chang S. Bae" |Reply-To: "Chang S. Bae" |Cc: linux-arch@vger.kernel.org, len.brown@intel.com, tony.luck@intel.com, | libc-alpha@sourceware.org, ravi.v.shankar@intel.com, | chang.seok.bae@intel.com, | jannh@google.com, linux-kernel@vger.kernel.org, dave.hansen@intel.com, | linux-api@vger.kernel.org, Dave.Martin@arm.com |Errors-To: libc-alpha-bounces@sourceware.org |Sender: "Libc-alpha" | |The kernel pushes context on to the userspace stack to prepare for the |user's signal handler. When the user has supplied an alternate signal |stack, via sigaltstack(2), it is easy for the kernel to verify that the |stack size is sufficient for the current hardware context. | |Check if writing the hardware context to the alternate stack will exceed |it's size. If yes, then instead of corrupting user-data and proceeding with |the original signal handler, an immediate SIGSEGV signal is delivered. | |Refactor the stack pointer check code from on_sig_stack() and use the new |helper. | |While the kernel allows new source code to discover and use a sufficient |alternate signal stack size, this check is still necessary to protect |binaries with insufficient alternate signal stack size from data |corruption. | |Reported-by: Florian Weimer |Fixes: c2bc11f10a39 ("x86, AVX-512: Enable AVX-512 States Context Switch") |Suggested-by: Jann Horn |Suggested-by: Andy Lutomirski |Signed-off-by: Chang S. Bae |Reviewed-by: Len Brown |Cc: Andy Lutomirski |Cc: Jann Horn |Cc: x86@kernel.org |Cc: linux-kernel@vger.kernel.org |Link: https://bugzilla.kernel.org/show_bug.cgi?id=153531 |--- |Changes from v8: |* Added a "\n" at the end of the sigaltstack overflow message. (Borislav | Petkov) | |Changes from v7: |* Separated the notion for entering altstack from a nested signal on the | altstack. (Andy Lutomirski) |* Added the message for sigalstack overflow. (Andy Lutomirski) |* Refactored on_sig_stack(). (Borislav Petkov) |* Included the "Fixes" tag and the bugzilla link as this patch fixes the | kernel behavior. | |Changes from v5: |* Fixed the overflow check. (Andy Lutomirski) |* Updated the changelog. | |Changes from v3: |* Updated the changelog (Borislav Petkov) | |Changes from v2: |* Simplified the implementation (Jann Horn) |--- | arch/x86/kernel/signal.c | 24 ++++++++++++++++++++---- | include/linux/sched/signal.h | 19 ++++++++++++------- | 2 files changed, 32 insertions(+), 11 deletions(-) | |diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c |index 86e53868159a..2ddcf2165bcb 100644 |--- a/arch/x86/kernel/signal.c |+++ b/arch/x86/kernel/signal.c -------------------------- No file to patch. Skipping patch. 3 out of 3 hunks ignored can't find file to patch at input line 200 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h |index 3f6a0fcaa10c..ae60f838ebb9 100644 |--- a/include/linux/sched/signal.h |+++ b/include/linux/sched/signal.h -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored