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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8938AC56201 for ; Tue, 24 Nov 2020 21:46:18 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0C5DC206E5 for ; Tue, 24 Nov 2020 21:46:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TRMEWXdf"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="eRM5pcDj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C5DC206E5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ra0v4QN0AvRt3/OqE9MQyHFUX4qq1P5/wge+W+NyONE=; b=TRMEWXdfmG8fCF5OTVwQ+S1Zi LCF0bs0no3/R6qSNzUdD9L7WzkI0kqQnaS2LBBcWu5wtbGE6MaO8nivnmL+btSdJxQDpuK9yPaZzM L0esjhgZV9+Y/P9n8H4RZz+Tzy3hicarbaGQ77akp9lvwvU1YKfQSKH0j4zYLMRQTMx2hl6EAw4ra 6PtdIaGqR3tC/KvEinatbPrpwGuJ6VNB61JBRsn06wM6m/SmSqh9O7b/FoRqngiJMGu2JBEpqw/NS WqLKNTDh9cJtdFK7mlCxRtLXIjG0H14UtRXORNRvpb9LQggogHy2peRqTecCqGuNCK0oAKUiqg/qZ XTBX0RBzQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khg8D-0005h2-Vt; Tue, 24 Nov 2020 21:45:50 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khg89-0005ft-P0 for linux-arm-kernel@lists.infradead.org; Tue, 24 Nov 2020 21:45:48 +0000 Received: by mail-pg1-x542.google.com with SMTP id m9so406462pgb.4 for ; Tue, 24 Nov 2020 13:45:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qUk28dgg2DUj1+6HYL179P0h9eGbzR54HIME/VXKOvg=; b=eRM5pcDjTejd77WL4qH2l3Waz69TXUmimfeFmBp2KHeoI2kfUj04HHD+5AX5l7h/w1 itFs9VMoa+OfcKZEFM2+nNziTHhP1TuagNH1mSUGrd7szPzTIDoItWAQpcFZaq7E0jDr YVscjYb/iBIjuSqEbH0Z5p2PzgyBUZdEvhQRI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qUk28dgg2DUj1+6HYL179P0h9eGbzR54HIME/VXKOvg=; b=ppGW8ARYfW5+UGNV4SEboFqymwmhjNfNwcjVfScZhFIqMKw4sXS+/GWskKurVzx/rq RzL6hGtPsV2iSuq6U5bSS0hb/SKZRRwFhJY8KM5gU5zREiyzN+JOEv36zkHwUVAhnFvd hzAZgSRKun+pvheg8y6VP11ssBPhkrTrp6q4X4ckXqSIjVA/bAIW/g8L7PZQQJsL1MVN ODih2PAmyPydsgsFY/SQTCZr57zZqYknJyOpIYgRDkwXbzYRtagFE9QbNNMl3iNCn4l9 intgfCtoaQ9KPk9hdFkHoDjonMz9TurqKOYY8cs21FHrgzX4lrDEvJLxElZOEUhhgPV5 gboQ== X-Gm-Message-State: AOAM531C+hCN0Xrz41wTqkvtjsIn4uhyDT0d1uQ8KdVd4xncmRyiycKs wNA1z/6SwXRdE3yEYshp/7y9eg== X-Google-Smtp-Source: ABdhPJwv8R+bkXuk+Z/BW6O2He05dVF33WUNfAsVqf9ApwHY3+AZ3TRvyrcxfXYudQSX8IyrNUawFA== X-Received: by 2002:a63:cf52:: with SMTP id b18mr344446pgj.338.1606254343911; Tue, 24 Nov 2020 13:45:43 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z10sm17931pfa.149.2020.11.24.13.45.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 13:45:43 -0800 (PST) Date: Tue, 24 Nov 2020 13:45:42 -0800 From: Kees Cook To: Gabriel Krisman Bertazi Subject: Re: [PATCH] entry: Fix boot for !CONFIG_GENERIC_ENTRY Message-ID: <202011241345.FAF4D7E@keescook> References: <87h7pgqhdf.fsf@collabora.com> <87a6v8qd9p.fsf_-_@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87a6v8qd9p.fsf_-_@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201124_164545_875930_C43419C7 X-CRM114-Status: GOOD ( 18.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sumit Semwal , Arnd Bergmann , Song Liu , Arnd Bergmann , Daniel Borkmann , Jann Horn , YiFei Zhu , Netdev , Naresh Kamboju , open list , lkft-triage@lists.linaro.org, Andy Lutomirski , Andy Lutomirski , Yonghong Song , Thomas Gleixner , Andrii Nakryiko , bpf , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 23, 2020 at 10:54:58AM -0500, Gabriel Krisman Bertazi wrote: > Gabriel Krisman Bertazi writes: > > > Jann Horn writes: > >> As part of fixing this, it might be a good idea to put "enum > >> syscall_work_bit" behind a "#ifdef CONFIG_GENERIC_ENTRY" to avoid > >> future accidents like this? > > > > Hi Jan, Arnd, > > > > That is correct. This is a copy pasta mistake. My apologies. I didn't > > have a !GENERIC_ENTRY device to test, but just the ifdef would have > > caught it. > > I have patched it as suggested. Tested on qemu for arm32 and on bare > metal for x86-64. > > Once again, my apologies for the mistake. > > -- >8 -- > Subject: [PATCH] entry: Fix boot for !CONFIG_GENERIC_ENTRY > > A copy-pasta mistake tries to set SYSCALL_WORK flags instead of TIF > flags for !CONFIG_GENERIC_ENTRY. Also, add safeguards to catch this at > compilation time. > > Reported-by: Naresh Kamboju > Suggested-by: Jann Horn > Signed-off-by: Gabriel Krisman Bertazi Thanks for getting this fixed! 3136b93c3fb2 ("entry: Expose helpers to migrate TIF to SYSCALL_WORK flags") Reviewed-by: Kees Cook -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel