From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jb4sp-0007mf-WA for linux-um@lists.infradead.org; Tue, 19 May 2020 16:14:25 +0000 Date: Tue, 19 May 2020 18:14:18 +0200 From: Christoph Hellwig Subject: Re: [PATCH 11/20] bpf: factor out a bpf_trace_copy_string helper Message-ID: <20200519161418.GA26545@lst.de> References: <20200519134449.1466624-1-hch@lst.de> <20200519134449.1466624-12-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: Linus Torvalds Cc: linux-parisc@vger.kernel.org, Daniel Borkmann , Netdev , the arch/x86 maintainers , linux-um , Alexei Starovoitov , Linux Kernel Mailing List , Linux-MM , bpf@vger.kernel.org, Masami Hiramatsu , Andrew Morton , Christoph Hellwig On Tue, May 19, 2020 at 09:07:55AM -0700, Linus Torvalds wrote: > On Tue, May 19, 2020 at 6:45 AM Christoph Hellwig wrote: > > > > + switch (fmt_ptype) { > > + case 's': > > +#ifdef CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE > > + strncpy_from_unsafe(buf, unsafe_ptr, bufsz); > > + break; > > +#endif > > + case 'k': > > + strncpy_from_kernel_nofault(buf, unsafe_ptr, bufsz); > > + break; > > That 's' case needs a "fallthrough;" for the overlapping case, > methinks. Otherwise you'll get warnings. I don't think we need it as the case of case 'a': case 'b': do_stuff(); break; has always been fine even with the fallthough warnings. And the rest of the stuff gets removed by cpp.. _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um