Re: [Xen-devel] [PATCH v6 00/14] linux: generalize sections, ranges and linker tables
On Mon, 2017-01-09 at 19:12 +0200, Andy Shevchenko wrote: > On Mon, 2017-01-09 at 18:27 +0200, Andy Shevchenko wrote: > > On Mon, 2017-01-09 at 06:58 -0800, Luis R. Rodriguez wrote: > > > The only architecture that was not tested was avr32 and that is > > > because > > > linux-next fails to compile on it. I'd like to greatly thank > > > Guenter > > > Roeck for > > > his help with testing. > > > > We have a real board here. I would try to check if you provide a git > > url > > to your stuff. > > > > I can confirm that breakage happened like in last couple of month. > > v4.10-rc3 can't be compiled either. > > The culprit commit is > > commit 3a0af8fd61f90920f6fa04e4f1e9a6a73c1b4fd2 > Author: Thomas Graf <tg...@suug.ch> > Date: Wed Nov 30 17:10:10 2016 +0100 > > bpf: BPF for lightweight tunnel infrastructure > This makes modules closer to each other, so, net/socket.c:348: relocation truncated to fit: R_AVR32_11H_PCREL against `.text'+2930 But still the module is too big for AVR to do some jumps. Here I stop investigating it. I had been proposed to get rid of avr32 completely, burden to support is just increasing (no Buildroot support, no Gcc support, what else do we need?) for no value. diff --git a/net/core/Makefile b/net/core/Makefile index f6761b6e3b29..91b7d27bf2c6 100644 --- a/net/core/Makefile +++ b/net/core/Makefile @@ -2,13 +2,13 @@ # Makefile for the Linux networking core. # -obj-y := sock.o request_sock.o skbuff.o datagram.o stream.o scm.o \ +obj-y := filter.o sock.o request_sock.o skbuff.o datagram.o stream.o scm.o \ gen_stats.o gen_estimator.o net_namespace.o secure_seq.o flow_dissector.o obj-$(CONFIG_SYSCTL) += sysctl_net_core.o obj-y += dev.o ethtool.o dev_addr_lists.o dst.o netevent.o \ - neighbour.o rtnetlink.o utils.o link_watch.o filter.o \ + neighbour.o rtnetlink.o utils.o link_watch.o \ sock_diag.o dev_ioctl.o tso.o sock_reuseport.o obj-$(CONFIG_XFRM) += flow.o -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v6 00/14] linux: generalize sections, ranges and linker tables
On Mon, 2017-01-09 at 06:58 -0800, Luis R. Rodriguez wrote: > This v6 addresses Andy Shevchenko's feedback from the v5 series [0] to > use > lowercase on a few of the tables.h macros. No other changes have been > done to > this series. As I had mentioned on the last cover-letter the v5 series > had > gone through a lot of testing both compile and run time, with the > linktable > test driver forced-enabled as a debug measure to try to capture errors > as > many architectures as possible: > > alpha arcarcv2 arm arm64 blackfin > c6x > > cris crisv32frv h8300 hexagon i386 > ia64 > > m32r m68k m68k_nommu metag microblaze mips_22 > mips_24 > > mips_25mn10300nios2 openrisc parisc parisc64 > powerpc > > s390 score sh sparc32 sparc64 tile > um > > unicore32 x86_64 xtensa > > > > The only architecture that was not tested was avr32 and that is > because > linux-next fails to compile on it. I'd like to greatly thank Guenter > Roeck for > his help with testing. We have a real board here. I would try to check if you provide a git url to your stuff. I can confirm that breakage happened like in last couple of month. v4.10-rc3 can't be compiled either. > > The debug patch which force enables the test driver is not submitted > for > upstream inclusion but is kept as part of the public tree for those > curious, > its the last patch [1]. This tree is based on linux-next tag next- > 20170109. > > [0] https://lkml.kernel.org/r/20161222023811.21246-1-mcg...@kernel.org > [1] https://git.kernel.org/cgit/linux/kernel/git/mcgrof/linux- > next.git/log/?h=20170109-linker-tables-v6 Series is fine to me FWIW: Reviewed-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> > > Luis R. Rodriguez (14): > generic-sections: add section core helpers > xtensa: skip adding literal when SORT() is used > ranges.h: add helpers to build and identify Linux section ranges > tables.h: add linker table support > kbuild: enable option to force compile force-obj-y and force-lib-y > firmware/Makefile: force recompilation if makefile changes > firmware: port built-in section to linker table > jump_label: move guard #endif down where it belongs > jump_label: port __jump_table to linker tables > dynamic_debug: port to use linker tables > kprobes: move kprobe declarations to asm-generic/kprobes.h > kprobes: port .kprobes.text to section range > kprobes: port blacklist kprobes to linker table > lib: add linker tables test driver > > Documentation/index.rst | 1 + > Documentation/kbuild/makefiles.txt| 36 ++ > Documentation/sections/background.rst | 105 > Documentation/sections/conf.py| 4 + > Documentation/sections/index.rst | 19 + > Documentation/sections/linker-tables.rst | 227 + > Documentation/sections/ranges.rst | 74 +++ > Documentation/sections/section-core.rst | 153 ++ > MAINTAINERS | 32 ++ > arch/alpha/include/asm/Kbuild | 4 + > arch/arc/include/asm/Kbuild | 3 + > arch/arc/include/asm/kprobes.h| 6 +- > arch/arc/kernel/vmlinux.lds.S | 1 - > arch/arm/include/asm/Kbuild | 3 + > arch/arm/include/asm/jump_label.h | 6 +- > arch/arm/include/asm/kprobes.h| 4 + > arch/arm/kernel/entry-armv.S | 3 +- > arch/arm/kernel/vmlinux-xip.lds.S | 1 - > arch/arm/kernel/vmlinux.lds.S | 1 - > arch/arm/probes/decode.h | 1 + > arch/arm64/include/asm/Kbuild | 3 + > arch/arm64/include/asm/jump_label.h | 6 +- > arch/arm64/include/asm/kprobes.h | 4 + > arch/arm64/kernel/armv8_deprecated.c | 1 + > arch/arm64/kernel/insn.c | 1 + > arch/arm64/kernel/probes/decode-insn.h| 2 + > arch/arm64/kernel/pr
Re: [Xen-devel] [PATCH v2 4/7] x86: put msr-index.h in uapi
On Fri, Jan 6, 2017 at 11:43 AM, Nicolas Dichtel <nicolas.dich...@6wind.com> wrote: > This header file is exported, thus move it to uapi. Just hint for the future: -M (move) -C (copy) -D (delete) [though this is NOT for applying] -- With Best Regards, Andy Shevchenko ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v5 04/14] tables.h: add linker table support
On Fri, Jan 6, 2017 at 10:00 PM, Luis R. Rodriguez <mcg...@kernel.org> wrote: > On Wed, Jan 04, 2017 at 11:47:14AM +0200, Andy Shevchenko wrote: >> On Tue, Jan 3, 2017 at 11:25 PM, Luis R. Rodriguez <mcg...@kernel.org> wrote: >> > On Thu, Dec 22, 2016 at 03:58:18PM +0200, Andy Shevchenko wrote: >> >> On Wed, 2016-12-21 at 18:38 -0800, Luis R. Rodriguez wrote: >> >> > +#define LINKTABLE_FOR_EACH(pointer, tbl) >> >> >> >> Hmm... SOMEONE LIKES CAPITAL LETTERS FOR everything, right? :-) >> >> >> >> I would expect more standard linktable_for_each() macro >> > >> > hpa had recommended this, if he prefers a lower case I can change that >> >> >> > but I really do consider this bikeshedding. >> >> I don't think so: >> $ git grep -n FOR_EACH | wc -l >> 83 >> $ git grep -n for_each | wc -l >> 23317 > > OK, would you also prefer if LINKTABLE_RUN_ERR() and LINKTABLE_RUN_ALL() > were lowercase ? Or is that fine ? To be clear I'll leave upper case the > declarers and defines. My understanding that macros to run code -- lower case, definitions -- upper case. Thus, *_run_*() macros to lower. -- With Best Regards, Andy Shevchenko ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v5 04/14] tables.h: add linker table support
On Tue, Jan 3, 2017 at 11:25 PM, Luis R. Rodriguez <mcg...@kernel.org> wrote: > On Thu, Dec 22, 2016 at 03:58:18PM +0200, Andy Shevchenko wrote: >> On Wed, 2016-12-21 at 18:38 -0800, Luis R. Rodriguez wrote: >> > +#define LINKTABLE_FOR_EACH(pointer, tbl) >> >> Hmm... SOMEONE LIKES CAPITAL LETTERS FOR everything, right? :-) >> >> I would expect more standard linktable_for_each() macro > > hpa had recommended this, if he prefers a lower case I can change that > but I really do consider this bikeshedding. I don't think so: $ git grep -n FOR_EACH | wc -l 83 $ git grep -n for_each | wc -l 23317 -- With Best Regards, Andy Shevchenko ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v5 09/14] jump_label: port __jump_table to linker tables
On Wed, 2016-12-21 at 18:38 -0800, Luis R. Rodriguez wrote: > Move the __jump_table from the a custom section solution > to a generic solution, this avoiding extra vmlinux.lds.h > customizations. > > This also demos the use of the .data linker table and of > the shared asm call push_section_tbl(). > > { > asm_volatile_goto("1:\n\t" > WASM(nop) "\n\t" > - ".pushsection __jump_table, \"aw\"\n\t" > + push_section_tbl_any(.data, __jump_table, aw) > ".word 1b, %l[l_yes], %c0\n\t" > ".popsection\n\t" > : : "i" (&((char *)key)[branch]) : : l_yes); > @@ -26,7 +28,7 @@ static __always_inline bool > arch_static_branch_jump(struct static_key *key, bool > { > asm_volatile_goto("1:\n\t" > WASM(b) " %l[l_yes]\n\t" > - ".pushsection __jump_table, \"aw\"\n\t" > + push_section_tbl_any(.data, __jump_table, aw) > ".word 1b, %l[l_yes], %c0\n\t" > ".popsection\n\t" Does it make sense to introduce something like #define pop_section_tbl ".popsection\n\t" #define pop_section_tbl_any pop_section_tbl ? -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v5 04/14] tables.h: add linker table support
On Wed, 2016-12-21 at 18:38 -0800, Luis R. Rodriguez wrote: > A linker table is a data structure that is stitched together from > items > in multiple object files. Linux has historically implicitly used > linker > tables for ages, however they were all built in an adhoc manner which > requires linker script modifications, per architecture. This adds a > general linker table solution so that a new linker table can be > implemented by changing C code only. The Linux linker table was > inspired by Michael Brown's iPXE's linker table solution, it has been > been completely re-written and adapted for integration and use on > Linux. > +/** > + * LINKTABLE_FOR_EACH - iterate through all entries within a linker > table > + * > + * @pointer: entry pointer > + * @tbl: linker table > + * > + * Example usage:: > + * > + * struct frobnicator *frob; > + * > + * LINKTABLE_FOR_EACH(frob, frobnicator_fns) { > + * ... > + * } > + */ > + > +#define LINKTABLE_FOR_EACH(pointer, tbl) > \ Hmm... SOMEONE LIKES CAPITAL LETTERS FOR everything, right? :-) I would expect more standard linktable_for_each() macro Same to the rest of similar macros. > +/** > + * LINKTABLE_RUN_ERR - run each linker table entry func and return > error if any > + * > + * @tbl: linker table > + * @func: structure name for the function name we want to call. > + * @args...: arguments to pass to func > + * > + * Example usage:: > + * > + * unsigned int err = LINKTABLE_RUN_ERR(frobnicator_fns, > some_run,); > + */ > +#define LINKTABLE_RUN_ERR(tbl, func, args...) > \ > +({ > \ > + size_t i; > \ > + int err = 0; > \ > + for (i = 0; !err && i < LINKTABLE_SIZE(tbl); i++) > \ > + err = (LINKTABLE_START(tbl)[i]).func (args); > \ > + err; Indentation here a bit confusing. > \ > +}) -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v4 01/14] x86/boot: enumerate documentation for the x86 hardware_subarch
On Wed, 2016-04-06 at 17:06 -0700, Luis R. Rodriguez wrote: > Although hardware_subarch has been in place since the x86 boot > protocol 2.07 it hasn't been used much. Enumerate current possible > values to avoid misuses and help with semantics later at boot > time should this be used further. > > These enums should only ever be used by architecture x86 code, > and all that code should be well contained and compartamentalized, > clarify that as well. Nitpick: > + * @X86_SUBARCH_PC: Should be used if the hardware is enumerable > using standard > + * PC mechanisms (PCI, ACPI) and doesn't need a special boot > flow. > + * @X86_SUBARCH_LGUEST: Used for x86 hypervisor demo, lguest > + * @X86_SUBARCH_XEN: Used for Xen guest types which follow the PV > boot path, > + * which start at asm startup_xen() entry point and later > jump to the C > + * xen_start_kernel() entry point. > + * @X86_SUBARCH_INTEL_MID: Used for Intel MID (Mobile Internet > Device) platform > + * systems which do not have the PCI legacy interfaces. > + * @X86_SUBARCH_CE4100: Used for Intel CE media processor (CE4100) > SOC for I think 'SoC' (without quotes) will be better. > + * for settop boxes and media devices, the use of a subarch > for CE4100 > + * is more of a hack... -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
On Fri, Feb 19, 2016 at 1:10 PM, Borislav Petkov <b...@alien8.de> wrote: > On Fri, Feb 19, 2016 at 01:00:35PM +0200, Andy Shevchenko wrote: >> That what I see last with earlycon enabled + `debug` in cmdline: > > That doesn't help. Heh, rebuilt on clean repository -> everything works. Looks like false alarm and practical proof to do clean build first. -- With Best Regards, Andy Shevchenko ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
On Fri, Feb 19, 2016 at 12:50 PM, Andy Shevchenko <andy.shevche...@gmail.com> wrote: > On Fri, Feb 19, 2016 at 12:46 PM, Borislav Petkov <b...@alien8.de> wrote: >> On Fri, Feb 19, 2016 at 12:33:46PM +0200, Andy Shevchenko wrote: >>> commit 84aba677f009e20185aea322563389ad56e0ef7e >>> Author: Boris Ostrovsky <boris.ostrov...@oracle.com> >>> Date: Tue Feb 16 09:43:19 2016 +0100 >>> >>> x86/microcode: Remove unnecessary paravirt_enabled check >>> >>> One more thing: I run this kernel as a second from kexec. It might be >>> related as well. For now I have no possibility to run it as a first >>> kernel. >> >> Well, how exactly are you triggering this? Do you have a splat or some >> other register dump so that I can try to pinpoint this. I'll need more >> info so that I can reproduce it here and debug it. > > It stuck at some point during boot. I'm trying to get earlycon or > earlyprintk to show me something... That what I see last with earlycon enabled + `debug` in cmdline: … [0.00] Console: colour VGA+ 80x25 [0.00] console [tty1] enabled [ 0.00] console [ttyS1] enabled [0.00] bootconsole [uart8250] disabled Without it I see nothing at all. -- With Best Regards, Andy Shevchenko ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
On Fri, Feb 19, 2016 at 12:46 PM, Borislav Petkov <b...@alien8.de> wrote: > On Fri, Feb 19, 2016 at 12:33:46PM +0200, Andy Shevchenko wrote: >> No, the commit 84aba677f009 as of today's linux-next on which I commented. > > You commented under the "> A subsequent commit, fbae4ba8c4a3" which confused > me > as to which commit is the culprit. Yeah, at least now it's clear I suppose. >> commit 84aba677f009e20185aea322563389ad56e0ef7e >> Author: Boris Ostrovsky <boris.ostrov...@oracle.com> >> Date: Tue Feb 16 09:43:19 2016 +0100 >> >> x86/microcode: Remove unnecessary paravirt_enabled check >> >> One more thing: I run this kernel as a second from kexec. It might be >> related as well. For now I have no possibility to run it as a first >> kernel. > > Well, how exactly are you triggering this? Do you have a splat or some > other register dump so that I can try to pinpoint this. I'll need more > info so that I can reproduce it here and debug it. It stuck at some point during boot. I'm trying to get earlycon or earlyprintk to show me something... -- With Best Regards, Andy Shevchenko ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
On Fri, Feb 19, 2016 at 12:18 PM, Borislav Petkov <b...@alien8.de> wrote: > On Fri, Feb 19, 2016 at 12:06:33PM +0200, Andy Shevchenko wrote: >> Sorry for being too late, but this commit breaks 32-bit kernel on >> Intel Medfield. Reverting the only commit from today's linux-next >> helps. > > You mean this commit?! > > fbae4ba8c4a3 ("x86, microcode: Reload microcode on resume") > > This has been in since 3.19. > > Please explain. No, the commit 84aba677f009 as of today's linux-next on which I commented. commit 84aba677f009e20185aea322563389ad56e0ef7e Author: Boris Ostrovsky <boris.ostrov...@oracle.com> Date: Tue Feb 16 09:43:19 2016 +0100 x86/microcode: Remove unnecessary paravirt_enabled check One more thing: I run this kernel as a second from kexec. It might be related as well. For now I have no possibility to run it as a first kernel. -- With Best Regards, Andy Shevchenko ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH] x86, microcode: Remove unnecessary paravirt_enabled check
On Thu, Feb 11, 2016 at 5:13 PM, Boris Ostrovsky <boris.ostrov...@oracle.com> wrote: > Commit a18a0f6850d4 ("x86, microcode: Don't initialize microcode code on > paravirt") added a paravirt test in microcode_init(), primarily to avoid > making mc_bp_resume()->load_ucode_ap()->check_loader_disabled_ap() calls > On 32-bit kernels this callchain ends up using __pa_nodebug() macro > which is invalid for Xen PV guests. > > A subsequent commit, fbae4ba8c4a3 ("x86, microcode: Reload microcode on > resume"), eliminated this callchain thus making a18a0f6850d4 > unnecessary. Sorry for being too late, but this commit breaks 32-bit kernel on Intel Medfield. Reverting the only commit from today's linux-next helps. Put me in Cc list to pursue testing whatever you come with. > Signed-off-by: Boris Ostrovsky <boris.ostrov...@oracle.com> > --- > arch/x86/kernel/cpu/microcode/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/kernel/cpu/microcode/core.c > b/arch/x86/kernel/cpu/microcode/core.c > index cea8552..ac360bf 100644 > --- a/arch/x86/kernel/cpu/microcode/core.c > +++ b/arch/x86/kernel/cpu/microcode/core.c > @@ -623,7 +623,7 @@ int __init microcode_init(void) > struct cpuinfo_x86 *c = _cpu_data; > int error; > > - if (paravirt_enabled() || dis_ucode_ldr) > + if (dis_ucode_ldr) > return -EINVAL; > > if (c->x86_vendor == X86_VENDOR_INTEL) > -- > 2.1.0 > -- With Best Regards, Andy Shevchenko ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel