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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 2ACECC433E1 for ; Tue, 30 Jun 2020 21:58:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 02C3F206B6 for ; Tue, 30 Jun 2020 21:58:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iJODyCvU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726654AbgF3V6M (ORCPT ); Tue, 30 Jun 2020 17:58:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726123AbgF3V6L (ORCPT ); Tue, 30 Jun 2020 17:58:11 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40591C061755; Tue, 30 Jun 2020 14:58:11 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id d17so9778881ljl.3; Tue, 30 Jun 2020 14:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RR/UNoI7uOiKww7o9+rFTcbImZ17UI5RyQbYWAUPpvM=; b=iJODyCvU2nZ44YgjY0+h7PYFr8bUm1v/dfcPFTwyhwfUTbQtYDODJNoZKcMdJvlKX0 L5q/qZi5MVLiWFoe7z+Sb57bxais8fPl62U6luMni2am6yZwHMab7pN/ysPQnK9q36sc eOzOHSRutQ/RYWsoDaZFk/icfmYv1u9EPm6/9IXBOe413QEbAJiw+YeRHluCLU0Rzqsq LOg/zjJwykLIqewbAO80JRafO5N0U7qpMf9HeklaG/D0vGjHgLOAijxNevggEgHCT7wz xTHPxz5DJ1+XDASvmnurklA5+gjMejTBkVebCHY4HcPyoTQIDvM64o4W6EFHVLSqg7IF GS9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RR/UNoI7uOiKww7o9+rFTcbImZ17UI5RyQbYWAUPpvM=; b=d55gFnIowzNjiq+1bwK8EXUY1PAMZMnyM/2aaCh92h5Tqioq8/xnJxwSkehNo6ewKv /QAcTRpeScgPEdi6EcqWRf0Mfy5wwBX1+/BNCAN5VakWfnCQnpCfCLnpRtgfqdb9naYA a0xtr7NZU0fIY0OYguiqtZNzuAD44nAQhzEc4Jkvkmp5H0lEXvVPvVF2psMi+kQiVpnk In9mypncT9sxQhtTCBhexUNMaerSWi8ncrQ1SqILFbJvdf/Wo+E08Skm5zT3WUTizHFr sLh7H7ht87ZjGiRhKgk4eacXTroaiYHkj+swLsnv0SV0oNcBFXTOO2ETog+aNZY2z/TV sMXg== X-Gm-Message-State: AOAM531ODlB+6iCH1ayvR98Pzc01T2AmRzbUuOu3NPsqAe2ytDgrbFtJ 27vSZ5mLr9xOYvXsuS/ORBFuUo4X5krmKNRLF08= X-Google-Smtp-Source: ABdhPJxMOq1MHbq9NqdaWC/RlC3zbcLh0U2x964uF2dtLoJiI7GgbNv49vIL8FhnvXggN3dxv2yfLtKmgwYP1ngfZZ4= X-Received: by 2002:a2e:9a0f:: with SMTP id o15mr12006024lji.450.1593554289688; Tue, 30 Jun 2020 14:58:09 -0700 (PDT) MIME-Version: 1.0 References: <20200625.123437.2219826613137938086.davem@davemloft.net> <87pn9mgfc2.fsf_-_@x220.int.ebiederm.org> <40720db5-92f0-4b5b-3d8a-beb78464a57f@i-love.sakura.ne.jp> <87366g8y1e.fsf@x220.int.ebiederm.org> <20200628194440.puzh7nhdnk6i4rqj@ast-mbp.dhcp.thefacebook.com> <874kqt39qo.fsf@x220.int.ebiederm.org> <6a9dd8be-333a-fd21-d125-ec20fb7c81df@i-love.sakura.ne.jp> <20200630164817.txa2jewfvk4stajy@ast-mbp.dhcp.thefacebook.com> In-Reply-To: From: Alexei Starovoitov Date: Tue, 30 Jun 2020 14:57:58 -0700 Message-ID: Subject: Re: [PATCH 00/14] Make the user mode driver code a better citizen To: Tetsuo Handa Cc: "Eric W. Biederman" , Linus Torvalds , David Miller , Greg Kroah-Hartman , Kees Cook , Andrew Morton , Alexei Starovoitov , Al Viro , bpf , linux-fsdevel , Daniel Borkmann , Jakub Kicinski , Masahiro Yamada , Gary Lin , Bruno Meneguele , LSM List , Casey Schaufler Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: On Tue, Jun 30, 2020 at 2:55 PM Tetsuo Handa wrote: > > On 2020/07/01 1:48, Alexei Starovoitov wrote: > > On Tue, Jun 30, 2020 at 03:28:49PM +0900, Tetsuo Handa wrote: > >> On 2020/06/30 5:19, Eric W. Biederman wrote: > >>> Tetsuo Handa writes: > >>> > >>>> On 2020/06/29 4:44, Alexei Starovoitov wrote: > >>>>> But all the defensive programming kinda goes against general kernel style. > >>>>> I wouldn't do it. Especially pr_info() ?! > >>>>> Though I don't feel strongly about it. > >>>> > >>>> Honestly speaking, caller should check for errors and print appropriate > >>>> messages. info->wd.mnt->mnt_root != info->wd.dentry indicates that something > >>>> went wrong (maybe memory corruption). But other conditions are not fatal. > >>>> That is, I consider even pr_info() here should be unnecessary. > >>> > >>> They were all should never happen cases. Which is why my patches do: > >>> if (WARN_ON_ONCE(...)) > >> > >> No. Fuzz testing (which uses panic_on_warn=1) will trivially hit them. > > > > I don't believe that's true. > > Please show fuzzing stack trace to prove your point. > > > > Please find links containing "WARNING" from https://syzkaller.appspot.com/upstream . ;-) Is it a joke? Do you understand how syzbot works? If so, please explain how it can invoke umd_* interface.