On Wed, Oct 17, 2018 at 5:55 PM Natanael Copa <ncopa(a)alpinelinux.org> wrote:
>
> On Wed, 17 Oct 2018 16:59:15 +0200
> Benjamin Tissoires <benjamin.tissoires(a)redhat.com> wrote:
>
> > Hi Natanael,
> >
> > On Wed, Oct 17, 2018 at 4:52 PM Natanael Copa <ncopa(a)alpinelinux.org> wrote:
> > >
> > > Commit ee3454924370 ("HID: add support for Apple Magic Keyboards") added
> > > support for the Magic Keyboard over Bluetooth, but did not add the
> > > BT_VENDOR_ID_APPLE to hid-quirks. Fix this so hid-apple driver is used
> > > over hid-generic.
> > >
> > > This fixes the Fn key, which does not work at all with hid-generic.
> > >
> > > Fixes: ee3454924370 ("HID: add support for Apple Magic Keyboards")
> > > Bugzilla-id: https://bugzilla.kernel.org/show_bug.cgi?id=99881
> > > Signed-off-by: Natanael Copa <ncopa(a)alpinelinux.org>
> > > ---
> > > This should be backported to stable too.
> > >
> > > drivers/hid/hid-quirks.c | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
> > > index 249d49b6b16c..a3b3aecf8628 100644
> > > --- a/drivers/hid/hid-quirks.c
> > > +++ b/drivers/hid/hid-quirks.c
> > > @@ -270,6 +270,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
> > > { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) },
> > > { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS) },
> > > { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
> > > + { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
> > > + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_ANSI) },
> > > + { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_ANSI) },
> >
> > NACK, this should not be required with kernels v4.17+ IIRC.
> >
> > If it doesn't work on a recent kernel, please raise the issue, but I
> > am actually chasing down the new inclusions of these when we add new
> > device support.
>
> Fair enough. I think it may be needed for 4.14.y kernels though, to fix
> commit b6cc0ba2cbf4 (HID: add support for Apple Magic Keyboards).
>
> Fn key did not work without this patch on 4.14.76 for me.
Right, b6cc0ba2cbf4 has been added to 4.14.75 and is not working
because tweaking hid_have_special_driver[] is not required in current
kernels anymore.
@stable folks, would it be possible to take this patch in the v4.9 and
v4.14 trees? It can't go into Linus' tree, but I'd be glad to give my
Acked-by for a stable backport.
>
> > There is even a high chance that we remove the list entirely as this
> > would tremendously help the distributions to just have to ship
> > hid-generic in the initramfs instead of a bunch of random hid drivers.
>
> I doubt that distros will want Bluetooth keyboards there though. (which
> this is about)
I was talking more generally, killing this list of devices, as some
are keyboard and useful, and some are not needed as you say. But the
point is that distro folks won't have to decide which module to ship:
only hid-generic will be sufficient.
Cheers,
Benjamin
>
> > By the way, if the driver is not autoloaded by udev, it is a problem
> > in udev likely.
> >
> > Cheers,
> > Benjamin
> >
> > > { HID_USB_DEVICE(USB_VENDOR_ID_APPLE,
> > > USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
> > > { HID_USB_DEVICE(USB_VENDOR_ID_APPLE,
> > > USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, #endif --
> > > 2.19.1
> > >
>
blk_queue_split() does respect this limit via bio splitting, so no
need to do that in blkdev_issue_discard(), then we can align to
normal bio submit(bio_add_page() & submit_bio()).
More importantly, this patch fixes one issue introduced in a22c4d7e34402cc
("block: re-add discard_granularity and alignment checks"), in which
zero discard bio may be generated in case of zero alignment.
Fixes: a22c4d7e34402ccdf3 ("block: re-add discard_granularity and alignment checks")
Cc: stable(a)vger.kernel.org
Cc: Mariusz Dabrowski <mariusz.dabrowski(a)intel.com>
Cc: Ming Lin <ming.l(a)ssi.samsung.com>
Cc: Mike Snitzer <snitzer(a)redhat.com>
Cc: Christoph Hellwig <hch(a)lst.de>
Cc: Xiao Ni <xni(a)redhat.com>
Signed-off-by: Ming Lei <ming.lei(a)redhat.com>
---
block/blk-lib.c | 28 ++--------------------------
1 file changed, 2 insertions(+), 26 deletions(-)
diff --git a/block/blk-lib.c b/block/blk-lib.c
index d1b9dd03da25..bbd44666f2b5 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -29,9 +29,7 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
{
struct request_queue *q = bdev_get_queue(bdev);
struct bio *bio = *biop;
- unsigned int granularity;
unsigned int op;
- int alignment;
sector_t bs_mask;
if (!q)
@@ -54,38 +52,16 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
if ((sector | nr_sects) & bs_mask)
return -EINVAL;
- /* Zero-sector (unknown) and one-sector granularities are the same. */
- granularity = max(q->limits.discard_granularity >> 9, 1U);
- alignment = (bdev_discard_alignment(bdev) >> 9) % granularity;
-
while (nr_sects) {
- unsigned int req_sects;
- sector_t end_sect, tmp;
+ unsigned int req_sects = nr_sects;
+ sector_t end_sect;
- /*
- * Issue in chunks of the user defined max discard setting,
- * ensuring that bi_size doesn't overflow
- */
- req_sects = min_t(sector_t, nr_sects,
- q->limits.max_discard_sectors);
if (!req_sects)
goto fail;
if (req_sects > UINT_MAX >> 9)
req_sects = UINT_MAX >> 9;
- /*
- * If splitting a request, and the next starting sector would be
- * misaligned, stop the discard at the previous aligned sector.
- */
end_sect = sector + req_sects;
- tmp = end_sect;
- if (req_sects < nr_sects &&
- sector_div(tmp, granularity) != alignment) {
- end_sect = end_sect - alignment;
- sector_div(end_sect, granularity);
- end_sect = end_sect * granularity + alignment;
- req_sects = end_sect - sector;
- }
bio = next_bio(bio, 0, gfp_mask);
bio->bi_iter.bi_sector = sector;
--
2.9.5
Fix synthetic event to allow independent semicolon at end.
The synthetic_events interface accepts a semicolon after the
last word if there is no space.
# echo "myevent u64 var;" >> synthetic_events
But if there is a space, it returns an error.
# echo "myevent u64 var ;" > synthetic_events
sh: write error: Invalid argument
This behavior is difficult for users to understand. Let's
allow the last independent semicolon too.
Fixes: commit 4b147936fa50 ("tracing: Add support for 'synthetic' events")
Signed-off-by: Masami Hiramatsu <mhiramat(a)kernel.org>
Cc: stable(a)vger.kernel.org
Cc: Tom Zanussi <tom.zanussi(a)linux.intel.com>
Cc: Steven Rostedt <rostedt(a)goodmis.org>
---
kernel/trace/trace_events_hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index 6ff83941065a..d239004aaf29 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -1088,7 +1088,7 @@ static int create_synth_event(int argc, char **argv)
i += consumed - 1;
}
- if (i < argc) {
+ if (i < argc && strcmp(argv[i], ";") != 0) {
ret = -EINVAL;
goto err;
}
Hello,
> -----Original Message-----
> From: Rob Herring [mailto:robh@kernel.org]
> Sent: Friday, September 14, 2018 12:04 AM
> To: Alexey.Brodkin(a)synopsys.com
> Cc: linux-snps-arc(a)lists.infradead.org; Linux Kernel Mailing List <linux-kernel(a)vger.kernel.org>; Vineet.Gupta1(a)synopsys.com
> Subject: Re: [PATCH] ARC: Get rid of toolchain check
>
> On Thu, Sep 13, 2018 at 3:24 PM Alexey Brodkin
> <Alexey.Brodkin(a)synopsys.com> wrote:
> >
> > This check is very naive: we simply test if GCC invoked without
> > "-mcpu=XXX" has ARC700 define set. In that case we think that GCC
> > was built with "--with-cpu=arc700" and has libgcc built for ARC700.
> >
> > Otherwise if ARC700 is not defined we think that everythng was built
> > for ARCv2.
> >
> > But in reality our life is much more interesting.
> >
> > 1. Regardless of GCC configuration (i.e. what we pass in "--with-cpu"
> > it may generate code for any ARC core).
> >
> > 2. libgcc might be built with explicitly specified "--mcpu=YYY"
> >
> > That's exactly what happens in case of multilibbed toolchains:
> > - GCC is configured with default settings
> > - All the libs built for many different CPU flavors
> >
> > I.e. that check gets in the way of usage of multilibbed
> > toolchains. And even non-multilibbed toolchains are affected.
> > OpenEmbedded also builds GCC without "--with-cpu" because
> > each and every target component later is compiled with explicitly
> > set "-mcpu=ZZZ".
> >
> > Signed-off-by: Alexey Brodkin <abrodkin(a)synopsys.com>
> > ---
> > arch/arc/Makefile | 14 --------------
> > 1 file changed, 14 deletions(-)
>
> +1 for this. Removing it also helps with my work to be able to build
> all the .dts files with only a host compiler. That also needs the hunk
> setting CROSS_COMPILE removed and not having a built-in dtb by
> default, but this is a step in the right direction.
>
> Acked-by: Rob Herring <robh(a)kernel.org>
May we get this one back-ported to stable trees?
Upstream commit in Linus' tree is
615f64458ad8 ("ARC: build: Get rid of toolchain check").
This fixes kernel configuration for ARC in case of missing
ARC cross-tools in current PATH.
-Alexey
Hello,
> -----Original Message-----
> From: Alexey Brodkin [mailto:abrodkin@synopsys.com]
> Sent: Sunday, September 16, 2018 11:48 PM
> To: linux-snps-arc(a)lists.infradead.org
> Cc: linux-kernel(a)vger.kernel.org; Vineet Gupta <vgupta(a)synopsys.com>; Alexey Brodkin <abrodkin(a)synopsys.com>; Masahiro
> Yamada <yamada.masahiro(a)socionext.com>; Rob Herring <robh(a)kernel.org>
> Subject: [PATCH] ARC: Don't set CROSS_COMPILE in arch's Makefile
>
> There's not much sense in doing that because if user or
> his build-system didn't set CROSS_COMPILE we still may
> very well make incorrect guess.
>
> But as it turned out setting CROSS_COMPILE is not as harmless
> as one may think: with recent changes that implemented automatic
> discovery of __host__ gcc features unconditional setup of
> CROSS_COMPILE leads to failures on execution of "make xxx_defconfig"
> with absent cross-compiler, for more info see [1].
>
> Set CROSS_COMPILE as well gets in the way if we want only to build
> .dtb's (again with absent cross-compiler which is not really needed
> for building .dtb's), see [2].
>
> Note, we had to change LIBGCC assignment type from ":=" to "="
> so that is is resolved on its usage, otherwise if it is resolved
> at declaration time with missing CROSS_COMPILE we're getting this
> error message from host GCC:
> ------------------------->8-------------------------
> gcc: error: unrecognized command line option ‘-mmedium-calls’
> gcc: error: unrecognized command line option ‘-mno-sdata’; did you mean ‘-fno-stats’?
> ------------------------->8-------------------------
>
> [1] http://lists.infradead.org/pipermail/linux-snps-arc/2018-September/004308.h…
> [2] http://lists.infradead.org/pipermail/linux-snps-arc/2018-September/004320.h…
>
> Signed-off-by: Alexey Brodkin <abrodkin(a)synopsys.com>
> Cc: Masahiro Yamada <yamada.masahiro(a)socionext.com>
> Cc: Rob Herring <robh(a)kernel.org>
> ---
> arch/arc/Makefile | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> index 99cce77ab98f..5f6b67917dc2 100644
> --- a/arch/arc/Makefile
> +++ b/arch/arc/Makefile
> @@ -6,14 +6,6 @@
> # published by the Free Software Foundation.
> #
>
> -ifeq ($(CROSS_COMPILE),)
> -ifndef CONFIG_CPU_BIG_ENDIAN
> -CROSS_COMPILE := arc-linux-
> -else
> -CROSS_COMPILE := arceb-linux-
> -endif
> -endif
> -
> KBUILD_DEFCONFIG := nsim_700_defconfig
>
> cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
> @@ -79,7 +71,7 @@ cflags-$(disable_small_data) += -mno-sdata -fcall-used-gp
> cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mbig-endian
> ldflags-$(CONFIG_CPU_BIG_ENDIAN) += -EB
>
> -LIBGCC := $(shell $(CC) $(cflags-y) --print-libgcc-file-name)
> +LIBGCC = $(shell $(CC) $(cflags-y) --print-libgcc-file-name)
>
> # Modules with short calls might break for calls into builtin-kernel
> KBUILD_CFLAGS_MODULE += -mlong-calls -mno-millicode
> --
> 2.17.1
May we have this one back-ported to stable branches?
Upstream commit in Linus' tree is:
40660f1fcee8 ("ARC: build: Don't set CROSS_COMPILE in arch's Makefile").
Regards,
Alexey
Hi Greg,
Could you enqueue the following patch for -stable 4.9.x?
commit ab6dd1beac7be3c17f8bf3d38bdf29ecb7293f1e
Author: Xin Long <lucien.xin(a)gmail.com>
Date: Thu Aug 10 10:22:24 2017 +0800
netfilter: check for seqadj ext existence before adding it in nf_nat_setup_info
Cc'ing Laura, combining SNAT+DNAT+ftp helper is currently broken with
4.9.x. The patch above cures the issues.
Thanks.
Fix synthetic event to allow independent semicolon at end.
The synthetic_events interface accepts a semicolon after the
last word if there is no space.
# echo "myevent u64 var;" >> synthetic_events
But if there is a space, it returns an error.
# echo "myevent u64 var ;" > synthetic_events
sh: write error: Invalid argument
This behavior is difficult for users to understand. Let's
allow the last independent semicolon too.
Fixes: commit 4b147936fa50 ("tracing: Add support for 'synthetic' events")
Signed-off-by: Masami Hiramatsu <mhiramat(a)kernel.org>
Cc: <stable(a)vger.kernel.org>
Cc: Tom Zanussi <tom.zanussi(a)linux.intel.com>
Cc: Steven Rostedt <rostedt(a)goodmis.org>
---
kernel/trace/trace_events_hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index 6ff83941065a..d239004aaf29 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -1088,7 +1088,7 @@ static int create_synth_event(int argc, char **argv)
i += consumed - 1;
}
- if (i < argc) {
+ if (i < argc && strcmp(argv[i], ";") != 0) {
ret = -EINVAL;
goto err;
}
We are an image team who can process 400+ images each day.
If you need any image editing service, please let us know.
Image cut out and clipping path, masking.
Such as for ecommerce photos, jewelry photos retouching, beauty and skin
images
and wedding photos.
We give test editing for your photos if you send us some.
Thanks,
Nancy
Attached are another couple of miscellaneous fixes for FS-Cache and
CacheFiles:
(1) Fix a race between object burial in cachefiles and external rmdir.
(2) Fix a race from a split atomic op.
(3) Fix incomplete initialisation of cookie key space.
(4) Fix out-of-bounds read.
The patches are tagged here:
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
fscache-fixes-20181017
and can also be found on the following branch:
http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=fs…
David
---
Al Viro (1):
cachefiles: fix the race between cachefiles_bury_object() and rmdir(2)
David Howells (1):
fscache: Fix incomplete initialisation of inline key space
Eric Sandeen (1):
fscache: Fix out of bound read in long cookie keys
kiran.modukuri (1):
fscache: Fix race in fscache_op_complete() due to split atomic_sub & read
fs/cachefiles/namei.c | 2 +-
fs/fscache/cookie.c | 31 ++++++++++---------------------
fs/fscache/internal.h | 1 -
fs/fscache/main.c | 4 +---
include/linux/fscache-cache.h | 4 ++--
5 files changed, 14 insertions(+), 28 deletions(-)