* Re: [PATCH 3/5] libceph: crush_location infrastructure
From: Jeff Layton @ 2020-05-29 19:10 UTC (permalink / raw)
To: Ilya Dryomov; +Cc: Ceph Development
In-Reply-To: <CAOi1vP-UPktbA7gcx0tQvN9wi1L2DB1zHyb212x5kbErkchR=Q@mail.gmail.com>
On Fri, 2020-05-29 at 20:38 +0200, Ilya Dryomov wrote:
> On Fri, May 29, 2020 at 7:27 PM Jeff Layton <jlayton@kernel.org> wrote:
> > On Fri, 2020-05-29 at 17:19 +0200, Ilya Dryomov wrote:
> > > Allow expressing client's location in terms of CRUSH hierarchy as
> > > a set of (bucket type name, bucket name) pairs. The userspace syntax
> > > "crush_location = key1=value1 key2=value2" is incompatible with mount
> > > options and needed adaptation:
> > >
> > > - ':' separator
> > > - one key:value pair per crush_location option
> > > - crush_location options are combined together
> > >
> > > So for:
> > >
> > > crush_location = host=foo rack=bar
> > >
> > > one would write:
> > >
> > > crush_location=host:foo,crush_location=rack:bar
> > >
> > > As in userspace, "multipath" locations are supported, so indicating
> > > locality for parallel hierarchies is possible:
> > >
> > > crush_location=rack:foo1,crush_location=rack:foo2,crush_location=datacenter:bar
> > >
> >
> > Blech, that syntax is hideous. It's also problematic in that the options
> > are additive -- you can't override an option that was given earlier
> > (e.g. in fstab), or in a shell script.
> >
> > Is it not possible to do something with a single crush_location= option?
> > Maybe:
> >
> > crush_location=rack:foo1/rack:foo2/datacenter:bar
> >
> > It's still ugly with the embedded '=' signs, but it would at least make
> > it so that the options aren't additive.
>
> I suppose we could do something like that at the cost of more
> parsing boilerplate, but I'm not sure additive options are that
> hideous. I don't think additive options are unprecedented and
> more importantly I think many simple boolean and integer options
> are not properly overridable even in major filesystems.
>
That is the long-standing convention though. There are reasons to
deviate from it, but I don't see it here. Plus, I think the syntax I
proposed above is more readable (and compact) as well.
It would mean a bit more parsing code though, granted.
> What embedded '=' signs are you referring to? I see ':' and '/'
> in your suggested syntax.
>
Sorry, yeah... I had originally done one that had '=' chars in it, but
converted it to the above. Please disregard that paragraph.
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply
* Re: [PATCH v2 3/3] selftests/seccomp: Test SECCOMP_IOCTL_NOTIF_ADDFD
From: Tycho Andersen @ 2020-05-29 19:12 UTC (permalink / raw)
To: Sargun Dhillon
Cc: Kees Cook, christian.brauner, containers, cyphar, jannh, jeffv,
linux-api, linux-kernel, palmer, rsesek, Matt Denton
In-Reply-To: <20200529184606.GB11153@ircssh-2.c.rugged-nimbus-611.internal>
On Fri, May 29, 2020 at 06:46:07PM +0000, Sargun Dhillon wrote:
> On Fri, May 29, 2020 at 12:41:51AM -0700, Kees Cook wrote:
> > On Thu, May 28, 2020 at 04:08:58AM -0700, Sargun Dhillon wrote:
> > > + EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0);
> > > +
> > > + nextid = req.id + 1;
> > > +
> > > + /* Wait for getppid to be called for the second time */
> > > + sleep(1);
> >
> > I always rebel at finding "sleep" in tests. ;) Is this needed? IIUC,
> > userspace will immediately see EINPROGRESS after the NOTIF_SEND
> > finishes, yes?
> >
> > Otherwise, yes, this looks good.
> >
> > --
> > Kees Cook
> I'm open to better suggestions, but there's a race where if getppid
> is not called before the second SECCOMP_IOCTL_NOTIF_ADDFD is called,
> you will just get an ENOENT, since the notification ID is not found.
Ah, I see. The goal is to test the -EINPROGRESS here.
If you use write() instead of getppid(), and write to a socket, will
that work? The parent can block for the read, and once some thing has
been read it can test for -EINPROGRESS.
The user_notification_signal test does something similar.
Tycho
^ permalink raw reply
* Re: [PATCH v4 1/5] rebase -i: add --ignore-whitespace flag
From: Johannes Schindelin @ 2020-05-29 2:38 UTC (permalink / raw)
To: Phillip Wood
Cc: Junio C Hamano, Elijah Newren, Rohit Ashiwal,
Đoàn Trần Công Danh, Alban Gruin,
Git Mailing List
In-Reply-To: <20200527173356.47364-2-phillip.wood123@gmail.com>
Hi Phillip,
sorry to be _so_ late in the game. (And sorry for sending this to you
twice, I managed to skip all the Cc:s due to the Reply-To: header the
first time round.)
On Wed, 27 May 2020, Phillip Wood wrote:
> From: Rohit Ashiwal <rohit.ashiwal265@gmail.com>
>
> Rebase is implemented with two different backends - 'apply' and 'merge'
> each of which support a different set of options. In particuar the apply
> backend supports a number of options implemented by 'git am' that are
> not available to the merge backend. As part of an on going effort to
As a non-native speaker, I am thrown off when reading "available to"
instead of the grammatically correct (I believe) "available in". Likewise,
"on going" instead of "ongoing" just disrupts my workflow.
Maybe these can be fixed?
> remove the apply backend this patch adds support for the
> --ignore-whitespace option to the merge backend. This option treats
> lines with only whitespace changes as unchanged and is implemented in
> the merge backend by translating it to -Xignore-space-change.
>
> Signed-off-by: Rohit Ashiwal <rohit.ashiwal265@gmail.com>
> Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
> ---
> Documentation/git-rebase.txt | 19 +++++-
> builtin/rebase.c | 19 ++++--
> t/t3422-rebase-incompatible-options.sh | 1 -
> t/t3436-rebase-more-options.sh | 86 ++++++++++++++++++++++++++
> 4 files changed, 118 insertions(+), 7 deletions(-)
> create mode 100755 t/t3436-rebase-more-options.sh
>
> diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
> index f7a6033607..b003784f01 100644
> --- a/Documentation/git-rebase.txt
> +++ b/Documentation/git-rebase.txt
> @@ -422,8 +422,23 @@ your branch contains commits which were dropped, this option can be used
> with `--keep-base` in order to drop those commits from your branch.
>
> --ignore-whitespace::
> + Ignore whitespace differences when trying to reconcile
> +differences. Currently, each backend implements an approximation of
> +this behavior:
> ++
> +apply backend: When applying a patch, ignore changes in whitespace in
> +context lines. Unfortunately, this means that if the "old" lines being
> +replaced by the patch differ only in whitespace from the existing
> +file, you will get a merge conflict instead of a successful patch
> +application.
> ++
> +merge backend: Treat lines with only whitespace changes as unchanged
> +when merging. Unfortunately, this means that any patch hunks that were
> +intended to modify whitespace and nothing else will be dropped, even
> +if the other side had no changes that conflicted.
> +
> --whitespace=<option>::
> - These flags are passed to the 'git apply' program
> + This flag is passed to the 'git apply' program
> (see linkgit:git-apply[1]) that applies the patch.
> Implies --apply.
> +
> @@ -572,7 +587,6 @@ The following options:
> * --apply
> * --committer-date-is-author-date
> * --ignore-date
> - * --ignore-whitespace
> * --whitespace
> * -C
>
> @@ -598,6 +612,7 @@ In addition, the following pairs of options are incompatible:
> * --preserve-merges and --signoff
> * --preserve-merges and --rebase-merges
> * --preserve-merges and --empty=
> + * --preserve-merges and --ignore-whitespace
> * --keep-base and --onto
> * --keep-base and --root
>
> diff --git a/builtin/rebase.c b/builtin/rebase.c
> index 27a07d4e78..5d8e117276 100644
> --- a/builtin/rebase.c
> +++ b/builtin/rebase.c
> @@ -86,6 +86,7 @@ struct rebase_options {
> int signoff;
> int allow_rerere_autoupdate;
> int autosquash;
> + int ignore_whitespace;
> char *gpg_sign_opt;
> int autostash;
> char *cmd;
> @@ -108,6 +109,7 @@ struct rebase_options {
>
> static struct replay_opts get_replay_opts(const struct rebase_options *opts)
> {
> + struct strbuf strategy_buf = STRBUF_INIT;
> struct replay_opts replay = REPLAY_OPTS_INIT;
>
> replay.action = REPLAY_INTERACTIVE_REBASE;
> @@ -126,14 +128,20 @@ static struct replay_opts get_replay_opts(const struct rebase_options *opts)
> replay.reschedule_failed_exec = opts->reschedule_failed_exec;
> replay.gpg_sign = xstrdup_or_null(opts->gpg_sign_opt);
> replay.strategy = opts->strategy;
> +
> if (opts->strategy_opts)
> - parse_strategy_opts(&replay, opts->strategy_opts);
> + strbuf_addstr(&strategy_buf, opts->strategy_opts);
> + if (opts->ignore_whitespace)
> + strbuf_addstr(&strategy_buf, " --ignore-space-change");
> + if (strategy_buf.len)
> + parse_strategy_opts(&replay, strategy_buf.buf);
Quite honestly, this is very, very ugly.
I would have expected this at a way earlier layer, namely in
`cmd__rebase()`. Something along these lines:
-- snip --
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 37ba76ac3d26..748e08aee2f2 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -1289,6 +1289,7 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
struct strbuf revisions = STRBUF_INIT;
struct strbuf buf = STRBUF_INIT;
struct object_id merge_base;
+ int ignore_whitespace = 0;
enum action action = ACTION_NONE;
const char *gpg_sign = NULL;
struct string_list exec = STRING_LIST_INIT_NODUP;
@@ -1318,9 +1319,8 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
PARSE_OPT_NOARG, NULL, REBASE_DIFFSTAT },
OPT_BOOL(0, "signoff", &options.signoff,
N_("add a Signed-off-by: line to each commit")),
- OPT_PASSTHRU_ARGV(0, "ignore-whitespace", &options.git_am_opts,
- NULL, N_("passed to 'git am'"),
- PARSE_OPT_NOARG),
+ OPT_BOOL(0, "ignore-whitespace", &ignore_whitespace,
+ N_("passed to 'git am'")),
OPT_PASSTHRU_ARGV(0, "committer-date-is-author-date",
&options.git_am_opts, NULL,
N_("passed to 'git am'"), PARSE_OPT_NOARG),
@@ -1682,6 +1682,15 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
imply_merge(&options, "--rebase-merges");
}
+ if (ignore_whitespace) {
+ if (options.type == REBASE_APPLY)
+ argv_array_push(&options.git_am_opts,
+ "--ignore-whitespace");
+ else
+ string_list_append(&stragey_options,
+ "--ignore-space-change");
+ }
+
if (strategy_options.nr) {
int i;
-- snap --
>
> if (opts->squash_onto) {
> oidcpy(&replay.squash_onto, opts->squash_onto);
> replay.have_squash_onto = 1;
> }
>
> + strbuf_release(&strategy_buf);
> return replay;
> }
>
> @@ -539,6 +547,8 @@ int cmd_rebase__interactive(int argc, const char **argv, const char *prefix)
> argc = parse_options(argc, argv, prefix, options,
> builtin_rebase_interactive_usage, PARSE_OPT_KEEP_ARGV0);
>
> + opts.strategy_opts = xstrdup_or_null(opts.strategy_opts);
I am not sure what this is about: `opts.strategy_opts` is of type `char
*`, i.e. it is supposed to be already allocated.
Not that `cmd_rebase__interactive()` matters _all_ that much anymore, of
course: it is only used by the --preserve-merges backend, which will
hopefully be retired soon.
> +
> if (!is_null_oid(&squash_onto))
> opts.squash_onto = &squash_onto;
>
> @@ -991,6 +1001,8 @@ static int run_am(struct rebase_options *opts)
> am.git_cmd = 1;
> argv_array_push(&am.args, "am");
>
> + if (opts->ignore_whitespace)
> + argv_array_push(&am.args, "--ignore-whitespace");
> if (opts->action && !strcmp("continue", opts->action)) {
> argv_array_push(&am.args, "--resolved");
> argv_array_pushf(&am.args, "--resolvemsg=%s", resolvemsg);
> @@ -1495,16 +1507,15 @@ int cmd_rebase(int argc, const char **argv, const char *prefix)
> PARSE_OPT_NOARG, NULL, REBASE_DIFFSTAT },
> OPT_BOOL(0, "signoff", &options.signoff,
> N_("add a Signed-off-by: line to each commit")),
> - OPT_PASSTHRU_ARGV(0, "ignore-whitespace", &options.git_am_opts,
> - NULL, N_("passed to 'git am'"),
> - PARSE_OPT_NOARG),
> OPT_PASSTHRU_ARGV(0, "committer-date-is-author-date",
> &options.git_am_opts, NULL,
> N_("passed to 'git am'"), PARSE_OPT_NOARG),
> OPT_PASSTHRU_ARGV(0, "ignore-date", &options.git_am_opts, NULL,
> N_("passed to 'git am'"), PARSE_OPT_NOARG),
> OPT_PASSTHRU_ARGV('C', NULL, &options.git_am_opts, N_("n"),
> N_("passed to 'git apply'"), 0),
> + OPT_BOOL(0, "ignore-whitespace", &options.ignore_whitespace,
> + N_("ignore changes in whitespace")),
> OPT_PASSTHRU_ARGV(0, "whitespace", &options.git_am_opts,
> N_("action"), N_("passed to 'git apply'"), 0),
> OPT_BIT('f', "force-rebase", &options.flags,
> diff --git a/t/t3422-rebase-incompatible-options.sh b/t/t3422-rebase-incompatible-options.sh
> index 50e7960702..55ca46786d 100755
> --- a/t/t3422-rebase-incompatible-options.sh
> +++ b/t/t3422-rebase-incompatible-options.sh
> @@ -61,7 +61,6 @@ test_rebase_am_only () {
> }
>
> test_rebase_am_only --whitespace=fix
> -test_rebase_am_only --ignore-whitespace
> test_rebase_am_only --committer-date-is-author-date
> test_rebase_am_only -C4
>
> diff --git a/t/t3436-rebase-more-options.sh b/t/t3436-rebase-more-options.sh
> new file mode 100755
> index 0000000000..fb5e747e86
> --- /dev/null
> +++ b/t/t3436-rebase-more-options.sh
> @@ -0,0 +1,86 @@
> +#!/bin/sh
> +#
> +# Copyright (c) 2019 Rohit Ashiwal
> +#
> +
> +test_description='tests to ensure compatibility between am and interactive backends'
> +
> +. ./test-lib.sh
> +
> +. "$TEST_DIRECTORY"/lib-rebase.sh
> +
> +# This is a special case in which both am and interactive backends
> +# provide the same output. It was done intentionally because
> +# both the backends fall short of optimal behaviour.
> +test_expect_success 'setup' '
> + git checkout -b topic &&
> + q_to_tab >file <<-\EOF &&
> + line 1
> + Qline 2
> + line 3
> + EOF
> + git add file &&
> + git commit -m "add file" &&
> + cat >file <<-\EOF &&
> + line 1
> + new line 2
> + line 3
> + EOF
> + git commit -am "update file" &&
> + git tag side &&
> +
> + git checkout --orphan master &&
> + sed -e "s/^|//" >file <<-\EOF &&
> + |line 1
> + | line 2
> + |line 3
> + EOF
> + git add file &&
> + git commit -m "add file" &&
> + git tag main
> +'
The file contents are repeated in an awfully repetitive manner. That not
only makes things a bit hard to read, it also makes it all too easy to
slip in bugs by mistake. How about something like this instead?
test_commit file &&
test_write_lines line1 Qline2 line3 >templ &&
q_to_tab <templ >file.t &&
git commit -m tab file.t &&
sed "s/Q/new /" <templ >file.t &&
git commit -m new file.t &&
git tag side &&
git checkout file -- &&
sed "s/Q/ /" <templ >file.t &&
git commit -m spaces file.t
... and then...
> +
> +test_expect_success '--ignore-whitespace works with apply backend' '
> + cat >expect <<-\EOF &&
> + line 1
> + new line 2
> + line 3
> + EOF
sed "s/Q/new /" <templ >expect
> + test_must_fail git rebase --apply main side &&
> + git rebase --abort &&
> + git rebase --apply --ignore-whitespace main side &&
> + test_cmp expect file
Personally, I prefer to read the contents of `expect` directly before the
`test_cmp expect file.t`
> +'
> +
> +test_expect_success '--ignore-whitespace works with merge backend' '
> + cat >expect <<-\EOF &&
> + line 1
> + new line 2
> + line 3
> + EOF
Isn't this totally identical to the `expect` constructed earlier? And in
any case, isn't this identical to `git show main:file.t`, which is what we
_actually_ expect: for the file contents to be identical to the tagged
`main`? I.e.
git diff --exit-code main
> + test_must_fail git rebase --merge main side &&
> + git rebase --abort &&
> + git rebase --merge --ignore-whitespace main side &&
> + test_cmp expect file
> +'
> +
> +test_expect_success '--ignore-whitespace is remembered when continuing' '
> + cat >expect <<-\EOF &&
> + line 1
> + new line 2
> + line 3
> + EOF
> + (
> + set_fake_editor &&
> + FAKE_LINES="break 1" git rebase -i --ignore-whitespace main side
> + ) &&
> + git rebase --continue &&
> + test_cmp expect file
It is a bit funny to see these two invocations _specifically_ pulled out
from the subshell, that's not how we do things in other test scripts:
instead, we run all the Git commands _inside_ the subshell, and all the
verifications after the subshell.
I believe that with my suggestions, this test script will be a ton easier
to read and to maintain. At least it will be a lot DRYer.
Ciao,
Dscho
> +'
> +
> +# This must be the last test in this file
> +test_expect_success '$EDITOR and friends are unchanged' '
> + test_editor_unchanged
> +'
> +
> +test_done
> --
> 2.26.2
>
>
^ permalink raw reply related
* [PATCH v2] kasan: fix clang compilation warning due to stack protector
From: Andrey Konovalov @ 2020-05-29 19:12 UTC (permalink / raw)
To: Andrew Morton, Andrey Ryabinin
Cc: Alexander Potapenko, Dmitry Vyukov, Marco Elver, kasan-dev,
linux-mm, linux-kernel, Qian Cai, Andrey Konovalov
KASAN uses a single cc-option invocation to disable both conserve-stack
and stack-protector flags. The former flag is not present in Clang, which
causes cc-option to fail, and results in stack-protector being enabled.
Fix by using separate cc-option calls for each flag. Also collect all
flags in a variable to avoid calling cc-option multiple times for
different files.
Reported-by: Qian Cai <cai@lca.pw>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
---
Changes v1 -> v2:
- Renamed CC_FLAGS_KASAN_CONFLICT to CC_FLAGS_KASAN_RUNTIME.
---
mm/kasan/Makefile | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/mm/kasan/Makefile b/mm/kasan/Makefile
index de3121848ddf..d532c2587731 100644
--- a/mm/kasan/Makefile
+++ b/mm/kasan/Makefile
@@ -15,14 +15,19 @@ CFLAGS_REMOVE_tags_report.o = $(CC_FLAGS_FTRACE)
# Function splitter causes unnecessary splits in __asan_load1/__asan_store1
# see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63533
-CFLAGS_common.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
-CFLAGS_generic.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
-CFLAGS_generic_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
-CFLAGS_init.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
-CFLAGS_quarantine.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
-CFLAGS_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
-CFLAGS_tags.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
-CFLAGS_tags_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
+CC_FLAGS_KASAN_RUNTIME := $(call cc-option, -fno-conserve-stack)
+CC_FLAGS_KASAN_RUNTIME += $(call cc-option, -fno-stack-protector)
+# Disable branch tracing to avoid recursion.
+CC_FLAGS_KASAN_RUNTIME += -DDISABLE_BRANCH_PROFILING
+
+CFLAGS_common.o := $(CC_FLAGS_KASAN_RUNTIME)
+CFLAGS_generic.o := $(CC_FLAGS_KASAN_RUNTIME)
+CFLAGS_generic_report.o := $(CC_FLAGS_KASAN_RUNTIME)
+CFLAGS_init.o := $(CC_FLAGS_KASAN_RUNTIME)
+CFLAGS_quarantine.o := $(CC_FLAGS_KASAN_RUNTIME)
+CFLAGS_report.o := $(CC_FLAGS_KASAN_RUNTIME)
+CFLAGS_tags.o := $(CC_FLAGS_KASAN_RUNTIME)
+CFLAGS_tags_report.o := $(CC_FLAGS_KASAN_RUNTIME)
obj-$(CONFIG_KASAN) := common.o init.o report.o
obj-$(CONFIG_KASAN_GENERIC) += generic.o generic_report.o quarantine.o
--
2.27.0.rc0.183.gde8f92d652-goog
^ permalink raw reply related
* Re: [PATCH v3 03/13] RDMA/rds: Remove FMR support for memory registration
From: Jason Gunthorpe @ 2020-05-29 19:12 UTC (permalink / raw)
To: santosh.shilimkar
Cc: linux-rdma, netdev, aron.silverton, Max Gurtovoy, oren, shlomin,
vladimirk
In-Reply-To: <27824c0c-06ba-40dd-34c2-2888fe8db5c8@oracle.com>
On Thu, May 28, 2020 at 01:21:33PM -0700, santosh.shilimkar@oracle.com wrote:
> On 5/28/20 12:45 PM, Jason Gunthorpe wrote:
> > From: Max Gurtovoy <maxg@mellanox.com>
> >
> > Use FRWR method for memory registration by default and remove the ancient
> > and unsafe FMR method.
> >
> > Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
> > Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
>
> > net/rds/Makefile | 2 +-
> > net/rds/ib.c | 20 ++--
> > net/rds/ib.h | 2 -
> > net/rds/ib_cm.c | 4 +-
> > net/rds/ib_fmr.c | 269 ----------------------------------------------
> > net/rds/ib_frmr.c | 4 +-
> > net/rds/ib_mr.h | 14 +--
> > net/rds/ib_rdma.c | 28 ++---
> > 8 files changed, 21 insertions(+), 322 deletions(-)
> > delete mode 100644 net/rds/ib_fmr.c
> >
> Patch looks accurate to me Jason/Max. I wanted to get few regression
> tests run with it before providing the ack. Will send a note once
> its tested ok.
Okay, since we are at the merge window I'm going to put it in
linux-next to look for build regressions with the idea to send it on
Thursday
Thanks,
Jason
^ permalink raw reply
* Re: [net 3/6] net/mlx5e: Remove warning "devices are not on same switch HW"
From: Jakub Kicinski @ 2020-05-29 19:12 UTC (permalink / raw)
To: Saeed Mahameed; +Cc: David S. Miller, netdev, Maor Dickman, Roi Dayan
In-Reply-To: <20200529065645.118386-4-saeedm@mellanox.com>
On Thu, 28 May 2020 23:56:42 -0700 Saeed Mahameed wrote:
> From: Maor Dickman <maord@mellanox.com>
>
> On tunnel decap rule insertion, the indirect mechanism will attempt to
> offload the rule on all uplink representors which will trigger the
> "devices are not on same switch HW, can't offload forwarding" message
> for the uplink which isn't on the same switch HW as the VF representor.
>
> The above flow is valid and shouldn't cause warning message,
> fix by removing the warning and only report this flow using extack.
>
> Fixes: f3953003a66f ("net/mlx5e: Fix allowed tc redirect merged eswitch offload cases")
> Signed-off-by: Maor Dickman <maord@mellanox.com>
> Reviewed-by: Roi Dayan <roid@mellanox.com>
> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Fixes tag: Fixes: f3953003a66f ("net/mlx5e: Fix allowed tc redirect merged eswitch offload cases")
Has these problem(s):
- Target SHA1 does not exist
^ permalink raw reply
* Re: [PATCH] kasan: fix clang compilation warning due to stack protector
From: Andrey Konovalov @ 2020-05-29 19:13 UTC (permalink / raw)
To: Marco Elver
Cc: Andrew Morton, Andrey Ryabinin, Alexander Potapenko,
Dmitry Vyukov, kasan-dev, Linux Memory Management List, LKML,
Qian Cai
In-Reply-To: <CANpmjNPr5MrwPFOW10pRkUgxwktXNiUweNj+pGJMunoZKi7Cdw@mail.gmail.com>
On Fri, May 29, 2020 at 4:56 PM Marco Elver <elver@google.com> wrote:
>
> On Thu, 28 May 2020 at 19:20, 'Andrey Konovalov' via kasan-dev
> <kasan-dev@googlegroups.com> wrote:
> >
> > KASAN uses a single cc-option invocation to disable both conserve-stack
> > and stack-protector flags. The former flag is not present in Clang, which
> > causes cc-option to fail, and results in stack-protector being enabled.
> >
> > Fix by using separate cc-option calls for each flag. Also collect all
> > flags in a variable to avoid calling cc-option multiple times for
> > different files.
> >
> > Reported-by: Qian Cai <cai@lca.pw>
> > Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> > ---
>
> Thank you! I was about to send an almost identical patch, as I
> encountered this when using clang.
>
> Reviewed-by: Marco Elver <elver@google.com>
>
> > mm/kasan/Makefile | 21 +++++++++++++--------
> > 1 file changed, 13 insertions(+), 8 deletions(-)
> >
> > diff --git a/mm/kasan/Makefile b/mm/kasan/Makefile
> > index de3121848ddf..bf6f7b1f6b18 100644
> > --- a/mm/kasan/Makefile
> > +++ b/mm/kasan/Makefile
> > @@ -15,14 +15,19 @@ CFLAGS_REMOVE_tags_report.o = $(CC_FLAGS_FTRACE)
> >
> > # Function splitter causes unnecessary splits in __asan_load1/__asan_store1
> > # see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63533
> > -CFLAGS_common.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> > -CFLAGS_generic.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> > -CFLAGS_generic_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> > -CFLAGS_init.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> > -CFLAGS_quarantine.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> > -CFLAGS_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> > -CFLAGS_tags.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> > -CFLAGS_tags_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> > +CC_FLAGS_KASAN_CONFLICT := $(call cc-option, -fno-conserve-stack)
> > +CC_FLAGS_KASAN_CONFLICT += $(call cc-option, -fno-stack-protector)
> > +# Disable branch tracing to avoid recursion.
> > +CC_FLAGS_KASAN_CONFLICT += -DDISABLE_BRANCH_PROFILING
>
> Note that maybe CC_FLAGS_KASAN_RUNTIME could be a better name, because
> other flags added in future might not be conflict-related. But until
> that future, it doesn't really matter.
CC_FLAGS_KASAN_RUNTIME is a better name, sent v2, thanks!
>
> > +CFLAGS_common.o := $(CC_FLAGS_KASAN_CONFLICT)
> > +CFLAGS_generic.o := $(CC_FLAGS_KASAN_CONFLICT)
> > +CFLAGS_generic_report.o := $(CC_FLAGS_KASAN_CONFLICT)
> > +CFLAGS_init.o := $(CC_FLAGS_KASAN_CONFLICT)
> > +CFLAGS_quarantine.o := $(CC_FLAGS_KASAN_CONFLICT)
> > +CFLAGS_report.o := $(CC_FLAGS_KASAN_CONFLICT)
> > +CFLAGS_tags.o := $(CC_FLAGS_KASAN_CONFLICT)
> > +CFLAGS_tags_report.o := $(CC_FLAGS_KASAN_CONFLICT)
> >
> > obj-$(CONFIG_KASAN) := common.o init.o report.o
> > obj-$(CONFIG_KASAN_GENERIC) += generic.o generic_report.o quarantine.o
> > --
> > 2.27.0.rc0.183.gde8f92d652-goog
> >
> > --
> > You received this message because you are subscribed to the Google Groups "kasan-dev" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/ced83584eec86a1a9ce264013cf6c0da5e0add6a.1590686292.git.andreyknvl%40google.com.
^ permalink raw reply
* Re: [PATCH 3/4] dt-bindings: timer: renesas,cmt: Document r8a7742 CMT support
From: Rob Herring @ 2020-05-29 19:14 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Lad Prabhakar, Magnus Damm, Linux-Renesas,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Linux Kernel Mailing List, Prabhakar
In-Reply-To: <CAMuHMdX+m7WixJiNJyrpHxjnp5vFHi3ULuT7QgPOA93NE1XiHQ@mail.gmail.com>
On Fri, May 29, 2020 at 02:53:02PM +0200, Geert Uytterhoeven wrote:
> Hi Prabhakar,
>
> On Wed, May 27, 2020 at 11:19 PM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> > Document SoC specific compatible strings for r8a7742. No driver change
> > is needed as the fallback strings will activate the right code.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Please note this DT binding is under yamlization, cfr.
> "[PATCH v2] dt-bindings: timer: renesas: cmt: Convert to json-schema"
> (20200505155127.4836-1-geert+renesas@glider.be).
Do I need to pick that one up? Doesn't look like it's been applied
AFAICT.
Rob
^ permalink raw reply
* Re: [PATCH v2 04/58] qdev: New qdev_new(), qdev_realize(), etc.
From: Alistair Francis @ 2020-05-29 19:04 UTC (permalink / raw)
To: Markus Armbruster
Cc: Michael S . Tsirkin, Alistair Francis, Mark Cave-Ayland,
qemu-devel@nongnu.org Developers, Gerd Hoffmann, David Gibson
In-Reply-To: <20200529134523.8477-5-armbru@redhat.com>
On Fri, May 29, 2020 at 7:03 AM Markus Armbruster <armbru@redhat.com> wrote:
>
> We commonly plug devices into their bus right when we create them,
> like this:
>
> dev = qdev_create(bus, type_name);
>
> Note that @dev is a weak reference. The reference from @bus to @dev
> is the only strong one.
>
> We realize at some later time, either with
>
> object_property_set_bool(OBJECT(dev), true, "realized", errp);
>
> or its convenience wrapper
>
> qdev_init_nofail(dev);
>
> If @dev still has no QOM parent then, realizing makes the
> /machine/unattached/ orphanage its QOM parent.
>
> Note that the device returned by qdev_create() is plugged into a bus,
> but doesn't have a QOM parent, yet. Until it acquires one,
> unrealizing the bus will hang in bus_unparent():
>
> while ((kid = QTAILQ_FIRST(&bus->children)) != NULL) {
> DeviceState *dev = kid->child;
> object_unparent(OBJECT(dev));
> }
>
> object_unparent() does nothing when its argument has no QOM parent,
> and the loop spins forever.
>
> Device state "no QOM parent, but plugged into bus" is dangerous.
>
> Paolo suggested to delay plugging into the bus until realize. We need
> to plug into the parent bus before we call the device's realize
> method, in case it uses the parent bus. So the dangerous state still
> exists, but only within realization, where we can manage it safely.
>
> This commit creates infrastructure to do this:
>
> dev = qdev_new(type_name);
> ...
> qdev_realize_and_unref(dev, bus, errp)
>
> Note that @dev becomes a strong reference here.
> qdev_realize_and_unref() drops it. There is also plain
> qdev_realize(), which doesn't drop it.
>
> The remainder of this series will convert all users to this new
> interface.
>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> Cc: Alistair Francis <alistair@alistair23.me>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> include/hw/qdev-core.h | 11 +++++-
> hw/core/bus.c | 14 +++++++
> hw/core/qdev.c | 90 ++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 114 insertions(+), 1 deletion(-)
>
> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
> index b870b27966..fba29308f7 100644
> --- a/include/hw/qdev-core.h
> +++ b/include/hw/qdev-core.h
> @@ -57,7 +57,7 @@ typedef void (*BusUnrealize)(BusState *bus);
> * After successful realization, setting static properties will fail.
> *
> * As an interim step, the #DeviceState:realized property can also be
> - * set with qdev_init_nofail().
> + * set with qdev_realize() or qdev_init_nofail().
> * In the future, devices will propagate this state change to their children
> * and along busses they expose.
> * The point in time will be deferred to machine creation, so that values
> @@ -322,7 +322,13 @@ compat_props_add(GPtrArray *arr,
>
> DeviceState *qdev_create(BusState *bus, const char *name);
> DeviceState *qdev_try_create(BusState *bus, const char *name);
> +DeviceState *qdev_new(const char *name);
> +DeviceState *qdev_try_new(const char *name);
> void qdev_init_nofail(DeviceState *dev);
> +bool qdev_realize(DeviceState *dev, BusState *bus, Error **errp);
> +bool qdev_realize_and_unref(DeviceState *dev, BusState *bus, Error **errp);
> +void qdev_unrealize(DeviceState *dev);
> +
> void qdev_set_legacy_instance_id(DeviceState *dev, int alias_id,
> int required_for_version);
> HotplugHandler *qdev_get_bus_hotplug_handler(DeviceState *dev);
> @@ -411,6 +417,9 @@ typedef int (qdev_walkerfn)(DeviceState *dev, void *opaque);
> void qbus_create_inplace(void *bus, size_t size, const char *typename,
> DeviceState *parent, const char *name);
> BusState *qbus_create(const char *typename, DeviceState *parent, const char *name);
> +bool qbus_realize(BusState *bus, Error **errp);
> +void qbus_unrealize(BusState *bus);
> +
> /* Returns > 0 if either devfn or busfn skip walk somewhere in cursion,
> * < 0 if either devfn or busfn terminate walk somewhere in cursion,
> * 0 otherwise. */
> diff --git a/hw/core/bus.c b/hw/core/bus.c
> index 33a4443217..6f6071f5fa 100644
> --- a/hw/core/bus.c
> +++ b/hw/core/bus.c
> @@ -164,6 +164,20 @@ BusState *qbus_create(const char *typename, DeviceState *parent, const char *nam
> return bus;
> }
>
> +bool qbus_realize(BusState *bus, Error **errp)
> +{
> + Error *err = NULL;
> +
> + object_property_set_bool(OBJECT(bus), true, "realized", &err);
> + error_propagate(errp, err);
> + return !err;
> +}
> +
> +void qbus_unrealize(BusState *bus)
> +{
> + object_property_set_bool(OBJECT(bus), false, "realized", &error_abort);
> +}
> +
> static bool bus_get_realized(Object *obj, Error **errp)
> {
> BusState *bus = BUS(obj);
> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
> index a68ba674db..f2c5cee278 100644
> --- a/hw/core/qdev.c
> +++ b/hw/core/qdev.c
> @@ -176,6 +176,32 @@ DeviceState *qdev_try_create(BusState *bus, const char *type)
> return dev;
> }
>
> +/*
> + * Create a device on the heap.
> + * A type @name must exist.
> + * This only initializes the device state structure and allows
> + * properties to be set. The device still needs to be realized. See
> + * qdev-core.h.
> + */
> +DeviceState *qdev_new(const char *name)
> +{
> + return DEVICE(object_new(name));
> +}
> +
> +/*
> + * Try to create a device on the heap.
> + * This is like qdev_new(), except it returns %NULL when type @name
> + * does not exist.
> + */
> +DeviceState *qdev_try_new(const char *name)
> +{
> + if (!object_class_by_name(name)) {
> + return NULL;
> + }
> +
> + return DEVICE(object_new(name));
> +}
> +
> static QTAILQ_HEAD(, DeviceListener) device_listeners
> = QTAILQ_HEAD_INITIALIZER(device_listeners);
>
> @@ -427,6 +453,66 @@ void qdev_init_nofail(DeviceState *dev)
> object_unref(OBJECT(dev));
> }
>
> +/*
> + * Realize @dev.
> + * @dev must not be plugged into a bus.
> + * Plug @dev into @bus if non-null, else into the main system bus.
> + * This takes a reference to @dev.
> + * If @dev has no QOM parent, make one up, taking another reference.
> + * On success, return true.
> + * On failure, store an error through @errp and return false.
> + */
> +bool qdev_realize(DeviceState *dev, BusState *bus, Error **errp)
> +{
> + Error *err = NULL;
> +
> + assert(!dev->realized && !dev->parent_bus);
> +
> + if (!bus) {
> + /*
> + * Assert that the device really is a SysBusDevice before we
> + * put it onto the sysbus. Non-sysbus devices which aren't
> + * being put onto a bus should be realized with
> + * object_property_set_bool(OBJECT(dev), true, "realized",
> + * errp);
> + */
> + g_assert(object_dynamic_cast(OBJECT(dev), TYPE_SYS_BUS_DEVICE));
> + bus = sysbus_get_default();
> + }
> +
> + qdev_set_parent_bus(dev, bus);
> +
> + object_property_set_bool(OBJECT(dev), true, "realized", &err);
> + if (err) {
> + error_propagate(errp, err);
> + }
> + return !err;
> +}
> +
> +/*
> + * Realize @dev and drop a reference.
> + * This is like qdev_realize(), except the caller must hold a
> + * (private) reference, which is dropped on return regardless of
> + * success or failure. Intended use:
> + * dev = qdev_new();
> + * [...]
> + * qdev_realize_and_unref(dev, bus, errp);
> + * Now @dev can go away without further ado.
> + */
> +bool qdev_realize_and_unref(DeviceState *dev, BusState *bus, Error **errp)
> +{
> + bool ret;
> +
> + ret = qdev_realize(dev, bus, errp);
> + object_unref(OBJECT(dev));
> + return ret;
> +}
> +
> +void qdev_unrealize(DeviceState *dev)
> +{
> + object_property_set_bool(OBJECT(dev), false, "realized", &error_abort);
> +}
> +
> static int qdev_assert_realized_properly(Object *obj, void *opaque)
> {
> DeviceState *dev = DEVICE(object_dynamic_cast(obj, TYPE_DEVICE));
> @@ -1002,6 +1088,10 @@ post_realize_fail:
> fail:
> error_propagate(errp, local_err);
> if (unattached_parent) {
> + /*
> + * Beware, this doesn't just revert
> + * object_property_add_child(), it also runs bus_remove()!
> + */
> object_unparent(OBJECT(dev));
> unattached_count--;
> }
> --
> 2.21.3
>
>
^ permalink raw reply
* Re: [PATCH v13 3/7] dt-bindings: clock: Add documentation for X1830 bindings.
From: Rob Herring @ 2020-05-29 19:14 UTC (permalink / raw)
To: 周琰杰 (Zhou Yanjie)
Cc: mturquette, robh+dt, sboyd, aric.pzqi, rick.tyliu, yanfei.li,
zhenwenjin, sernia.zhou, paul, dongsheng.qiu, devicetree,
linux-clk, linux-kernel
In-Reply-To: <20200528031549.13846-4-zhouyanjie@wanyeetech.com>
On Thu, 28 May 2020 11:15:45 +0800, 周琰杰 (Zhou Yanjie) wrote:
> Add documentation for the clock bindings of the X1830 Soc from Ingenic.
>
> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
> ---
>
> Notes:
> v11:
> New patch, split from [3/6] in v10.
>
> v11->v12:
> No change.
>
> v12->v13:
> No change.
>
> Documentation/devicetree/bindings/clock/ingenic,cgu.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* Re: [PATCH net-next] vmxnet3: use correct hdr reference when packet is encapsulated
From: David Miller @ 2020-05-29 19:14 UTC (permalink / raw)
To: doshir; +Cc: netdev, pv-drivers, kuba, linux-kernel
In-Reply-To: <20200529025352.786-1-doshir@vmware.com>
From: Ronak Doshi <doshir@vmware.com>
Date: Thu, 28 May 2020 19:53:52 -0700
> 'Commit dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload
> support")' added support for encapsulation offload. However, while
> preparing inner tso packet, it uses reference to outer ip headers.
>
> This patch fixes this issue by using correct reference for inner
> headers.
>
> Fixes: dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support")
> Signed-off-by: Ronak Doshi <doshir@vmware.com>
Applied.
^ permalink raw reply
* [PATCH 00/10] improve OF_PLATDATA support
From: Walter Lozano @ 2020-05-29 19:15 UTC (permalink / raw)
To: u-boot
In-Reply-To: <CAMty3ZCDO1F_hVByGPXJFVsrosDHs8du3=0MmYTS9fo7+e8TEA@mail.gmail.com>
Hi Jagan
On 29/5/20 15:25, Jagan Teki wrote:
> Hi Walter,
>
> On Fri, May 29, 2020 at 11:45 PM Walter Lozano
> <walter.lozano@collabora.com> wrote:
>> When using OF_PLATDATA dtbs are converted to C structs in order to save
>> space as we can remove both dtbs and libraries from TPL/SPL binaries.
>>
>> This patchset tries to improve its support by overcoming some limitations
>> in the current implementation
>>
>> First, the support for scan and check for valid driver/aliases is added
>> in order to generate U_BOOT_DEVICE entries with valid driver names.
>>
>> Secondly, the way information about linked noded (phandle) is generated
>> in C structs is improved in order to make it easier to get a device
>> associated to its data.
>>
>> Lastly the the suport for the property cd-gpios is added, which is used to
>> configure the card detection gpio on MMC is added.
> Does it impact the footprint? If yes any statistic about how much
> space has been reduced with respect to current platdata?
>
This series tries to overcome some of the limitations of the OF_PLATDATA
support, it does not provide an improvement to the footprint.
Mainly it makes it easier to implement OF_PLATDATA, by improving the
better support to match compatible strings with a driver name and rising
warning in case some driver name is not found. Additionally, it
implements a way to access the device pointed by a phandle.
However, Simon Glass is working on footprint improvements with the
support of tiny DM based on this work.
https://patchwork.ozlabs.org/project/uboot/patch/20200525093539.1.Ibf2d19439cde35e39192a9d4a8dad23539fae2e6 at changeid/
Regards,
Walter
^ permalink raw reply
* Re: [PATCH 0/3] misc: xilinx-sdfec: convert get_user_pages() --> pin_user_pages()
From: John Hubbard @ 2020-05-29 19:15 UTC (permalink / raw)
To: Dragan Cvetic, LKML
Cc: Souptick Joarder, Derek Kiernan, Arnd Bergmann,
Greg Kroah-Hartman, Michal Simek,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <DM6PR02MB41405A1300813F8A511BE449CB8F0@DM6PR02MB4140.namprd02.prod.outlook.com>
On 2020-05-29 01:29, Dragan Cvetic wrote:
> Hi John,
>
> Thank you for the suggestion, please find my comment below:
>
>> -----Original Message-----
>> From: John Hubbard <jhubbard@nvidia.com>
>> Sent: Wednesday 27 May 2020 02:26
>> To: LKML <linux-kernel@vger.kernel.org>
>> Cc: Souptick Joarder <jrdr.linux@gmail.com>; John Hubbard <jhubbard@nvidia.com>; Derek Kiernan <dkiernan@xilinx.com>; Dragan
>> Cvetic <draganc@xilinx.com>; Arnd Bergmann <arnd@arndb.de>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Michal Simek
>> <michals@xilinx.com>; linux-arm-kernel@lists.infradead.org
>> Subject: [PATCH 0/3] misc: xilinx-sdfec: convert get_user_pages() --> pin_user_pages()
>>
>> Hi,
>>
>> There are also a couple of tiny cleanup patches, just to fix up a few
>> minor issues that I spotted while converting from get_user_pages_fast()
>> to pin_user_pages_fast().
>>
>> Note that I have only compile-tested these patches, although that does
>> also include cross-compiling for a few other arches. Any run-time
>> testing would be greatly appreciated!
>>
>> Cc: Derek Kiernan <derek.kiernan@xilinx.com>
>> Cc: Dragan Cvetic <dragan.cvetic@xilinx.com>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Michal Simek <michal.simek@xilinx.com>
>> Cc: linux-arm-kernel@lists.infradead.org
>>
>> John Hubbard (3):
>> misc: xilinx-sdfec: improve get_user_pages_fast() error handling
>> misc: xilinx-sdfec: cleanup return value in xsdfec_table_write()
>> misc: xilinx-sdfec: convert get_user_pages() --> pin_user_pages()
>
>
> Reviewed-by:
> Technically there is no problem in this patch, but as you said this should be tested.
> Currently due to Covid-19 I'm not able to access the HW and I cannot validate this suggestion.
>
Hi Dragan,
Thanks for the review, and for *wanting* to do the testing, even though you
can't right now. :)
thanks,
--
John Hubbard
NVIDIA
>>
>> drivers/misc/xilinx_sdfec.c | 30 +++++++++++++++++-------------
>> 1 file changed, 17 insertions(+), 13 deletions(-)
>>
>>
>> base-commit: 9cb1fd0efd195590b828b9b865421ad345a4a145
>> --
>> 2.26.2
>
^ permalink raw reply
* Re: [PATCH 0/3] misc: xilinx-sdfec: convert get_user_pages() --> pin_user_pages()
From: John Hubbard @ 2020-05-29 19:15 UTC (permalink / raw)
To: Dragan Cvetic, LKML
Cc: Arnd Bergmann, Greg Kroah-Hartman, Michal Simek, Souptick Joarder,
Derek Kiernan, linux-arm-kernel@lists.infradead.org
In-Reply-To: <DM6PR02MB41405A1300813F8A511BE449CB8F0@DM6PR02MB4140.namprd02.prod.outlook.com>
On 2020-05-29 01:29, Dragan Cvetic wrote:
> Hi John,
>
> Thank you for the suggestion, please find my comment below:
>
>> -----Original Message-----
>> From: John Hubbard <jhubbard@nvidia.com>
>> Sent: Wednesday 27 May 2020 02:26
>> To: LKML <linux-kernel@vger.kernel.org>
>> Cc: Souptick Joarder <jrdr.linux@gmail.com>; John Hubbard <jhubbard@nvidia.com>; Derek Kiernan <dkiernan@xilinx.com>; Dragan
>> Cvetic <draganc@xilinx.com>; Arnd Bergmann <arnd@arndb.de>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Michal Simek
>> <michals@xilinx.com>; linux-arm-kernel@lists.infradead.org
>> Subject: [PATCH 0/3] misc: xilinx-sdfec: convert get_user_pages() --> pin_user_pages()
>>
>> Hi,
>>
>> There are also a couple of tiny cleanup patches, just to fix up a few
>> minor issues that I spotted while converting from get_user_pages_fast()
>> to pin_user_pages_fast().
>>
>> Note that I have only compile-tested these patches, although that does
>> also include cross-compiling for a few other arches. Any run-time
>> testing would be greatly appreciated!
>>
>> Cc: Derek Kiernan <derek.kiernan@xilinx.com>
>> Cc: Dragan Cvetic <dragan.cvetic@xilinx.com>
>> Cc: Arnd Bergmann <arnd@arndb.de>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Michal Simek <michal.simek@xilinx.com>
>> Cc: linux-arm-kernel@lists.infradead.org
>>
>> John Hubbard (3):
>> misc: xilinx-sdfec: improve get_user_pages_fast() error handling
>> misc: xilinx-sdfec: cleanup return value in xsdfec_table_write()
>> misc: xilinx-sdfec: convert get_user_pages() --> pin_user_pages()
>
>
> Reviewed-by:
> Technically there is no problem in this patch, but as you said this should be tested.
> Currently due to Covid-19 I'm not able to access the HW and I cannot validate this suggestion.
>
Hi Dragan,
Thanks for the review, and for *wanting* to do the testing, even though you
can't right now. :)
thanks,
--
John Hubbard
NVIDIA
>>
>> drivers/misc/xilinx_sdfec.c | 30 +++++++++++++++++-------------
>> 1 file changed, 17 insertions(+), 13 deletions(-)
>>
>>
>> base-commit: 9cb1fd0efd195590b828b9b865421ad345a4a145
>> --
>> 2.26.2
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v2 nf-next] netfilter: introduce support for reject at prerouting stage
From: Pablo Neira Ayuso @ 2020-05-29 19:15 UTC (permalink / raw)
To: Laura Garcia Liebana; +Cc: netfilter-devel, devel
In-Reply-To: <20200529110328.GA20367@nevthink>
On Fri, May 29, 2020 at 01:03:28PM +0200, Laura Garcia Liebana wrote:
[...]
> diff --git a/net/ipv4/netfilter/nf_reject_ipv4.c b/net/ipv4/netfilter/nf_reject_ipv4.c
> index 2361fdac2c43..b5b7633d9433 100644
> --- a/net/ipv4/netfilter/nf_reject_ipv4.c
> +++ b/net/ipv4/netfilter/nf_reject_ipv4.c
> @@ -96,6 +96,22 @@ void nf_reject_ip_tcphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb,
> }
> EXPORT_SYMBOL_GPL(nf_reject_ip_tcphdr_put);
>
> +static int nf_reject_fill_skb_dst(struct sk_buff *skb_in)
> +{
> + struct dst_entry *dst = NULL;
> + struct flowi fl;
> + struct flowi4 *fl4 = &fl.u.ip4;
> +
> + memset(fl4, 0, sizeof(*fl4));
> + fl4->daddr = ip_hdr(skb_in)->saddr;
> + nf_route(dev_net(skb_in->dev), &dst, &fl, false, AF_INET);
> + if (!dst)
> + return -1;
> +
> + skb_dst_set(skb_in, dst);
> + return 0;
> +}
Probably slightly simplify this? I'd suggest:
* make calls to nf_ip_route() and nf_ip6_route() instead of the nf_route()
wrapper.
* use flowi structure, no need to add struct flowi4 ? Probably:
static int nf_reject_fill_skb_dst(struct sk_buff *skb_in)
{
struct dst_entry *dst = NULL;
struct flowi fl;
memset(fl, 0, sizeof(*fl));
fl.u.ip4 = ip_hdr(skb_in)->saddr;
nf_ip_route(dev_net(skb_in->dev), &dst, &fl, false);
if (!dst)
return -1;
skb_dst_set(skb_in, dst);
return 0;
}
Another possibility would be to use C99 structure initialization. But
I think the code above should be fine.
Thanks.
^ permalink raw reply
* Re: [Virtio-fs] [PATCH] virtiofsd: remove symlink fallbacks
From: Dr. David Alan Gilbert @ 2020-05-29 19:15 UTC (permalink / raw)
To: Vivek Goyal; +Cc: virtio-fs, qemu-devel
In-Reply-To: <20200515141057.GB235744@redhat.com>
* Vivek Goyal (vgoyal@redhat.com) wrote:
> On Thu, May 14, 2020 at 04:07:36PM +0200, Miklos Szeredi wrote:
> > Path lookup in the kernel has special rules for looking up magic symlinks
> > under /proc. If a filesystem operation is instructed to follow symlinks
> > (e.g. via AT_SYMLINK_FOLLOW or lack of AT_SYMLINK_NOFOLLOW), and the final
> > component is such a proc symlink, then the target of the magic symlink is
> > used for the operation, even if the target itself is a symlink. I.e. path
> > lookup is always terminated after following a final magic symlink.
> >
> > I was erronously assuming that in the above case the target symlink would
> > also be followed, and so workarounds were added for a couple of operations
> > to handle the symlink case. Since the symlink can be handled simply by
> > following the proc symlink, these workardouds are not needed.
> >
> > Also remove the "norace" option, which disabled the workarounds.
> >
> > Commit bdfd66788349 ("virtiofsd: Fix xattr operations") already dealt with
> > the same issue for xattr operations.
> >
> > Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
>
> Good to have this cleanup.
>
> Acked-by: Vivek Goyal <vgoyal@redhat.com>
Queued.
> Vivek
>
> > ---
> > tools/virtiofsd/passthrough_ll.c | 175 ++-----------------------------
> > 1 file changed, 6 insertions(+), 169 deletions(-)
> >
> > diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
> > index 3ba1d9098460..2ce7c96085bf 100644
> > --- a/tools/virtiofsd/passthrough_ll.c
> > +++ b/tools/virtiofsd/passthrough_ll.c
> > @@ -140,7 +140,6 @@ enum {
> > struct lo_data {
> > pthread_mutex_t mutex;
> > int debug;
> > - int norace;
> > int writeback;
> > int flock;
> > int posix_lock;
> > @@ -176,7 +175,6 @@ static const struct fuse_opt lo_opts[] = {
> > { "cache=none", offsetof(struct lo_data, cache), CACHE_NONE },
> > { "cache=auto", offsetof(struct lo_data, cache), CACHE_AUTO },
> > { "cache=always", offsetof(struct lo_data, cache), CACHE_ALWAYS },
> > - { "norace", offsetof(struct lo_data, norace), 1 },
> > { "readdirplus", offsetof(struct lo_data, readdirplus_set), 1 },
> > { "no_readdirplus", offsetof(struct lo_data, readdirplus_clear), 1 },
> > FUSE_OPT_END
> > @@ -592,136 +590,6 @@ static void lo_getattr(fuse_req_t req, fuse_ino_t ino,
> > fuse_reply_attr(req, &buf, lo->timeout);
> > }
> >
> > -/*
> > - * Increments parent->nlookup and caller must release refcount using
> > - * lo_inode_put(&parent).
> > - */
> > -static int lo_parent_and_name(struct lo_data *lo, struct lo_inode *inode,
> > - char path[PATH_MAX], struct lo_inode **parent)
> > -{
> > - char procname[64];
> > - char *last;
> > - struct stat stat;
> > - struct lo_inode *p;
> > - int retries = 2;
> > - int res;
> > -
> > -retry:
> > - sprintf(procname, "%i", inode->fd);
> > -
> > - res = readlinkat(lo->proc_self_fd, procname, path, PATH_MAX);
> > - if (res < 0) {
> > - fuse_log(FUSE_LOG_WARNING, "%s: readlink failed: %m\n", __func__);
> > - goto fail_noretry;
> > - }
> > -
> > - if (res >= PATH_MAX) {
> > - fuse_log(FUSE_LOG_WARNING, "%s: readlink overflowed\n", __func__);
> > - goto fail_noretry;
> > - }
> > - path[res] = '\0';
> > -
> > - last = strrchr(path, '/');
> > - if (last == NULL) {
> > - /* Shouldn't happen */
> > - fuse_log(
> > - FUSE_LOG_WARNING,
> > - "%s: INTERNAL ERROR: bad path read from proc\n", __func__);
> > - goto fail_noretry;
> > - }
> > - if (last == path) {
> > - p = &lo->root;
> > - pthread_mutex_lock(&lo->mutex);
> > - p->nlookup++;
> > - g_atomic_int_inc(&p->refcount);
> > - pthread_mutex_unlock(&lo->mutex);
> > - } else {
> > - *last = '\0';
> > - res = fstatat(AT_FDCWD, last == path ? "/" : path, &stat, 0);
> > - if (res == -1) {
> > - if (!retries) {
> > - fuse_log(FUSE_LOG_WARNING,
> > - "%s: failed to stat parent: %m\n", __func__);
> > - }
> > - goto fail;
> > - }
> > - p = lo_find(lo, &stat);
> > - if (p == NULL) {
> > - if (!retries) {
> > - fuse_log(FUSE_LOG_WARNING,
> > - "%s: failed to find parent\n", __func__);
> > - }
> > - goto fail;
> > - }
> > - }
> > - last++;
> > - res = fstatat(p->fd, last, &stat, AT_SYMLINK_NOFOLLOW);
> > - if (res == -1) {
> > - if (!retries) {
> > - fuse_log(FUSE_LOG_WARNING,
> > - "%s: failed to stat last\n", __func__);
> > - }
> > - goto fail_unref;
> > - }
> > - if (stat.st_dev != inode->key.dev || stat.st_ino != inode->key.ino) {
> > - if (!retries) {
> > - fuse_log(FUSE_LOG_WARNING,
> > - "%s: failed to match last\n", __func__);
> > - }
> > - goto fail_unref;
> > - }
> > - *parent = p;
> > - memmove(path, last, strlen(last) + 1);
> > -
> > - return 0;
> > -
> > -fail_unref:
> > - unref_inode_lolocked(lo, p, 1);
> > - lo_inode_put(lo, &p);
> > -fail:
> > - if (retries) {
> > - retries--;
> > - goto retry;
> > - }
> > -fail_noretry:
> > - errno = EIO;
> > - return -1;
> > -}
> > -
> > -static int utimensat_empty(struct lo_data *lo, struct lo_inode *inode,
> > - const struct timespec *tv)
> > -{
> > - int res;
> > - struct lo_inode *parent;
> > - char path[PATH_MAX];
> > -
> > - if (S_ISLNK(inode->filetype)) {
> > - res = utimensat(inode->fd, "", tv, AT_EMPTY_PATH);
> > - if (res == -1 && errno == EINVAL) {
> > - /* Sorry, no race free way to set times on symlink. */
> > - if (lo->norace) {
> > - errno = EPERM;
> > - } else {
> > - goto fallback;
> > - }
> > - }
> > - return res;
> > - }
> > - sprintf(path, "%i", inode->fd);
> > -
> > - return utimensat(lo->proc_self_fd, path, tv, 0);
> > -
> > -fallback:
> > - res = lo_parent_and_name(lo, inode, path, &parent);
> > - if (res != -1) {
> > - res = utimensat(parent->fd, path, tv, AT_SYMLINK_NOFOLLOW);
> > - unref_inode_lolocked(lo, parent, 1);
> > - lo_inode_put(lo, &parent);
> > - }
> > -
> > - return res;
> > -}
> > -
> > static int lo_fi_fd(fuse_req_t req, struct fuse_file_info *fi)
> > {
> > struct lo_data *lo = lo_data(req);
> > @@ -828,7 +696,8 @@ static void lo_setattr(fuse_req_t req, fuse_ino_t ino, struct stat *attr,
> > if (fi) {
> > res = futimens(fd, tv);
> > } else {
> > - res = utimensat_empty(lo, inode, tv);
> > + sprintf(procname, "%i", inode->fd);
> > + res = utimensat(lo->proc_self_fd, procname, tv, 0);
> > }
> > if (res == -1) {
> > goto out_err;
> > @@ -1129,41 +998,6 @@ static void lo_symlink(fuse_req_t req, const char *link, fuse_ino_t parent,
> > lo_mknod_symlink(req, parent, name, S_IFLNK, 0, link);
> > }
> >
> > -static int linkat_empty_nofollow(struct lo_data *lo, struct lo_inode *inode,
> > - int dfd, const char *name)
> > -{
> > - int res;
> > - struct lo_inode *parent;
> > - char path[PATH_MAX];
> > -
> > - if (S_ISLNK(inode->filetype)) {
> > - res = linkat(inode->fd, "", dfd, name, AT_EMPTY_PATH);
> > - if (res == -1 && (errno == ENOENT || errno == EINVAL)) {
> > - /* Sorry, no race free way to hard-link a symlink. */
> > - if (lo->norace) {
> > - errno = EPERM;
> > - } else {
> > - goto fallback;
> > - }
> > - }
> > - return res;
> > - }
> > -
> > - sprintf(path, "%i", inode->fd);
> > -
> > - return linkat(lo->proc_self_fd, path, dfd, name, AT_SYMLINK_FOLLOW);
> > -
> > -fallback:
> > - res = lo_parent_and_name(lo, inode, path, &parent);
> > - if (res != -1) {
> > - res = linkat(parent->fd, path, dfd, name, 0);
> > - unref_inode_lolocked(lo, parent, 1);
> > - lo_inode_put(lo, &parent);
> > - }
> > -
> > - return res;
> > -}
> > -
> > static void lo_link(fuse_req_t req, fuse_ino_t ino, fuse_ino_t parent,
> > const char *name)
> > {
> > @@ -1172,6 +1006,7 @@ static void lo_link(fuse_req_t req, fuse_ino_t ino, fuse_ino_t parent,
> > struct lo_inode *parent_inode;
> > struct lo_inode *inode;
> > struct fuse_entry_param e;
> > + char procname[64];
> > int saverr;
> >
> > if (!is_safe_path_component(name)) {
> > @@ -1190,7 +1025,9 @@ static void lo_link(fuse_req_t req, fuse_ino_t ino, fuse_ino_t parent,
> > e.attr_timeout = lo->timeout;
> > e.entry_timeout = lo->timeout;
> >
> > - res = linkat_empty_nofollow(lo, inode, parent_inode->fd, name);
> > + sprintf(procname, "%i", inode->fd);
> > + res = linkat(lo->proc_self_fd, procname, parent_inode->fd, name,
> > + AT_SYMLINK_FOLLOW);
> > if (res == -1) {
> > goto out_err;
> > }
> > --
> > 2.21.1
> >
> > _______________________________________________
> > Virtio-fs mailing list
> > Virtio-fs@redhat.com
> > https://www.redhat.com/mailman/listinfo/virtio-fs
>
> _______________________________________________
> Virtio-fs mailing list
> Virtio-fs@redhat.com
> https://www.redhat.com/mailman/listinfo/virtio-fs
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply
* Re: [Virtio-fs] [PATCH] virtiofsd: remove symlink fallbacks
From: Dr. David Alan Gilbert @ 2020-05-29 19:15 UTC (permalink / raw)
To: Vivek Goyal; +Cc: virtio-fs, Miklos Szeredi, qemu-devel
In-Reply-To: <20200515141057.GB235744@redhat.com>
* Vivek Goyal (vgoyal@redhat.com) wrote:
> On Thu, May 14, 2020 at 04:07:36PM +0200, Miklos Szeredi wrote:
> > Path lookup in the kernel has special rules for looking up magic symlinks
> > under /proc. If a filesystem operation is instructed to follow symlinks
> > (e.g. via AT_SYMLINK_FOLLOW or lack of AT_SYMLINK_NOFOLLOW), and the final
> > component is such a proc symlink, then the target of the magic symlink is
> > used for the operation, even if the target itself is a symlink. I.e. path
> > lookup is always terminated after following a final magic symlink.
> >
> > I was erronously assuming that in the above case the target symlink would
> > also be followed, and so workarounds were added for a couple of operations
> > to handle the symlink case. Since the symlink can be handled simply by
> > following the proc symlink, these workardouds are not needed.
> >
> > Also remove the "norace" option, which disabled the workarounds.
> >
> > Commit bdfd66788349 ("virtiofsd: Fix xattr operations") already dealt with
> > the same issue for xattr operations.
> >
> > Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
>
> Good to have this cleanup.
>
> Acked-by: Vivek Goyal <vgoyal@redhat.com>
Queued.
> Vivek
>
> > ---
> > tools/virtiofsd/passthrough_ll.c | 175 ++-----------------------------
> > 1 file changed, 6 insertions(+), 169 deletions(-)
> >
> > diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
> > index 3ba1d9098460..2ce7c96085bf 100644
> > --- a/tools/virtiofsd/passthrough_ll.c
> > +++ b/tools/virtiofsd/passthrough_ll.c
> > @@ -140,7 +140,6 @@ enum {
> > struct lo_data {
> > pthread_mutex_t mutex;
> > int debug;
> > - int norace;
> > int writeback;
> > int flock;
> > int posix_lock;
> > @@ -176,7 +175,6 @@ static const struct fuse_opt lo_opts[] = {
> > { "cache=none", offsetof(struct lo_data, cache), CACHE_NONE },
> > { "cache=auto", offsetof(struct lo_data, cache), CACHE_AUTO },
> > { "cache=always", offsetof(struct lo_data, cache), CACHE_ALWAYS },
> > - { "norace", offsetof(struct lo_data, norace), 1 },
> > { "readdirplus", offsetof(struct lo_data, readdirplus_set), 1 },
> > { "no_readdirplus", offsetof(struct lo_data, readdirplus_clear), 1 },
> > FUSE_OPT_END
> > @@ -592,136 +590,6 @@ static void lo_getattr(fuse_req_t req, fuse_ino_t ino,
> > fuse_reply_attr(req, &buf, lo->timeout);
> > }
> >
> > -/*
> > - * Increments parent->nlookup and caller must release refcount using
> > - * lo_inode_put(&parent).
> > - */
> > -static int lo_parent_and_name(struct lo_data *lo, struct lo_inode *inode,
> > - char path[PATH_MAX], struct lo_inode **parent)
> > -{
> > - char procname[64];
> > - char *last;
> > - struct stat stat;
> > - struct lo_inode *p;
> > - int retries = 2;
> > - int res;
> > -
> > -retry:
> > - sprintf(procname, "%i", inode->fd);
> > -
> > - res = readlinkat(lo->proc_self_fd, procname, path, PATH_MAX);
> > - if (res < 0) {
> > - fuse_log(FUSE_LOG_WARNING, "%s: readlink failed: %m\n", __func__);
> > - goto fail_noretry;
> > - }
> > -
> > - if (res >= PATH_MAX) {
> > - fuse_log(FUSE_LOG_WARNING, "%s: readlink overflowed\n", __func__);
> > - goto fail_noretry;
> > - }
> > - path[res] = '\0';
> > -
> > - last = strrchr(path, '/');
> > - if (last == NULL) {
> > - /* Shouldn't happen */
> > - fuse_log(
> > - FUSE_LOG_WARNING,
> > - "%s: INTERNAL ERROR: bad path read from proc\n", __func__);
> > - goto fail_noretry;
> > - }
> > - if (last == path) {
> > - p = &lo->root;
> > - pthread_mutex_lock(&lo->mutex);
> > - p->nlookup++;
> > - g_atomic_int_inc(&p->refcount);
> > - pthread_mutex_unlock(&lo->mutex);
> > - } else {
> > - *last = '\0';
> > - res = fstatat(AT_FDCWD, last == path ? "/" : path, &stat, 0);
> > - if (res == -1) {
> > - if (!retries) {
> > - fuse_log(FUSE_LOG_WARNING,
> > - "%s: failed to stat parent: %m\n", __func__);
> > - }
> > - goto fail;
> > - }
> > - p = lo_find(lo, &stat);
> > - if (p == NULL) {
> > - if (!retries) {
> > - fuse_log(FUSE_LOG_WARNING,
> > - "%s: failed to find parent\n", __func__);
> > - }
> > - goto fail;
> > - }
> > - }
> > - last++;
> > - res = fstatat(p->fd, last, &stat, AT_SYMLINK_NOFOLLOW);
> > - if (res == -1) {
> > - if (!retries) {
> > - fuse_log(FUSE_LOG_WARNING,
> > - "%s: failed to stat last\n", __func__);
> > - }
> > - goto fail_unref;
> > - }
> > - if (stat.st_dev != inode->key.dev || stat.st_ino != inode->key.ino) {
> > - if (!retries) {
> > - fuse_log(FUSE_LOG_WARNING,
> > - "%s: failed to match last\n", __func__);
> > - }
> > - goto fail_unref;
> > - }
> > - *parent = p;
> > - memmove(path, last, strlen(last) + 1);
> > -
> > - return 0;
> > -
> > -fail_unref:
> > - unref_inode_lolocked(lo, p, 1);
> > - lo_inode_put(lo, &p);
> > -fail:
> > - if (retries) {
> > - retries--;
> > - goto retry;
> > - }
> > -fail_noretry:
> > - errno = EIO;
> > - return -1;
> > -}
> > -
> > -static int utimensat_empty(struct lo_data *lo, struct lo_inode *inode,
> > - const struct timespec *tv)
> > -{
> > - int res;
> > - struct lo_inode *parent;
> > - char path[PATH_MAX];
> > -
> > - if (S_ISLNK(inode->filetype)) {
> > - res = utimensat(inode->fd, "", tv, AT_EMPTY_PATH);
> > - if (res == -1 && errno == EINVAL) {
> > - /* Sorry, no race free way to set times on symlink. */
> > - if (lo->norace) {
> > - errno = EPERM;
> > - } else {
> > - goto fallback;
> > - }
> > - }
> > - return res;
> > - }
> > - sprintf(path, "%i", inode->fd);
> > -
> > - return utimensat(lo->proc_self_fd, path, tv, 0);
> > -
> > -fallback:
> > - res = lo_parent_and_name(lo, inode, path, &parent);
> > - if (res != -1) {
> > - res = utimensat(parent->fd, path, tv, AT_SYMLINK_NOFOLLOW);
> > - unref_inode_lolocked(lo, parent, 1);
> > - lo_inode_put(lo, &parent);
> > - }
> > -
> > - return res;
> > -}
> > -
> > static int lo_fi_fd(fuse_req_t req, struct fuse_file_info *fi)
> > {
> > struct lo_data *lo = lo_data(req);
> > @@ -828,7 +696,8 @@ static void lo_setattr(fuse_req_t req, fuse_ino_t ino, struct stat *attr,
> > if (fi) {
> > res = futimens(fd, tv);
> > } else {
> > - res = utimensat_empty(lo, inode, tv);
> > + sprintf(procname, "%i", inode->fd);
> > + res = utimensat(lo->proc_self_fd, procname, tv, 0);
> > }
> > if (res == -1) {
> > goto out_err;
> > @@ -1129,41 +998,6 @@ static void lo_symlink(fuse_req_t req, const char *link, fuse_ino_t parent,
> > lo_mknod_symlink(req, parent, name, S_IFLNK, 0, link);
> > }
> >
> > -static int linkat_empty_nofollow(struct lo_data *lo, struct lo_inode *inode,
> > - int dfd, const char *name)
> > -{
> > - int res;
> > - struct lo_inode *parent;
> > - char path[PATH_MAX];
> > -
> > - if (S_ISLNK(inode->filetype)) {
> > - res = linkat(inode->fd, "", dfd, name, AT_EMPTY_PATH);
> > - if (res == -1 && (errno == ENOENT || errno == EINVAL)) {
> > - /* Sorry, no race free way to hard-link a symlink. */
> > - if (lo->norace) {
> > - errno = EPERM;
> > - } else {
> > - goto fallback;
> > - }
> > - }
> > - return res;
> > - }
> > -
> > - sprintf(path, "%i", inode->fd);
> > -
> > - return linkat(lo->proc_self_fd, path, dfd, name, AT_SYMLINK_FOLLOW);
> > -
> > -fallback:
> > - res = lo_parent_and_name(lo, inode, path, &parent);
> > - if (res != -1) {
> > - res = linkat(parent->fd, path, dfd, name, 0);
> > - unref_inode_lolocked(lo, parent, 1);
> > - lo_inode_put(lo, &parent);
> > - }
> > -
> > - return res;
> > -}
> > -
> > static void lo_link(fuse_req_t req, fuse_ino_t ino, fuse_ino_t parent,
> > const char *name)
> > {
> > @@ -1172,6 +1006,7 @@ static void lo_link(fuse_req_t req, fuse_ino_t ino, fuse_ino_t parent,
> > struct lo_inode *parent_inode;
> > struct lo_inode *inode;
> > struct fuse_entry_param e;
> > + char procname[64];
> > int saverr;
> >
> > if (!is_safe_path_component(name)) {
> > @@ -1190,7 +1025,9 @@ static void lo_link(fuse_req_t req, fuse_ino_t ino, fuse_ino_t parent,
> > e.attr_timeout = lo->timeout;
> > e.entry_timeout = lo->timeout;
> >
> > - res = linkat_empty_nofollow(lo, inode, parent_inode->fd, name);
> > + sprintf(procname, "%i", inode->fd);
> > + res = linkat(lo->proc_self_fd, procname, parent_inode->fd, name,
> > + AT_SYMLINK_FOLLOW);
> > if (res == -1) {
> > goto out_err;
> > }
> > --
> > 2.21.1
> >
> > _______________________________________________
> > Virtio-fs mailing list
> > Virtio-fs@redhat.com
> > https://www.redhat.com/mailman/listinfo/virtio-fs
>
> _______________________________________________
> Virtio-fs mailing list
> Virtio-fs@redhat.com
> https://www.redhat.com/mailman/listinfo/virtio-fs
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply
* [PATCH v2 0/4] pinctrl: bcm2835: Support for wake-up interrupts
From: Florian Fainelli @ 2020-05-29 19:15 UTC (permalink / raw)
To: linux-kernel
Cc: Stefan Wahren,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Florian Fainelli, Geert Uytterhoeven, Scott Branden, Ray Jui,
Linus Walleij, Matti Vaittinen, open list:PIN CONTROL SUBSYSTEM,
Rob Herring,
maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
Nicolas Saenz Julienne,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
Hi Linus,
This patch series updates the bcm2835 pinctrl driver to support
the BCM7211 SoC which is quite similar to 2711 (Raspberry Pi 4)
except that it also supports wake-up interrupts.
Thanks!
Changes in v2:
- fixed patch #3 to reference the correct data structure (Stefan)
- fixed patch #4 to use conditional initialization and fetching of
interrupt resources to limit the memory overhead for non-7211 chips
Florian Fainelli (4):
dt-bindings: pinctrl: Document 7211 compatible for
brcm,bcm2835-gpio.txt
dt-bindings: pinctrl: Document optional BCM7211 wake-up interrupts
pinctrl: bcm2835: Match BCM7211 compatible string
pinctrl: bcm2835: Add support for wake-up interrupts
.../bindings/pinctrl/brcm,bcm2835-gpio.txt | 5 +-
drivers/pinctrl/bcm/pinctrl-bcm2835.c | 80 ++++++++++++++++++-
2 files changed, 83 insertions(+), 2 deletions(-)
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH v2 2/4] dt-bindings: pinctrl: Document optional BCM7211 wake-up interrupts
From: Florian Fainelli @ 2020-05-29 19:15 UTC (permalink / raw)
To: linux-kernel
Cc: Florian Fainelli, Linus Walleij, Rob Herring, Ray Jui,
Scott Branden,
maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
Nicolas Saenz Julienne, Stefan Wahren, Geert Uytterhoeven,
Matti Vaittinen, open list:PIN CONTROL SUBSYSTEM,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
In-Reply-To: <20200529191522.27938-1-f.fainelli@gmail.com>
BCM7211 supports wake-up interrupts in the form of optional interrupt
lines, one per bank, plus the "all banks" interrupt line.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
.../devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt b/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt
index dfc67b90591c..5682b2010e50 100644
--- a/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt
+++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt
@@ -16,7 +16,9 @@ Required properties:
second cell is used to specify optional parameters:
- bit 0 specifies polarity (0 for normal, 1 for inverted)
- interrupts : The interrupt outputs from the controller. One interrupt per
- individual bank followed by the "all banks" interrupt.
+ individual bank followed by the "all banks" interrupt. For BCM7211, an
+ additional set of per-bank interrupt line and an "all banks" wake-up
+ interrupt may be specified.
- interrupt-controller: Marks the device node as an interrupt controller.
- #interrupt-cells : Should be 2.
The first cell is the GPIO number.
--
2.17.1
^ permalink raw reply related
* Re: [PATCH v2] kasan: fix clang compilation warning due to stack protector
From: Marco Elver @ 2020-05-29 19:16 UTC (permalink / raw)
To: Andrey Konovalov
Cc: Andrew Morton, Andrey Ryabinin, Alexander Potapenko,
Dmitry Vyukov, kasan-dev, Linux Memory Management List, LKML,
Qian Cai
In-Reply-To: <c2f0c8e4048852ae014f4a391d96ca42d27e3255.1590779332.git.andreyknvl@google.com>
On Fri, 29 May 2020 at 21:12, Andrey Konovalov <andreyknvl@google.com> wrote:
>
> KASAN uses a single cc-option invocation to disable both conserve-stack
> and stack-protector flags. The former flag is not present in Clang, which
> causes cc-option to fail, and results in stack-protector being enabled.
>
> Fix by using separate cc-option calls for each flag. Also collect all
> flags in a variable to avoid calling cc-option multiple times for
> different files.
>
> Reported-by: Qian Cai <cai@lca.pw>
> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
> ---
>
> Changes v1 -> v2:
> - Renamed CC_FLAGS_KASAN_CONFLICT to CC_FLAGS_KASAN_RUNTIME.
Reviewed-by: Marco Elver <elver@google.com>
Thanks!
> ---
> mm/kasan/Makefile | 21 +++++++++++++--------
> 1 file changed, 13 insertions(+), 8 deletions(-)
>
> diff --git a/mm/kasan/Makefile b/mm/kasan/Makefile
> index de3121848ddf..d532c2587731 100644
> --- a/mm/kasan/Makefile
> +++ b/mm/kasan/Makefile
> @@ -15,14 +15,19 @@ CFLAGS_REMOVE_tags_report.o = $(CC_FLAGS_FTRACE)
>
> # Function splitter causes unnecessary splits in __asan_load1/__asan_store1
> # see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63533
> -CFLAGS_common.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> -CFLAGS_generic.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> -CFLAGS_generic_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> -CFLAGS_init.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> -CFLAGS_quarantine.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> -CFLAGS_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> -CFLAGS_tags.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> -CFLAGS_tags_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING
> +CC_FLAGS_KASAN_RUNTIME := $(call cc-option, -fno-conserve-stack)
> +CC_FLAGS_KASAN_RUNTIME += $(call cc-option, -fno-stack-protector)
> +# Disable branch tracing to avoid recursion.
> +CC_FLAGS_KASAN_RUNTIME += -DDISABLE_BRANCH_PROFILING
> +
> +CFLAGS_common.o := $(CC_FLAGS_KASAN_RUNTIME)
> +CFLAGS_generic.o := $(CC_FLAGS_KASAN_RUNTIME)
> +CFLAGS_generic_report.o := $(CC_FLAGS_KASAN_RUNTIME)
> +CFLAGS_init.o := $(CC_FLAGS_KASAN_RUNTIME)
> +CFLAGS_quarantine.o := $(CC_FLAGS_KASAN_RUNTIME)
> +CFLAGS_report.o := $(CC_FLAGS_KASAN_RUNTIME)
> +CFLAGS_tags.o := $(CC_FLAGS_KASAN_RUNTIME)
> +CFLAGS_tags_report.o := $(CC_FLAGS_KASAN_RUNTIME)
>
> obj-$(CONFIG_KASAN) := common.o init.o report.o
> obj-$(CONFIG_KASAN_GENERIC) += generic.o generic_report.o quarantine.o
> --
> 2.27.0.rc0.183.gde8f92d652-goog
>
^ permalink raw reply
* [PATCH v2 4/4] pinctrl: bcm2835: Add support for wake-up interrupts
From: Florian Fainelli @ 2020-05-29 19:15 UTC (permalink / raw)
To: linux-kernel
Cc: Florian Fainelli, Linus Walleij, Rob Herring, Ray Jui,
Scott Branden,
maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
Nicolas Saenz Julienne, Stefan Wahren, Geert Uytterhoeven,
Matti Vaittinen, open list:PIN CONTROL SUBSYSTEM,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
In-Reply-To: <20200529191522.27938-1-f.fainelli@gmail.com>
Leverage the IRQCHIP_MASK_ON_SUSPEND flag in order to avoid having to
specifically treat the GPIO interrupts during suspend and resume, and
simply implement an irq_set_wake() callback that is responsible for
enabling the parent wake-up interrupt as a wake-up interrupt.
To avoid allocating unnecessary resources for other chips, the wake-up
interrupts are only initialized if we have a brcm,bcm7211-gpio
compatibility string.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/pinctrl/bcm/pinctrl-bcm2835.c | 76 ++++++++++++++++++++++++++-
1 file changed, 75 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 1b00d93aa66e..1fbf067a3eed 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -19,6 +19,7 @@
#include <linux/irq.h>
#include <linux/irqdesc.h>
#include <linux/init.h>
+#include <linux/interrupt.h>
#include <linux/of_address.h>
#include <linux/of.h>
#include <linux/of_irq.h>
@@ -76,6 +77,7 @@
struct bcm2835_pinctrl {
struct device *dev;
void __iomem *base;
+ int *wake_irq;
/* note: locking assumes each bank will have its own unsigned long */
unsigned long enabled_irq_map[BCM2835_NUM_BANKS];
@@ -435,6 +437,11 @@ static void bcm2835_gpio_irq_handler(struct irq_desc *desc)
chained_irq_exit(host_chip, desc);
}
+static irqreturn_t bcm2835_gpio_wake_irq_handler(int irq, void *dev_id)
+{
+ return IRQ_HANDLED;
+}
+
static inline void __bcm2835_gpio_irq_config(struct bcm2835_pinctrl *pc,
unsigned reg, unsigned offset, bool enable)
{
@@ -634,6 +641,34 @@ static void bcm2835_gpio_irq_ack(struct irq_data *data)
bcm2835_gpio_set_bit(pc, GPEDS0, gpio);
}
+static int bcm2835_gpio_irq_set_wake(struct irq_data *data, unsigned int on)
+{
+ struct gpio_chip *chip = irq_data_get_irq_chip_data(data);
+ struct bcm2835_pinctrl *pc = gpiochip_get_data(chip);
+ unsigned gpio = irqd_to_hwirq(data);
+ unsigned int irqgroup;
+ int ret = -EINVAL;
+
+ if (!pc->wake_irq)
+ return ret;
+
+ if (gpio <= 27)
+ irqgroup = 0;
+ else if (gpio >= 28 && gpio <= 45)
+ irqgroup = 1;
+ else if (gpio >= 46 && gpio <= 53)
+ irqgroup = 2;
+ else
+ return ret;
+
+ if (on)
+ ret = enable_irq_wake(pc->wake_irq[irqgroup]);
+ else
+ ret = disable_irq_wake(pc->wake_irq[irqgroup]);
+
+ return ret;
+}
+
static struct irq_chip bcm2835_gpio_irq_chip = {
.name = MODULE_NAME,
.irq_enable = bcm2835_gpio_irq_enable,
@@ -642,6 +677,8 @@ static struct irq_chip bcm2835_gpio_irq_chip = {
.irq_ack = bcm2835_gpio_irq_ack,
.irq_mask = bcm2835_gpio_irq_disable,
.irq_unmask = bcm2835_gpio_irq_enable,
+ .irq_set_wake = bcm2835_gpio_irq_set_wake,
+ .flags = IRQCHIP_MASK_ON_SUSPEND,
};
static int bcm2835_pctl_get_groups_count(struct pinctrl_dev *pctldev)
@@ -1154,6 +1191,7 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
struct resource iomem;
int err, i;
const struct of_device_id *match;
+ int is_7211 = 0;
BUILD_BUG_ON(ARRAY_SIZE(bcm2835_gpio_pins) != BCM2711_NUM_GPIOS);
BUILD_BUG_ON(ARRAY_SIZE(bcm2835_gpio_groups) != BCM2711_NUM_GPIOS);
@@ -1180,6 +1218,7 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
return -EINVAL;
pdata = match->data;
+ is_7211 = of_device_is_compatible(np, "brcm,bcm7211-gpio");
pc->gpio_chip = *pdata->gpio_chip;
pc->gpio_chip.parent = dev;
@@ -1214,6 +1253,15 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
GFP_KERNEL);
if (!girq->parents)
return -ENOMEM;
+
+ if (is_7211) {
+ pc->wake_irq = devm_kcalloc(dev, BCM2835_NUM_IRQS,
+ sizeof(*pc->wake_irq),
+ GFP_KERNEL);
+ if (!pc->wake_irq)
+ return -ENOMEM;
+ }
+
/*
* Use the same handler for all groups: this is necessary
* since we use one gpiochip to cover all lines - the
@@ -1221,8 +1269,34 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)
* bank that was firing the IRQ and look up the per-group
* and bank data.
*/
- for (i = 0; i < BCM2835_NUM_IRQS; i++)
+ for (i = 0; i < BCM2835_NUM_IRQS; i++) {
+ int len;
+ char *name;
+
girq->parents[i] = irq_of_parse_and_map(np, i);
+ if (!is_7211)
+ continue;
+
+ /* Skip over the all banks interrupts */
+ pc->wake_irq[i] = irq_of_parse_and_map(np, i +
+ BCM2835_NUM_IRQS + 1);
+
+ len = strlen(dev_name(pc->dev)) + 16;
+ name = devm_kzalloc(pc->dev, len, GFP_KERNEL);
+ if (!name)
+ return -ENOMEM;
+
+ snprintf(name, len, "%s:bank%d", dev_name(pc->dev), i);
+
+ /* These are optional interrupts */
+ err = devm_request_irq(dev, pc->wake_irq[i],
+ bcm2835_gpio_wake_irq_handler,
+ IRQF_SHARED, name, pc);
+ if (err)
+ dev_warn(dev, "unable to request wake IRQ %d\n",
+ pc->wake_irq[i]);
+ }
+
girq->default_type = IRQ_TYPE_NONE;
girq->handler = handle_level_irq;
--
2.17.1
^ permalink raw reply related
* [PATCH v2 3/4] pinctrl: bcm2835: Match BCM7211 compatible string
From: Florian Fainelli @ 2020-05-29 19:15 UTC (permalink / raw)
To: linux-kernel
Cc: Florian Fainelli, Linus Walleij, Rob Herring, Ray Jui,
Scott Branden,
maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
Nicolas Saenz Julienne, Stefan Wahren, Geert Uytterhoeven,
Matti Vaittinen, open list:PIN CONTROL SUBSYSTEM,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
In-Reply-To: <20200529191522.27938-1-f.fainelli@gmail.com>
The BCM7211 SoC uses the same pinconf_ops as the ones defined for the
BCM2711 SoC, match the compatible string and use the correct set of
options.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/pinctrl/bcm/pinctrl-bcm2835.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm2835.c b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
index 06bd2b70af3c..1b00d93aa66e 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
@@ -1137,6 +1137,10 @@ static const struct of_device_id bcm2835_pinctrl_match[] = {
.compatible = "brcm,bcm2711-gpio",
.data = &bcm2711_plat_data,
},
+ {
+ .compatible = "brcm,bcm7211-gpio",
+ .data = &bcm2711_plat_data,
+ },
{}
};
--
2.17.1
^ permalink raw reply related
* [PATCH v2 1/4] dt-bindings: pinctrl: Document 7211 compatible for brcm,bcm2835-gpio.txt
From: Florian Fainelli @ 2020-05-29 19:15 UTC (permalink / raw)
To: linux-kernel
Cc: Florian Fainelli, Linus Walleij, Rob Herring, Ray Jui,
Scott Branden,
maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
Nicolas Saenz Julienne, Stefan Wahren, Geert Uytterhoeven,
Matti Vaittinen, open list:PIN CONTROL SUBSYSTEM,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
In-Reply-To: <20200529191522.27938-1-f.fainelli@gmail.com>
Document the brcm,bcm7211-gpio compatible string in the
brcm,bcm2835-gpio.txt document.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt b/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt
index 3cab7336a326..dfc67b90591c 100644
--- a/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt
+++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt
@@ -9,6 +9,7 @@ Required properties:
"brcm,bcm2835-gpio" - BCM2835 compatible pinctrl
"brcm,bcm7211-gpio" - BCM7211 compatible pinctrl
"brcm,bcm2711-gpio" - BCM2711 compatible pinctrl
+ "brcm,bcm7211-gpio" - BCM7211 compatible pinctrl
- reg: Should contain the physical address of the GPIO module's registers.
- gpio-controller: Marks the device node as a GPIO controller.
- #gpio-cells : Should be two. The first cell is the pin number and the
--
2.17.1
^ permalink raw reply related
* [PATCH v2 1/4] dt-bindings: pinctrl: Document 7211 compatible for brcm, bcm2835-gpio.txt
From: Florian Fainelli @ 2020-05-29 19:15 UTC (permalink / raw)
To: linux-kernel
Cc: Stefan Wahren,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
Florian Fainelli, Geert Uytterhoeven, Scott Branden, Ray Jui,
Linus Walleij, Matti Vaittinen, open list:PIN CONTROL SUBSYSTEM,
Rob Herring,
maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
Nicolas Saenz Julienne,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
In-Reply-To: <20200529191522.27938-1-f.fainelli@gmail.com>
Document the brcm,bcm7211-gpio compatible string in the
brcm,bcm2835-gpio.txt document.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt b/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt
index 3cab7336a326..dfc67b90591c 100644
--- a/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt
+++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm2835-gpio.txt
@@ -9,6 +9,7 @@ Required properties:
"brcm,bcm2835-gpio" - BCM2835 compatible pinctrl
"brcm,bcm7211-gpio" - BCM7211 compatible pinctrl
"brcm,bcm2711-gpio" - BCM2711 compatible pinctrl
+ "brcm,bcm7211-gpio" - BCM7211 compatible pinctrl
- reg: Should contain the physical address of the GPIO module's registers.
- gpio-controller: Marks the device node as a GPIO controller.
- #gpio-cells : Should be two. The first cell is the pin number and the
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH v2 0/4] pinctrl: bcm2835: Support for wake-up interrupts
From: Florian Fainelli @ 2020-05-29 19:15 UTC (permalink / raw)
To: linux-kernel
Cc: Florian Fainelli, Linus Walleij, Rob Herring, Ray Jui,
Scott Branden,
maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...,
Nicolas Saenz Julienne, Stefan Wahren, Geert Uytterhoeven,
Matti Vaittinen, open list:PIN CONTROL SUBSYSTEM,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE,
moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
Hi Linus,
This patch series updates the bcm2835 pinctrl driver to support
the BCM7211 SoC which is quite similar to 2711 (Raspberry Pi 4)
except that it also supports wake-up interrupts.
Thanks!
Changes in v2:
- fixed patch #3 to reference the correct data structure (Stefan)
- fixed patch #4 to use conditional initialization and fetching of
interrupt resources to limit the memory overhead for non-7211 chips
Florian Fainelli (4):
dt-bindings: pinctrl: Document 7211 compatible for
brcm,bcm2835-gpio.txt
dt-bindings: pinctrl: Document optional BCM7211 wake-up interrupts
pinctrl: bcm2835: Match BCM7211 compatible string
pinctrl: bcm2835: Add support for wake-up interrupts
.../bindings/pinctrl/brcm,bcm2835-gpio.txt | 5 +-
drivers/pinctrl/bcm/pinctrl-bcm2835.c | 80 ++++++++++++++++++-
2 files changed, 83 insertions(+), 2 deletions(-)
--
2.17.1
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.