From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36A56C433F5 for ; Thu, 24 Feb 2022 09:56:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233115AbiBXJ5F (ORCPT ); Thu, 24 Feb 2022 04:57:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233151AbiBXJ46 (ORCPT ); Thu, 24 Feb 2022 04:56:58 -0500 Received: from mail-vk1-f177.google.com (mail-vk1-f177.google.com [209.85.221.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC80E28ADA9; Thu, 24 Feb 2022 01:56:22 -0800 (PST) Received: by mail-vk1-f177.google.com with SMTP id k9so879774vki.4; Thu, 24 Feb 2022 01:56:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UaaU3qYErVihNgxgJw4SHNwOEGx/UhY/ytg286+tR04=; b=JPlbGO8qyl9Dzq1lI5Tgm2np3C9+me2aiPspPVq0QzqjKmt1CUefYd/0T43Ykz1dt6 nEge7XJqToKfs3LhCraxdNsFYLBjf7V4ZRR5BDeEUH02AmklI2FUn5PxGd9CHSA078Kt ihtC+iiz77d4FiJ8HdcaPBm47ATGJ5Ca2ZeUIYgvrb+NxOacoQNn4BZ2OnT7IjYe56QU y5wQi4BlZNkYVs/g+SCB1RqAA7g67ME2xMy2EKY5e50Kn2HELIVVtZIWHA95zjwD5EOj vXufRzsX8b09jI3vytBUc3fhMzYjIVKwkQ4/gYs9Tn9njl+Jl3AERL0oCaGLEYhNly6U +mDA== X-Gm-Message-State: AOAM531CzzHZl7SlmcC1MKPPF1OlF0bGXhonduA/fTEItZwF0Cweh0F9 eF7hAc6Wi0atOJMeF2aE+P35TFbWG7bjcw== X-Google-Smtp-Source: ABdhPJynvsEgIoJZ2AoCZok9nIYdyhMjWHm927h9o3VujvqmAS1n0AYSWp7++DenJOLYDcbLSK8JoA== X-Received: by 2002:a1f:1c4:0:b0:321:bdee:acbd with SMTP id 187-20020a1f01c4000000b00321bdeeacbdmr727554vkb.39.1645696581613; Thu, 24 Feb 2022 01:56:21 -0800 (PST) Received: from mail-ua1-f54.google.com (mail-ua1-f54.google.com. [209.85.222.54]) by smtp.gmail.com with ESMTPSA id b78sm315516vka.56.2022.02.24.01.56.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Feb 2022 01:56:21 -0800 (PST) Received: by mail-ua1-f54.google.com with SMTP id g15so610508ual.11; Thu, 24 Feb 2022 01:56:21 -0800 (PST) X-Received: by 2002:a9f:360f:0:b0:341:8a12:8218 with SMTP id r15-20020a9f360f000000b003418a128218mr737932uad.14.1645696580955; Thu, 24 Feb 2022 01:56:20 -0800 (PST) MIME-Version: 1.0 References: <20220224060448.1856091-1-keescook@chromium.org> <95b9c3e8227a4892b26cc0384d1782c2@AcuMS.aculab.com> In-Reply-To: <95b9c3e8227a4892b26cc0384d1782c2@AcuMS.aculab.com> From: Geert Uytterhoeven Date: Thu, 24 Feb 2022 10:56:09 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] m68k: Implement "current_stack_pointer" To: David Laight , Kees Cook Cc: linux-m68k , Linux Kernel Mailing List , "linux-hardening@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org Hi David, Kees, On Thu, Feb 24, 2022 at 10:54 AM David Laight wrote: > From: Geert Uytterhoeven > > Sent: 24 February 2022 09:17 > > > > On Thu, Feb 24, 2022 at 10:12 AM David Laight wrote: > > > From: Geert Uytterhoeven > > > > Sent: 24 February 2022 08:59 > > > ... > > > > > +register unsigned long current_stack_pointer __asm__("sp"); > > > > > > > > I don't know what HARDENED_USERCOPY does, so I don't know if you need > > > > "usp" (see rdusp()) or "sp"? > > > > > > HARDENED_USERCOPY significantly slows down some systems calls > > > (especially things like sendmsg()) by trying to run-time verify > > > that the kernel buffer doesn't overrun a stack frame or kmalloc()ed > > > > Kernel stack frame of user stack frame? > > Kernel, the kernel doesn't care if the user stack gets trashed. OK. Reviewed-by: Geert Uytterhoeven Kees: Do you want me to queue this in the m68k for-v5.18 branch, or do you want to take it yourself, together with the HARDENED_USERCOPY work? In case of the latter: Acked-by: Geert Uytterhoeven Please let me know. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds